Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wifi won't stay up on BeagleBone

I'm running Ubuntu 11.10 on a BeagleBone with an Edimax EW-7711UAn wifi adapter plugged into the USB port. I've configured /etc/network/interfaces and the wifi works, BUT:

  1. The wlan0 interface doesn't always come up when booting the device. It comes up successfully about one in three attempts.

  2. The interface sometimes goes down again, especially when not used for a while.

The /etc/network/interfaces file includes:

auto wlan0
    iface wlan0 inet dhcp
    wpa-driver wext
    wpa-ssid "Bodoni"
    wpa-psk "<mypassword>"

In order to try to address point 1), I put the following in /etc/rc.local:

nohup sh -c "ifdown wlan0 && ifup wlan0"

But it hasn't seemed to help much. I'm guessing that the second problem might be connected with power management, so I might try turning that off in /etc/rc.local.

But does anyone have any thoughts on how I might get the wifi to come up reliably on boot? I'm running the BeagleBone headless with no Ethernet (it's on a robot) so it's important I get this fixed!

FYI, I'm using the default drivers - lsmod gives:

Module                  Size  Used by
aes_generic            27837  2 
arc4                    1111  2 
rt2800usb              12386  0 
rt2800lib              45146  1 rt2800usb
crc_ccitt               1457  1 rt2800lib
rt2x00usb              10595  1 rt2800usb
rt2x00lib              39077  3 rt2800usb,rt2800lib,rt2x00usb
mac80211              228509  3 rt2800lib,rt2x00usb,rt2x00lib
cfg80211              167722  2 rt2x00lib,mac80211
rfkill                 16703  1 cfg80211
binfmt_misc             6224  1 
spidev                  4620  0 

I'm hoping not to have to compile a new driver because I haven't had much success with that!

like image 372
Dick Kennedy Avatar asked Jul 06 '12 14:07

Dick Kennedy


1 Answers

I've had a similar problem with my BeagleBones using another wifi adapter using the rt2800usb driver. Specifically I am using a DLINK DWA-125 (HW Rev A2) which is based on the rt3070 chip.

Same exact symptoms that you are reporting if I plug the DWA-125 directly into the USB port on the BeagleBone.

BUT if I plug the adapter into a USB extension cable and then plug the extension cable into the BeagleBone USB port, everything works fine. I have done 100s of hours of Cloud9 development using this setup and no problems with Wifi whatsoever.

I am running the Angstrom distro - and I find the same issue on all three of last BB releases (4/22. 5/? and 6/18).

Length of USB extension cable doesn't seem to matter (at least between 1ft and 12ft - haven't tried anything below 1ft.)

I have 6 BeagleBones (4 ver A5 and 2 ver A6) - behavior is the same on all of these Beaglebones.

Also have 4 DWA-125 Rev A2 USB adapters - behavior is the same on all of these.

I have not experimented with other USB Wifi Adapters using the same or other chips/drivers. And I haven't spent the time to track down the root cause of this behavior - I have code to write!

But, give it a try in case your experience matches mine - its a quick and easy 'fix'.

---- Addendum:

I just tried an experiment with the Belkin N150 Micro USB Wifi Adapter - based on the rtl8192cu chip and the standard drivers that come with the 6/18 BeagleBone Angstrom distribution.

Got very similar behavior: The Wifi doesn't work at all when plugged directly into the USB port. But when plugged in via a 1ft USB extension cable, everything works fine.

like image 193
Frank Halasz Avatar answered Sep 19 '22 12:09

Frank Halasz