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/
pandring
 
Posts: 25
Joined: Sun Dec 02, 2012 5:15 pm

Connecting Raspberry Pi with Wifi Module

Post by pandring »

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

User avatar
adafruit_support_bill
 
Posts: 88086
Joined: Sat Feb 07, 2009 10:11 am

Re: Connecting Raspberry Pi with Wifi Module

Post by adafruit_support_bill »

Do you have SSID broadcast enabled on your router?

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

Re: Connecting Raspberry Pi with Wifi Module

Post by pandring »

I do.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Connecting Raspberry Pi with Wifi Module

Post by adafruit_support_rick »

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).

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

Re: Connecting Raspberry Pi with Wifi Module

Post by pandring »

It is. So you suggest that I plug it into a powered USB hub?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Connecting Raspberry Pi with Wifi Module

Post by adafruit_support_rick »

Yup. That's what I have to do.

User avatar
timgilbert
 
Posts: 1
Joined: Sat Feb 02, 2013 7:23 pm

Re: Connecting Raspberry Pi with Wifi Module

Post by timgilbert »

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.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Connecting Raspberry Pi with Wifi Module

Post by adafruit_support_rick »

@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.

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

Re: Connecting Raspberry Pi with Wifi Module

Post by pandring »

I use the charger cable from my old Kindle, if that makes a difference.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Connecting Raspberry Pi with Wifi Module

Post by adafruit_support_rick »

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.

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

Re: Connecting Raspberry Pi with Wifi Module

Post by pandring »

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

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Connecting Raspberry Pi with Wifi Module

Post by adafruit_support_rick »

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?

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

Re: Connecting Raspberry Pi with Wifi Module

Post by pandring »

I'm using DHCP and WEP, and it's 2.4 GHz (b/g)

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Connecting Raspberry Pi with Wifi Module

Post by adafruit_support_rick »

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

# 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

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

Re: Connecting Raspberry Pi with Wifi Module

Post by pandring »

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.

Locked
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/

Return to “Adafruit Raspberry Pi® accessories”