Connecting Raspberry Pi with Wifi Module
Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Connecting Raspberry Pi with Wifi Module

by pandring on Mon Jan 28, 2013 7:22 pm

I'm trying to connect my raspberry pi to my wifi network using the mini wifi module sold here, but I'm running into problems. I've gone through the adafruit (and every other) tutorial I could find, but my RPi can never connect to the internet when I unplug the ethernet cable (I have a headless setup). The green light on the wifi module doesn't light up, but it does flash 6 times, then off for 10 seconds, then 6 flashes, then it's off for 10 seconds, etc.
Does anyone know what might be wrong?
Thanks!
Peter
pandring
 
Posts: 25
Joined: Sun Dec 02, 2012 5:15 pm

Re: Connecting Raspberry Pi with Wifi Module

by adafruit_support_bill on Tue Jan 29, 2013 6:41 am

Do you have SSID broadcast enabled on your router?
User avatar
adafruit_support_bill
 
Posts: 31077
Joined: Sat Feb 07, 2009 10:11 am

Re: Connecting Raspberry Pi with Wifi Module

by pandring on Tue Jan 29, 2013 12:22 pm

I do.
pandring
 
Posts: 25
Joined: Sun Dec 02, 2012 5:15 pm

Re: Connecting Raspberry Pi with Wifi Module

by adafruit_support_rick on Tue Jan 29, 2013 1:40 pm

Do you have the wifi module plugged directly into the Pi? The flashing you describe sounds like the module is not getting enough power. We recommend only using wifi dongles through a powered hub, as the Pi generally can't supply enough power directly (they may sort-of work in some cases, but it's marginal at best).

adafruit_support_rick
 
Posts: 13111
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Connecting Raspberry Pi with Wifi Module

by pandring on Sat Feb 02, 2013 3:21 pm

It is. So you suggest that I plug it into a powered USB hub?
pandring
 
Posts: 25
Joined: Sun Dec 02, 2012 5:15 pm

Re: Connecting Raspberry Pi with Wifi Module

by adafruit_support_rick on Sat Feb 02, 2013 7:13 pm

Yup. That's what I have to do.

adafruit_support_rick
 
Posts: 13111
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Connecting Raspberry Pi with Wifi Module

by timgilbert on Sat Feb 02, 2013 7:33 pm

For what it's worth, I'm able to run the Pi with the same mini wireless adapter plugged into it directly (with the entire thing powered by the 5V 1A power connector listed on the Pi page here) and I haven't experienced any problems with it. Therefore my first guess would be that there's some kind of problem with your wireless configuration. I would suggest leaving the ethernet plugged in and then enabling the wireless at the same time so you can see whether anything comes up in the system logs that would help you diagnose the problem.
timgilbert
 
Posts: 1
Joined: Sat Feb 02, 2013 7:23 pm

Re: Connecting Raspberry Pi with Wifi Module

by adafruit_support_rick on Sat Feb 02, 2013 7:43 pm

@timgilbert -
In our experience, it's really a very iffy thing. On my system, the Wifi connects and *looks* like it's working, but it's flaky and unreliable. In a powered hub, it's rock-solid. I think the only reason it connects at all is because I have a high-power access point 10 feet away from it. It can't see my Airport Express that's 30 feet away, even though other devices see a strong signal from it in the same location.

adafruit_support_rick
 
Posts: 13111
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Connecting Raspberry Pi with Wifi Module

by pandring on Sun Feb 03, 2013 3:47 pm

I use the charger cable from my old Kindle, if that makes a difference.
pandring
 
Posts: 25
Joined: Sun Dec 02, 2012 5:15 pm

Re: Connecting Raspberry Pi with Wifi Module

by adafruit_support_rick on Mon Feb 04, 2013 12:56 pm

Check the ratings on your adapter. Those are pretty wimpy, as I recall (I'd check the rated output on mine, but it burned out after a couple of months, and I threw it away).

To have any hope at all of this working without a powered hub, you're going to want something that will supply 1 Amp @5V.

You can save yourself some headaches by getting it working through a powered hub first, then seeing if you can maybe make it work directly.

adafruit_support_rick
 
Posts: 13111
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Connecting Raspberry Pi with Wifi Module

by pandring on Fri Feb 22, 2013 9:23 pm

OK. So I finally got a little more time to work on this, but I'm still having trouble. I have a powered USB hub, and I've tried just about every tutorial out there, but it still doesn't connect. For whatever reason, I just can't get the wifi to work.
Here's the wlan0 information I get using "ifconfig -a":

wlan0 Link encap:Ethernet HWaddr 00:e0:4c:10:f5:79
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

I just can't seem to figure it out!
Thanks for your help,
Peter
pandring
 
Posts: 25
Joined: Sun Dec 02, 2012 5:15 pm

Re: Connecting Raspberry Pi with Wifi Module

by adafruit_support_rick on Fri Feb 22, 2013 10:31 pm

What sort of wifi network have you got? You said you've got SSID broadcast enabled. But do you have DHCP enabled? Are you using WEP or WPA encryption? Is it 2.4Ghz or 5GHz?

adafruit_support_rick
 
Posts: 13111
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Connecting Raspberry Pi with Wifi Module

by pandring on Fri Feb 22, 2013 11:23 pm

I'm using DHCP and WEP, and it's 2.4 GHz (b/g)
pandring
 
Posts: 25
Joined: Sun Dec 02, 2012 5:15 pm

Re: Connecting Raspberry Pi with Wifi Module

by adafruit_support_rick on Sat Feb 23, 2013 10:11 am

Aha!! As I suspected!

If you are using WEP, you need a slightly different configuration. I found the following WEP setup here

Code: Select all | TOGGLE FULL SIZE
# The loopback network interface
auto lo
iface lo inet loopback

# The primary (wired) network interface
iface eth0 inet dhcp

# The wifi (wireless) network interface
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
        wireless-essid YOUR_SSID
        wireless-key YOUR_WEP_KEY

adafruit_support_rick
 
Posts: 13111
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Connecting Raspberry Pi with Wifi Module

by pandring on Sat Feb 23, 2013 3:00 pm

That may have been part of my problem, but it still doesn't work for me. "ifconfig -a" gives the same result as before, and "ifup wlan0" says that the DHCP lease failed.
I assume YOUR_SSID and YOUR_WEP_KEY are strings, correct?

EDIT: I tried the ssid and key with and without quotes, and it didn't work either way.
EDIT 2: I'm using raspbian, if that makes any difference.
Last edited by pandring on Sat Feb 23, 2013 3:13 pm, edited 1 time in total.
pandring
 
Posts: 25
Joined: Sun Dec 02, 2012 5:15 pm