Jump to content

Wifi Connect script UPDATED v1.3 v3.0.0 compatible!


SymPak
 Share

Recommended Posts

After googling the problem, there were a few people with the same issue using the same wifi adapter. Unfortunately I haven't come across any solutions.

Try this:

ifconfig wlan1 down

ifconfig wlan1 up

iwlist wlan1 scan

dmesg | grep -i wlan1

Post the output here. Also it might be worth trying a different USB cable.

-SymPak

Link to comment
Share on other sites

root@Pineapple:~# ifconfig wlan1 down
root@Pineapple:~# ifconfig wlan1 up
root@Pineapple:~# iwlist wlan1 scan
wlan1     Failed to read scan data : No such device

root@Pineapple:~# dmesg | grep -i wlan1

Will look for another cable but dont think I have one tbh

It works fine in reaver from laptop..

Also I googled about the country thing and changed the region to GB and the tx power is at 20 now, made no diff with the results though.

Link to comment
Share on other sites

Wow. It was the wire! Mad that, had some crazy gold plated good quality one from my astro a40's lying around and using that has got it working (to some extent)

now I have another error LOL

root@Pineapple:~# Connecting to TALKTALK-52F438 on channel 11 signal quality 100
%
-ash: Connecting: not found
root@Pineapple:~# Requesting IP Address
-ash: Requesting: not found
root@Pineapple:~# udhcpc: SIOCGIFINDEX: No such device
-ash: udhcpc:: not found
root@Pineapple:~# Done.


Im guessing this has failed? given the no device/not found things? do i need to install something to use udhcpc?

One step forward atleast! :)

Link to comment
Share on other sites

That is good news! That udhcpc issue is something I have had myself. Do a iwconfig and look to see if wlan1 is now wlan2. Best thing to do is unplug the adapter, restart the pineapple and plug the adapter back in. The 36H does have a problem with stealing wlan0. Long story short, fixing that problem was put on the back burner. Just plug it in after the pineapple has booted and all should be fine.

-SymPak

Link to comment
Share on other sites

okay thanks, need to recharge up and try again! but the iwconfig shows up as wlan31? wtf? but yeah ill sort that in a few mins as im sharing the foreign power adapter between my test victim & pineapple..

Cheers for the help man seems an awesome little script!

Edited by Davepheadrus
Link to comment
Share on other sites

  • 2 weeks later...

Tried this today and seems everything went haywire on my device :)

After I connected through the new wireless adapter I connected, the device no longer used its own wireless card to continue to act as an AP.

Since this changes settings on the device, maybe their should be away it backs up the config files in case one is interested in reverting the changes.

Edited by dustbyter
Link to comment
Share on other sites

Thats odd. Is it a repeatable problem or an isolated incident? Also, how did you run the script and what options did you use? As for backing up the config file, I will implement a backup and restore feature in the next version. Thanks for the input :)

-SymPak

Edited by SymPak
Link to comment
Share on other sites

Hi SymPak,

I only tried this once. My setup was as follows.

Alfa connected to a USB hub.

USB hub was connected to the USB port of the pineapple. (Hub had a usb stick on it too; this should not matter regardless)

the interfaces were assigned as follows

wlan0 - alfa connected through usb hub

wlan1 - internal wifi card from the pineapple

Uploaded the script to my usb drive and then executed: ./connect.sh -i wlan0 -s <Network name> -p <mypasskey> -i wlan0

On a side note, would this script run on any openwrt device assuming it has 2 network interfaces and the interface names are updated in the script? e.g. on a WRT54GL

Link to comment
Share on other sites

Thanks for the info. It might have something to do with your interfaces being switched around, although it really shouldn't matter. If it happens again post a copy of your /etc/config/wireless here for me to have a look at.

I have not tested this script on anything else but it should work provided it uses the same interface names. If the names are different, simply modifying the interface name checks in the script should do. This script will only work on devices running openwrt.

-SymPak

Link to comment
Share on other sites

Very excited to try this script out but having problems...

plugged in usb hub with flash drive and alfa 36. immediately notice that there is no wlan0! just 1 and 2. with the alfa on 2. device connected to internet via ethernet cable. running 2.8.1. Cannot start "wireless" in pineapple status screen for whatever reason. I'm trying to connect to my WPA2 AP.

try ./connect.sh - i wlan2 <details omitted>

Stopping karma
Failed to connect to hostapd - wpa_ctrl_open: No such file or directory
Invalid interface wlan2
Done.
Now I know wlan2 is valid, but am I missing a file or something?
For those having trouble downloading the script, maybe you should try what i did, just READ the file and copy and paste the text to your pineapple using nano/vi.
Good work, I'm sure we'll get this working. I've had nothing but nightmares with NetworkManager and hope to avoid it as much as I can.
Link to comment
Share on other sites

My script only looks for wlan0 and wlan1. Any other wlan interface doesn't work in this version. I will be releasing v1.2 soon, which will allow the use of wlan2 and beyond. For now I recommend booting the Pineapple without the alfa plugged in, and then plugging it in after it boots.

-SymPak

Link to comment
Share on other sites

  • 1 month later...

Sorry for the late reply. What firmware version are you on and what version of the script are you running?

Actually I was using 1.2 on the scripts and 2.8.0 (which at the time I was trying something else and experimented reverting back to 2.8.0)

But I am on 3.0.0.. so I have not tried it yet.

works on 3.0.0... but only to a openwrt router I set up (tp link wr703n). For some reason it won't connect to my home networks router. (which is a linksys wrt54gl)

edit edit; i was too far away, works now when the signal quality is better.

Edited by demonjester
Link to comment
Share on other sites

  • 1 month later...

Updated to v1.3! This update adds the ability to stop the script with the WPS button if needed, network address detection for ICS, ICS sharing to br-lan by default and command execution upon successful connection. See the original post for details!

-SymPak

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...