Jump to content

Mk4 Usb Wifi Dongle Internet Sharing How-To


Isc

Recommended Posts

  • 2 months later...

Hello all.

Just got my Mark4 pineapple.

Looks nice.

Ok, i've gone for elite bundle, and now trying to hook it all up in a ext. usb wifi (alfa from elite bundle) as a source of internet.

Tried manually and ran into problem with wpa_supplicant immidiately.

Here's my log:

root@Pineapple:~# wpa_supplicant -D nl80211 -i wlan1 -dd -c /etc/wpa_supplicant.
conf
Successfully initialized wpa_supplicant
wlan1: Failed to initiate AP scan
wlan1: SME: Trying to authenticate with xxxx (SSID='xxx' freq=2462 MHz)
wlan1: SME: Authentication request to the driver failed
wlan1: Failed to initiate AP scan
wlan1: SME: Trying to authenticate with xxxx (SSID='xxx' freq=2462 MHz)
wlan1: SME: Authentication request to the driver failed
wlan1: SME: Trying to authenticate with xxxx (SSID='xxx' freq=2462 MHz)
wlan1: SME: Authentication request to the driver failed

What am i doing wrong???? Disappointed...

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...

I can't associate to my network. WPA2. When I run this wpa_supplicant -D nl80211 -i wlan1 -c /etc/wpa_supplicant.con

f. I get this below.

root@Pineapple:~# wpa_supplicant  -D nl80211 -i wlan1 -c /etc/wpa_supplicant.con
f
Successfully initialized wpa_supplicant
wlan1: SME: Trying to authenticate with xxxx (SSID='Tylers Home' freq=2437 MHz)
wlan1: SME: Authentication request to the driver failed
wlan1: SME: Trying to authenticate with xxxx (SSID='Tylers Home' freq=2437 MHz)
wlan1: SME: Authentication request to the driver failed
wlan1: SME: Trying to authenticate with xxxx (SSID='Tylers Home' freq=2437 MHz)
wlan1: SME: Authentication request to the driver failed
wlan1: SME: Trying to authenticate with xxxx (SSID='Tylers Home' freq=2437 MHz)
wlan1: SME: Authentication request to the driver failed
wlan1: SME: Trying to authenticate with xxxx (SSID='Tylers Home' freq=2437 MHz)
wlan1: SME: Authentication request to the driver failed
^Cwlan1: CTRL-EVENT-TERMINATING
root@Pineapple:~#
 
I would really like to get this working. Thanks.
EDIT: I got it working. Yay!
Edited by TylerCPU
Link to comment
Share on other sites

  • 2 weeks later...

Hmm sorry guys,

Kind of struggling as well.

root@Pineapple:~# ./wireless_connect.sh

Current MAC: c8:3a:35:c0:22:b7 (unknown)
ERROR: Can't change MAC: interface up or not permission: Invalid argument
Successfully initialized wpa_supplicant
udhcpc (v1.19.4) started
Sending discover...
Sending discover...
Sending discover...

And Putty just sits there like that until I ctrl+c it. :( Pineapple firmware is 2.8.0

Link to comment
Share on other sites

Hmm sorry guys,

Kind of struggling as well.

And Putty just sits there like that until I ctrl+c it. :( Pineapple firmware is 2.8.0

Did you run chmod +x ~/wireless_connect.sh ?

And did you try and sudo that? sudo ./wireless_connect.sh

I created a how to video on this subject thanks to @Lsc on this thread. I like doing it manually because if something goes wrong I know what command I'm stuck at(Not always the case.). It's for open wifi networks but it might help you.

Edited by TylerCPU
Link to comment
Share on other sites

Thanks Tyler,

I have ran chmod +x ~/wireless_connect.sh, and when I try with sudo I get " sudo : not found".

Even doing it your way of manual setup, I get stuck at the same point of udhcp -i wlan1:

udhcpc (v1.19.4) started
Sending discover...
Sending discover...
Sending discover...
After a long wait I get :

Sending select for 172.16.42.155...

Lease of 172.16.42.155 obtained, lease time 43200
udhcpc: ifconfig wlan1 172.16.42.155 netmask 255.255.255.0 broadcast 172.16.42.255
udhcpc: setting default routers: 172.16.42.1
route: SIOCADDRT: Network is unreachable

route

root@Pineapple:~# route

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.42.0 * 255.255.255.0 U 0 0 0 br-lan
172.16.42.0 * 255.255.255.0 U 0 0 0 wlan1
Edited by xXNirvashXx
Link to comment
Share on other sites

Thanks Tyler,

I have ran chmod +x ~/wireless_connect.sh, and when I try with sudo I get " sudo : not found".

Even doing it your way of manual setup, I get stuck at the same point of udhcp -i wlan1:

udhcpc (v1.19.4) started
Sending discover...
Sending discover...
Sending discover...
After a long wait I get :

route

Yah, my tutorial only shows how to connect to an open Wi-Fi hotspot. If you need to connect to a secure Wi-Fi router you'll need to use wpa_supplicant. First of all check if you are associated to the AP. You can see that if you do iwconfig and look for Access Point with a MAC address if not then everything else will fail. Anyways you seem to have gotten an address from the router with udhcpc -i wlan1.

From what it looks like, I had this same problem too. My setup was a secondary ssid to my main router which did not work well. In order to get it to work I had to manually set the default gateway. For you it would be, route add default gw 172.16.42.1 wlan1. I think once you do this ICS with your computer will not work anymore. You'll have to connect via wifi to get back into ssh.

Sorry, your already root. You don't need sudo nor does it work.

BTW you can't associate to your secure(wpa) Wi-Fi router if you use iwconfig wlan1 essid "yourssid"

Use wpa_supplicant. That will Connect and associate to your secure router.

Edited by TylerCPU
Link to comment
Share on other sites

  • 2 months later...

every time i do it the connection on both interfaces go down wlan0 and wlan1 why is that

When I've seen behavior like this it's always been due to my devices not receiving sufficient power. Are you using a powered USB hub?

On topic side note:

Today, I received a USB wifi dongle that I ordered a long time ago for use with either my Pi or Pogoplug. I thought I had cancelled the order and forgot about it. This one:

http://www.amazon.com/150Mbps-Wireless-Adapter-802-11n-Antenna/dp/B008BZ40HA

RT5370 chipset, works with my Pineapple out of the box. $6.90 shipped. I'm using this to wifi tether my Pineapple to an iPhone. Just figured I'd mention this in case anybody else wants a dirt cheap wifi dongle to do something similar.

Link to comment
Share on other sites

  • 3 months later...

hello ,

i have the follow "strange" situation

the script stop to wpa_supplicant.... without error , just looking as freeze but "work" ...

i open the new ssh and i run the rest of the script , AND WORK !! i have internet and all going good !!

i thought to write about that ...

i have the mark iv and 2.8.1 ... and the ics (wlan1 --> wlan0) work perfect ...

any idea to not use use 2 ssh ? (any way is not problem for me hihi

thnx

Link to comment
Share on other sites

  • 3 weeks later...

Is there any way to get this to work with a 36H (not 36NHA), I'm getting the following error with ir without the -B flag

root@Pineapple:~# ./wireless_connect.sh
Current MAC: 00:c0:ca:54:de:89 (Alfa, Inc.)
Faked MAC: 00:e0:b2:3e:70:dd (Telmax Communications Corp.)
Successfully initialized wpa_supplicant
nl80211: Could not configure driver to use managed mode
Could not read interface wlan1 flags: No such device
wlan1: Failed to initialize driver interface
udhcpc (v1.19.4) started
udhcpc: bind: No such device
root@Pineapple:~#

Thanks

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.

  • Recently Browsing   0 members

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