1

I have a BeagleBoard Rev C5 and I am using Buildroot to make a simple custom Linux system. I'm developing on an Ubuntu 10.04 VM on a Windows 7 host machine. I purchased a Ralink wifi USB dongle and have verified that both Windows 7 and Ubuntu can recognize and use the dongle. When I boot my BeagleBoard after building the system with Buildroot I cannot seem to get the board to recognize the USB wifi dongle, let alone use it.

I have configured Buildroot with udev, wifi-tools, usbutils, usbmount, libusb, and wpa_supplicant. Under 'Hardware Control', I selected linux-firmware and Ralink 30XX driver support.

I've tried to follow these following links as examples but they seem to be focused on using a full-blown distribution like Angstrom or Ubuntu and I want to build a custom kernel with Buildroot:

[1]: http://antipastohw.blogspot.com/2010/07/how-to-make-linux-beagleboard-gadget.html
[2]: http://lakm.us/logit/2012/03/usb-wifi-stick-beagleboard-xm-wpa_supplicant/
[3]: http://linuxwireless.org/en/users/Download
[4]: http://deautomatized.wordpress.com/2012/04/08/ubuntu-11-10-on-beagleboard-rev-c5/

On Host Machine with USB wifi adapter connected, I get the following outpuf from the lsusb command:

Bus 002 Device 005: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 002 Device 004: ID 0e0f:0008 VMware, Inc.
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 004: ID 148f:3070 Ralink Technology, Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

On my beagleboard I've configured wpa_supplicant.conf to look like below:

phil@beagle: cat wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
    network={
    ssid="NETGEAR"
    scan_ssid=0
    proto=WPA
    key_mgmt=WPA-PSK
    psk="PASSWORD"
    pairwise=TKIP
    group=TKIP
}

If I run lsusb on the target, I get:

unable to initialize libusb: -99

I'm not sure where to go from here. How can I get the BeagleBoard to realize the USB dongle using Buildroot and how can I load those Ralink drivers? Thanks in advance.

EDIT - I've enabled USB controller support in the kernel but still cannot load the driver I enabled for raylink from Device Drivers > Network Device Support > Wireless LAN > Raylink Driver Support from the Linux 3.3 Kernel menuconfig.

Here is what I am seeing when booting the board and trying to get Wifi. Any thoughts on this??

# modprobe rt2800usb.ko 
# modprobe -r rt2800usb.ko 
[  378.257812] usbcore: deregistering interface driver rt2800usb
[  378.319854] unwind: Index not found bf051d88
# 
# 
# modprobe rt2800usb.ko 
[  380.998291] cfg80211: Calling CRDA to update world regulatory domain
[  381.087341] usbcore: registered new interface driver rt2800usb
# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
# iwconfig
lo        no wireless extensions.

# ifconfig -a
lo        Link encap:Local Loopback  
          LOOPBACK  MTU:16436  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:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

# pwd
/lib/modules/3.3.7/kernel/drivers/net/wireless/rt2x00
# ls
rt2500usb.ko  rt2800lib.ko  rt2800usb.ko  rt2x00lib.ko  rt2x00usb.ko  rt73usb.ko

EDIT 2:

If I boot ubuntu on the BeagleBoard the adapter is recognized and by editing wpa_config I can ping www.google.com. I must be missing something in my custom kernel .config or how I am loading the drivers... Any thoughts?

ubuntu@omap:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter
dmesg
[   12.765960] Registered led device: rt2800usb-phy0::radio
[   12.766113] Registered led device: rt2800usb-phy0::assoc
[   12.766265] Registered led device: rt2800usb-phy0::quality
[   12.766418] usbcore: registered new interface driver rt2800usb
ubuntu@omap:~$ lsmod
Module                  Size  Used by
arc4                    1211  2 
rt2800usb              12562  0 
rt2800lib              45046  1 rt2800usb
crc_ccitt               1525  1 rt2800lib
rt2x00usb              10659  1 rt2800usb
rt2x00lib              39368  3 rt2800usb,rt2800lib,rt2x00usb
mac80211              272168  3 rt2800lib,rt2x00usb,rt2x00lib
cfg80211              169655  2 rt2x00lib,mac80211

EDIT:

Enable the USB options mentioned below in the 3.2.23 Kernel ( apparently doesn't work in 3.3 ) and enable the drivers I mentioned above and it works!

# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 1a40:0101 TERMINUS TECHNOLOGY INC. USB-2.0 4-Port HUB
Bus 001 Device 003: ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter
PhilBot
  • 748
  • 18
  • 85
  • 173
  • I would like to know, whether the beagle board recognizes other USB devices say pen-drive?? – Jeyaram Jul 23 '12 at 10:13
  • No it doesn't with my custom Kernel. If I load Ubuntu on the BeagleBoard and run 'lsusb', then yes it does recognize my hub and wifi dongle. – PhilBot Jul 23 '12 at 12:25
  • It would be wirth comparing the kernel configs from the working full distro and the nonworking custom build. Also note that there is a degree of interchangeability of kenels (provided you put the right modules on the filesystem) so you might be able to start with working kernel sources, customize those, and still have your custom userspace installation. – Chris Stratton Jul 27 '12 at 03:42

1 Answers1

1

I think your kernel has no Host Controller driver configured. I presumed that your usb stick does not blink or light up when you plug it in. It is probably not even powered. Can you check that EHCI or OHCI is configured in your kernel .config? If not, activate them. To be more explicit, if Beagleboard is like pandaboard, you should check that CONFIG_USB_EHCI_HCD_OMAP and CONFIG_USB_EHCI_HCD are enabled.

m-ric
  • 5,621
  • 7
  • 38
  • 51
  • Thanks that helped me be able to list USB devices, please see my revised edit above, now I am trying to load the driver. I'd appreciate any help. – PhilBot Jul 26 '12 at 23:32
  • ok, from EDIT 1, you have enabled USB controller support. So is your USB key recognized now? Can you mount correctly? Verify that before going on with your wifi dongle. – m-ric Jul 27 '12 at 14:35
  • No it's not and I think that is the problem. The same drivers ( rt2800 ) were built in my custom kernel that were loaded when I booted the SD card with Ubuntu. But on Ubuntu when I do lsusb I get the recognized Ralink chipset. In my custom kernel I only get as output of the lsusb "Linux Foundation X.X root hub". I've tried to enable everything I could as far as USB support in the linux-menuconfig. – PhilBot Jul 27 '12 at 18:46
  • elinux says there are some hardware issues on BeagleBoard rev C3: http://elinux.org/BeagleBoard#EHCI. It is worth checking whether your rev C5 is impacted. A google groups thread refers to a patch, that is worth looking at: https://groups.google.com/forum/?fromgroups#!topic/beagleboard/HPCsOu3wprg – m-ric Jul 27 '12 at 21:39
  • Eventually, what kernel version do you use? – m-ric Jul 27 '12 at 21:46
  • I've read about those HW issues too but Ubuntu has no problem on the BeagleBoard with consistently recognizing the wifi device and loading the rt2800.ko driver. I am not configuring something correctly in the custom kernel but I have no idea what. I've tried enabling every USB support option available in menuconfig. When I boot and do an 'lsmod' there are no drivers whatsoever listed. Do I need to do something special to load drivers on boot automatically? Thanks - – PhilBot Jul 28 '12 at 00:01
  • Well thank you for your help - I was able to get it to work enabling those USB options on the 3.2.23 Kernel... I don't know why it didn't work with 3.3. Thanks! – PhilBot Jul 28 '12 at 15:55
  • Ok, I am glad to hear you found a way around. BeagleBoard is getting old now, so there are chances that newest kernels are not fully validated on BbeagleBoard, or that they even break some of its omap configs without notice... – m-ric Jul 30 '12 at 16:12