BeagleBone USB Wireless Adapter Configuration

5883 views
Skip to first unread message

Jerrill

unread,
Dec 22, 2011, 11:39:19 AM12/22/11
to Beagle Board
I'm relatively new to Linux in general so if I'm missing something
obvious please let me know. Here's how far I've gotten to getting this
working:

1) I bought an EDUP EP-MS150ND wireless adapter because it was cheap
and said that it supported Linux. When I plug it into the BeagleBone I
can get the following:

root@beaglebone:/etc# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 148f:5370 Ralink Technology, Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

So, it looks to me that it using the RT5370 chip set from Ralink. I've
downloaded the drivers from the following locations:

http://www.edupdriver.com/
http://www.ralinktech.com/en/04_support/support.php?sn=501

However, when I try to build them on the BeagleBone it seems like
there are some source files that its expecting to be there that don't
come with the demo image. I haven't learned enough yet to know how to
build these, so any help on that point would be appreciated, too.

2) Here is the configuration I have so far:

From /etc/network/interfaces:

# Wireless interfaces
iface wlan0 inet dhcp
wireless_mode managed
wireless_essid any
wpa-driver wext
#wpa-driver hostap
wpa-conf /etc/wpa_supplicant.conf

From /etc/wpa_supplicant.conf:
#/etc/wp_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
network={
ssid="redacted ssid name with spaces"
scan_ssid=1
proto=RSN
pairwise=CCMP TKIP
key_mgmt=WPA-PSK
#psk="redacted plaintext psk"
psk=[redacted binary psk generated with wpa_passphrase]
priority=1
}

3) When I do an ifup wlan0 I get the following:

root@beaglebone:~# ifup wlan0
[ 3529.012747] phy0 -> rt2x00lib_request_firmware: Error - Failed to
request Firmware.
Could not set interface wlan0 flags: No such file or directory
Failed to initialize driver interface
[ 3529.054802] phy0 -> rt2x00lib_request_firmware: Error - Failed to
request Firmware.
ifconfig: SIOCSIFFLAGS: No such file or directory

It seems to be there when I do an ifconfig -a though:

wlan0 Link encap:Ethernet HWaddr [redacted MAC address]
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)

Can anyone offer any advice? Thank you in advance for any help!

jbuehl

unread,
Dec 23, 2011, 10:37:21 AM12/23/11
to Beagle Board
You need to get the firmware file and put it in /lib/firmware/rtlwifi/
rtl8712u.bin. I downloaded it from somewhere, but I can't recall
where.

On Dec 22, 8:39 am, Jerrill <jerr...@gmail.com> wrote:
> I'm relatively new to Linux in general so if I'm missing something
> obvious please let me know. Here's how far I've gotten to getting this
> working:
>
> 1) I bought an EDUP EP-MS150ND wireless adapter because it was cheap
> and said that it supported Linux. When I plug it into the BeagleBone I
> can get the following:
>
> root@beaglebone:/etc# lsusb
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 001 Device 002: ID 148f:5370 Ralink Technology, Corp.
> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>
> So, it looks to me that it using the RT5370 chip set from Ralink. I've
> downloaded the drivers from the following locations:
>
> http://www.edupdriver.com/http://www.ralinktech.com/en/04_support/support.php?sn=501

Jerrill

unread,
Dec 23, 2011, 12:54:52 PM12/23/11
to Beagle Board
I downloaded the files from the following location:

http://packages.debian.org/sid/firmware-realtek

I just copied the entire contents over to the BeagleBone SD card, but
it still does not work.

root@beaglebone:/lib/firmware/rtlwifi# ls
rtl8192cfw.bin rtl8192cufw.bin rtl8192defw.bin rtl8192sefw.bin
rtl8712u.bin

root@beaglebone:/lib/firmware/rtlwifi# ifup wlan0
[ 113.451456] phy0 -> rt2x00lib_request_firmware: Error - Failed to
request Firmware.
Could not set interface wlan0 flags: No such file or directory
Failed to initialize driver interface
[ 113.494436] phy0 -> rt2x00lib_request_firmware: Error - Failed to
request Firmware.
ifconfig: SIOCSIFFLAGS: No such file or directory

Are there any additional steps that I need to take to tell the OS
where to look for the file.

Also, how could I tell which firmware file name it's looking for.
"Realtek" is not "Ralink" so I wouldn't have though to try these
files. Educate me please! :-)

Thank you for any help in advance!
Jerrill

On Dec 23, 10:37 am, jbuehl <jbu...@gmail.com> wrote:
> You need to get the firmware file and put it in /lib/firmware/rtlwifi/
> rtl8712u.bin.  I downloaded it from somewhere, but I can't recall
> where.
>
> On Dec 22, 8:39 am, Jerrill <jerr...@gmail.com> wrote:
>
>
>
>
>
>
>
> > I'm relatively new to Linux in general so if I'm missing something
> > obvious please let me know. Here's how far I've gotten to getting this
> > working:
>
> > 1) I bought an EDUP EP-MS150ND wireless adapter because it was cheap
> > and said that it supported Linux. When I plug it into the BeagleBone I
> > can get the following:
>
> > root@beaglebone:/etc# lsusb
> > Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> > Bus 001 Device 002: ID 148f:5370 Ralink Technology, Corp.
> > Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>
> > So, it looks to me that it using the RT5370 chip set from Ralink. I've
> > downloaded the drivers from the following locations:
>
> >http://www.edupdriver.com/http://www.ralinktech.com/en/04_support/sup...

jbuehl

unread,
Dec 23, 2011, 1:01:42 PM12/23/11
to Beagle Board
Sorry, I didn't read your post carefully. Yes, ralink is different
from realtek. I guess the ralink firmware would be named something
like rt****.bin. I see a bunch of them in /lib/firmware/ on my Fedora
system.

Jerrill

unread,
Dec 23, 2011, 2:44:39 PM12/23/11
to Beagle Board
I had an Ubuntu 11.10 system handy and copied the entire /lib/
firmware/ folder over to the BeagleBone taking care not to overwrite
the files that were already there. I got the following:

root@beaglebone:~# ifup wlan0
[ 72.140395] phy0 -> rt2x00usb_vendor_request: Error - Vendor
Request 0x07 failed for offset 0x1340 with error -110.
[ 122.150398] phy0 -> rt2x00usb_vendor_request: Error - Vendor
Request 0x06 failed for offset 0x1340 with error -110.
[ 172.160399] phy0 -> rt2x00usb_vendor_request: Error - Vendor
Request 0x06 failed for offset 0x1608 with error -110.
^C
root@beaglebone:~#

The error message just continues coming up though. I tried ifconfig -a
and it hung and I'm getting the following periodically...

[ 1200.160395] INFO: task ifconfig:308 blocked for more than 120
seconds.
[ 1200.167293] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
disables this message.

And I can't get back to the command prompt at this point... back to
the drawing board. Fortunately I have an SD card reader and can fix
it.

I'll see what it takes to get the wireless adapter running on the
Ubuntu machine and post back. Jump in if you have any other ideas!

Jerrill

unread,
Dec 23, 2011, 10:44:12 PM12/23/11
to Beagle Board
I cracked open the USB dongle and confirmed that the chip set used was
indeed the Ralink RT5370. There was some confusion online about the
chip set used for this manufacturer part number. It appears that the
manufacturer had used other chip sets (including Realtek) for the same
part number, but the Ralink RT5370 is definitely what I have.

So, I proceeded to successfully build and install the drivers on my
Ubuntu 11.10 machine as follows:

1) make the following edits to /os/linux/config.mk
HAS_WPA_SUPPLICANT=y'
HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y

2) sudo su

3) make

4) make install

5) modprobe rt5370sta

6) ifconfig -a

...
ra0 Link encap:Ethernet HWaddr [redacted MAC address]
inet6 addr: [redacted IPv6 Address] Scope:Link
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:828 (828.0 B) TX bytes:1600 (1.6 KB)
...

7) iwlist ra0 scan

ra0 Scan completed :
Cell 01 - Address: 00:11:50:58:D9:27
Protocol:802.11b/g
ESSID:[my SSID quoted with spaces]
Mode:Managed
Frequency:2.437 GHz (Channel 6)
Quality=83/100 Signal level=-57 dBm Noise
level=-92 dBm
Encryption key:on
Bit Rates:54 Mb/s
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
...

So, now back to the BeagleBone... When I try to reproduce this on the
BeagleBone I get the following:

root@beaglebone:~/drivers/wlan/rt5370# make
make -C tools
make[1]: Entering directory `/home/root/drivers/wlan/rt5370/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory `/home/root/drivers/wlan/rt5370/tools'
/home/root/drivers/wlan/rt5370/tools/bin2h
cp -f os/linux/Makefile.6 /home/root/drivers/wlan/rt5370/os/linux/
Makefile
make -C /lib/modules/3.1.0+/build SUBDIRS=/home/root/drivers/wlan/
rt5370/os/linux modules
make: *** /lib/modules/3.1.0+/build: No such file or directory. Stop.
make: *** [LINUX] Error 2
root@beaglebone:~/drivers/wlan/rt5370#

Looking at this file location, I see the following...

root@beaglebone:~/drivers/wlan/rt5370# ls /lib/modules/3.1.0+/
kernel modules.dep.bin modules.ofmap
modules.symbols.bin
modules.alias modules.devname modules.pcimap
modules.usbmap
modules.alias.bin modules.ieee1394map modules.seriomap
modules.ccwmap modules.inputmap modules.softdep
modules.dep modules.isapnpmap modules.symbols
root@beaglebone:~/drivers/wlan/rt5370#

I created the folder and tried again...

root@beaglebone:~/drivers/wlan/rt5370# mkdir /lib/modules/3.1.0+/build
root@beaglebone:~/drivers/wlan/rt5370# make
make -C tools
make[1]: Entering directory `/home/root/drivers/wlan/rt5370/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory `/home/root/drivers/wlan/rt5370/tools'
/home/root/drivers/wlan/rt5370/tools/bin2h
cp -f os/linux/Makefile.6 /home/root/drivers/wlan/rt5370/os/linux/
Makefile
make -C /lib/modules/3.1.0+/build SUBDIRS=/home/root/drivers/wlan/
rt5370/os/linux modules
make[1]: Entering directory `/lib/modules/3.1.0+/build'
make[1]: *** No rule to make target `modules'. Stop.
make[1]: Leaving directory `/lib/modules/3.1.0+/build'
make: *** [LINUX] Error 2
root@beaglebone:~/drivers/wlan/rt5370#

This is how far I've gotten... I'm open to any words of wisdom. Thank
you again.

Frank Phillips

unread,
Dec 25, 2011, 5:30:49 PM12/25/11
to beagl...@googlegroups.com

In /lib/modules, "build" is usually a symlink to to the kernel source
in /usr/src. I don't see it packaged, but you can get it from
kernel.org.

Beagle Board

unread,
Dec 23, 2011, 12:40:40 PM12/23/11
to beagl...@googlegroups.com
I have a REV C Beagleboard and the demo image shipped with the unit would not allow us to use CMEM without barfing. As such, I have downloaded a image and no matter what I try it hangs indefinitely at


[ 3150.767059] usb0: link up, 100Mbps, full-duplex, lpa 0x45E1


Pinging causes this. I am trying to build a video streamer. The basic image boots fine but then I have all these packages to install.

[ 3697.230651] Alignment trap in kernel: swapper (0) PC=0xc043a2d4 Instr=0xe8930003 Address=0xdf08802a FSR 0x001
[ 3698.229125] Alignment trap in kernel: swapper (0) PC=0xc043a2d4 Instr=0xe8930003 Address=0xdf08002a FSR 0x001
[ 3699.230346] Alignment trap in kernel: swapper (0) PC=0xc043a2d4 Instr=0xe8930003 Address=0xdf11802a FSR 0x001

I was under the impression that all this Angstrom stuff is at least stable? I cannot get past this point no matter what I try and I am at a point, after messing for a month with another OMAP board, that this stuff will not work. I have no desire to build new kernels, I have a specific goal and I am deeply frustrated at how difficult this has been to get a fully functioning platform...

Dave

Jerrill

unread,
Dec 27, 2011, 10:08:15 PM12/27/11
to Beagle Board
I decided to give cross-compiling the module on my Ubuntu machine a
shot.

I started off getting the Angstrom SD card image to build to confirm
that things are working:

Install Bitbake from the Ubuntu Software Center
sudo apt-get install build-essential
sudo apt-get install diffstat
sudo apt-get install texi2html
sudo apt-get install texinfo
sudo apt-get install gawk
sudo apt-get install chrpath
sudo apt-get install lzop
mkdir angstrom
cd angstrom
git clone git://git.angstrom-distribution.org/setup-scripts
cd setup-scripts
git checkout origin/oe-core -b oe-core
./oebb.sh config beaglebone
MACHINE=beaglebone ./oebb.sh bitbake systemd-image
MACHINE=beaglebone ./oebb.sh bitbake virtual/kernel

I was also able to use Bitbake to compile a simple "Hello, World!"
application that was was able to load and execute on the BeagleBone.

So I tried to build a Bitbake recipe around the Makefile for the
driver build. Here it is:

DESCRIPTION = "RT5370 Kernel Module"
SECTION = "kernel/modules"
PRIORITY = "optional"
LICENSE = "CLOSED"
RDEPENDS = "kernel (${KERNEL_VERSION})"
DEPENDS = "virtual/kernel"
PR = "r0"
SRC_URI = ""
S = "${WORKDIR}"
inherit module

When I run it I get the following:

jerrill@JerrillUbuntuLT:~/projects/angstrom/setup-scripts$ bitbake
rt5370
Loading cache: 100% |###########################################|
ETA: 00:00:00
Loaded 1891 entries from dependency cache.
Parsing recipes: 100% |#########################################|
Time: 00:00:01
Parsing of 1467 .bb files complete (1466 cached, 1 parsed). 1889
targets, 76 skipped, 0 masked, 0 errors.

OE Build Configuration:
BB_VERSION = "1.15.0"
TARGET_ARCH = "arm"
TARGET_OS = "linux-gnueabi"
MACHINE = "beaglebone"
DISTRO = "angstrom"
DISTRO_VERSION = "v2011.12-core"
TUNE_FEATURES = "armv7a vfp neon cortexa8"
TARGET_FPU = "vfp-neon"
meta-angstrom = "master:f0f99ea3cd132a6a69a9f4bad22da55403f9f940"
meta-oe
meta-efl
meta-gpe
meta-gnome
meta-xfce = "master:2642db3615ea2d4196b9c73537d9ebff6c57de2d"
meta-ti = "master:1f506217992776b7f07983240e497cf6e068fc80"
meta-ettus = "master:f097bb61772d07610d84a668dc19a47e180962b3"
meta-efikamx = "master:2ef47fdd4e8232d766c0c63d9427253ee56e31d0"
meta-nslu2 = "master:17853811179f2760791c6b138f96e9dd15493517"
meta-htc
meta-nokia
meta-openmoko
meta-palm = "master:0166243d2bc87124c8db2868b57df5d166f9ffaa"
meta-sugarbay
meta-crownbay
meta-emenlow
meta-fishriver
meta-jasperforest
meta-n450 = "master:7c3db7010479970f3f92501349827c517de3c36a"
meta = "master:8f348ccad083d6c02c200652ff6295e701e88f0d"

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 1100 of 1109 (ID: 8, /home/jerrill/projects/
angstrom/setup-scripts/sources/openembedded-core/meta/recipes-jerrill/
rt5370/rt5370_0.0.bb, do_compile)
NOTE: package rt5370-0.0-r0: task do_compile: Started
ERROR: Function 'do_compile' failed (see /home/jerrill/projects/
angstrom/setup-scripts/build/tmp-angstrom_2010_x-eglibc/work/
beaglebone-angstrom-linux-gnueabi/rt5370-0.0-r0/temp/log.do_compile.
17742 for further information)
ERROR: Logfile of failure stored in: /home/jerrill/projects/angstrom/
setup-scripts/build/tmp-angstrom_2010_x-eglibc/work/beaglebone-
angstrom-linux-gnueabi/rt5370-0.0-r0/temp/log.do_compile.17742
Log data follows:
| ERROR: Function 'do_compile' failed (see /home/jerrill/projects/
angstrom/setup-scripts/build/tmp-angstrom_2010_x-eglibc/work/
beaglebone-angstrom-linux-gnueabi/rt5370-0.0-r0/temp/log.do_compile.
17742 for further information)
| + cd /home/jerrill/projects/angstrom/setup-scripts/build/tmp-
angstrom_2010_x-eglibc/work/beaglebone-angstrom-linux-gnueabi/
rt5370-0.0-r0
| + do_compile
| + module_do_compile
| + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
| + oe_runmake KERNEL_PATH=/home/jerrill/projects/angstrom/setup-
scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/beaglebone/kernel
KERNEL_SRC=/home/jerrill/projects/angstrom/setup-scripts/build/tmp-
angstrom_2010_x-eglibc/sysroots/beaglebone/kernel
KERNEL_VERSION=3.1.0+ 'CC=arm-angstrom-linux-gnueabi-gcc -mno-thumb-
interwork -marm -mno-thumb-interwork -mno-thumb' 'LD=arm-angstrom-
linux-gnueabi-ld ' 'AR=arm-angstrom-linux-gnueabi-ar '
| + '[' xmake = x ']'
| + bbnote make -j2 -e MAKEFLAGS= KERNEL_PATH=/home/jerrill/projects/
angstrom/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/
beaglebone/kernel KERNEL_SRC=/home/jerrill/projects/angstrom/setup-
scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/beaglebone/kernel
KERNEL_VERSION=3.1.0+ 'CC=arm-angstrom-linux-gnueabi-gcc -mno-thumb-
interwork -marm -mno-thumb-interwork -mno-thumb' 'LD=arm-angstrom-
linux-gnueabi-ld ' 'AR=arm-angstrom-linux-gnueabi-ar '
| + echo 'NOTE: make -j2 -e MAKEFLAGS= KERNEL_PATH=/home/jerrill/
projects/angstrom/setup-scripts/build/tmp-angstrom_2010_x-eglibc/
sysroots/beaglebone/kernel KERNEL_SRC=/home/jerrill/projects/angstrom/
setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/beaglebone/
kernel KERNEL_VERSION=3.1.0+ CC=arm-angstrom-linux-gnueabi-gcc -mno-
thumb-interwork -marm -mno-thumb-interwork -mno-thumb LD=arm-angstrom-
linux-gnueabi-ld AR=arm-angstrom-linux-gnueabi-ar '
| NOTE: make -j2 -e MAKEFLAGS= KERNEL_PATH=/home/jerrill/projects/
angstrom/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/
beaglebone/kernel KERNEL_SRC=/home/jerrill/projects/angstrom/setup-
scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/beaglebone/kernel
KERNEL_VERSION=3.1.0+ CC=arm-angstrom-linux-gnueabi-gcc -mno-thumb-
interwork -marm -mno-thumb-interwork -mno-thumb LD=arm-angstrom-linux-
gnueabi-ld AR=arm-angstrom-linux-gnueabi-ar
| + make -j2 -e MAKEFLAGS= KERNEL_PATH=/home/jerrill/projects/angstrom/
setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/beaglebone/
kernel KERNEL_SRC=/home/jerrill/projects/angstrom/setup-scripts/build/
tmp-angstrom_2010_x-eglibc/sysroots/beaglebone/kernel
KERNEL_VERSION=3.1.0+ 'CC=arm-angstrom-linux-gnueabi-gcc -mno-thumb-
interwork -marm -mno-thumb-interwork -mno-thumb' 'LD=arm-angstrom-
linux-gnueabi-ld ' 'AR=arm-angstrom-linux-gnueabi-ar '
| make: *** No targets specified and no makefile found. Stop.
| + die 'oe_runmake
NOTE: package rt5370-0.0-r0: task do_compile: Failed
ERROR: Task 8 (/home/jerrill/projects/angstrom/setup-scripts/sources/
openembedded-core/meta/recipes-jerrill/rt5370/rt5370_0.0.bb,
do_compile) failed with exit code '1'
ERROR: '/home/jerrill/projects/angstrom/setup-scripts/sources/
openembedded-core/meta/recipes-jerrill/rt5370/rt5370_0.0.bb' failed
jerrill@JerrillUbuntuLT:~/projects/angstrom/setup-scripts$

It appears that it isn't copying the source from the source folder to
the build folder. But I'm still trying to figure out the problem. I'm
sure it has to do with the SRC_URI value, but even when I specify the
Makefile, it doesn't seem to get copied.

Thanks for any input anyone can offer!
Jerrill
> > > > > >           TX packets:0 errors:0 dropped:0...
>
> read more »
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Jerrill

unread,
Dec 28, 2011, 2:55:09 PM12/28/11
to Beagle Board
I copied the kernel source generated when I built the SD card image to
the BeagleBone from the following folder:
/home/jerrill/projects/angstrom/setup-scripts/build/tmp-
angstrom_2010_x-eglibc/sysroots/beaglebone/kernel



and created the /lib/modules/3.1.0+/build symlink to /usr/src/linux.



Also there were a couple of binaries that wouldn't run on ARM and
needed to be rebuilt as well because they were apparently built on the
Ubuntu machine, but that was fairly trivial using gcc. make complained
about them and I fixed them as they came up.



At any rate, I was FINALLY able to build the driver on the BeagleBone
board to get the rt5370sta.ko file I needed. I successfully used
modprobe rt5370sta to install the module.



Now, for the next problem...



Immediately following a reboot without the wireless USB adapter
plugged in, I get the following:



root@beaglebone:~# lsmod

Module                  Size  Used by

g_mass_storage         24072  0

ipv6                  209417  14

root@beaglebone:~#



After inserting the wireless USB adapter, I get the following:



root@beaglebone:~# lsmod

Module                  Size  Used by

arc4                    1115  2

rt2800usb              11258  0

rt2800lib              34213  1 rt2800usb

rt2x00usb               9197  1 rt2800usb

rt2x00lib              32007  3 rt2800usb,rt2800lib,rt2x00usb

mac80211              140379  3 rt2800lib,rt2x00usb,rt2x00lib

cfg80211              120716  2 rt2x00lib,mac80211

rfkill                 14301  1 cfg80211

rt5370sta             566248  0

g_mass_storage         24072  0

ipv6                  209417  14

root@beaglebone:~#



However, I still get the following:



root@beaglebone:~# ifup wlan0

[  161.181627] phy0 -> rt2x00lib_request_firmware: Error - Failed
to request Firmware.Could not set interface wlan0 flags: No such file
or directoryFailed to initialize driver interface

[  161.232083] phy0 -> rt2x00lib_request_firmware: Error - Failed
to request Firmware.ifconfig: SIOCSIFFLAGS: No such file or directory

root@beaglebone:~#



So, it looks like it's still loading the wrong driver for the device
IN ADDITION to the correct one. This is the next problem I have to
educate myself on how to resolve. If anyone has any advice on where to
head to resolve this to save me some searching and self-education I'd
appreciate it. If not, I'll report back when I get it figured out to
hopefully save someone else a few days worth of work.



Thanks in advance.

Jerrill
> > Looking at this file location, I see the following......
>
> read more »

jbuehl

unread,
Dec 28, 2011, 4:43:30 PM12/28/11
to Beagle Board
You could try deleting the driver that you don't want from the
filesystem. I got to the point of doing that in my saga trying to get
the Realtek driver to work. After compiling a different one it was
still loading the old one, so I deleted it. Unfortunately that's when
my bone totally croaked and I had to send it back. I haven't had the
time or the energy to get back to it yet.
> ...
>
> read more »

Jerrill

unread,
Dec 28, 2011, 10:12:51 PM12/28/11
to Beagle Board
It turns out that there were multiple entries for the VID PID of my
USB device showing in /lib/modules/3.1.0+/modules.alias.

I created a blacklist file to prevent the rt2800usb driver as follows:

root@beaglebone:~# cat /etc/modprobe.d/blacklist.conf
blacklist rt2800usb
root@beaglebone:~#

Now, lsmod show the following after I insert the USB wireless adapter:

root@beaglebone:~# lsmod
Module Size Used by
rt5370sta 566248 0
g_mass_storage 24072 0
ipv6 209417 14
root@beaglebone:~#

However, the device still didn't show up in ifconfig -a. I checked
dmesg to see what happened after I inserted the device. Here's a diff
of the pre-insert and post-insert dmesg notifications:

[ 144.780343] usb 1-1: new high speed USB device number 2 using musb-
hdrc
[ 144.937601] usb 1-1: New USB device found, idVendor=148f,
idProduct=5370
[ 144.937627] usb 1-1: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[ 144.937646] usb 1-1: Product: 802.11 n WLAN
[ 144.937660] usb 1-1: Manufacturer: Ralink
[ 144.937673] usb 1-1: SerialNumber: 1.0
[ 145.066922] rtusb init rt2870 --->
[ 145.067827]
[ 145.067833]
[ 145.067838] === pAd = d0944000, size = 518280 ===
[ 145.067846]
[ 145.069431] <-- ERROR in Alloc Bulk buffer for RxContext!
[ 145.069446] ---> RTMPFreeTxRxRingMemory
[ 145.069641] <--- RTMPFreeTxRxRingMemory
[ 145.069652] ERROR!!! Failed to allocate memory - TxRxRing
[ 145.070128] <-- RTMPAllocAdapterBlock, Status=3
[ 145.070180] rt2870: probe of 1-1:1.0 failed with error -1
[ 145.070379] usbcore: registered new interface driver rt2870

So close! Yet, so far away!
> > > setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/beaglebone/...
>
> read more »

Jerrill

unread,
Dec 29, 2011, 12:34:50 AM12/29/11
to Beagle Board
I had to reduce the size of some of the buffers to get the module to
load. Here's a diff file of the changes I made.

root@beaglebone:~/drivers/wlan/rt5370/include# diff rtmp_def.h
rtmp_def.h.orig
73,74c73,74
< #define TX_RING_SIZE 4 /* 1 */
< #define PRIO_RING_SIZE 4
---
> #define TX_RING_SIZE 8 /* 1 */
> #define PRIO_RING_SIZE 8
79c79
< #define RX_RING_SIZE 4
---
> #define RX_RING_SIZE 8
82c82
< #define LOCAL_TXBUF_SIZE 1024
---
> #define LOCAL_TXBUF_SIZE 2048
90d89
< #define MEMORY_OPTIMIZATION
root@beaglebone:~/drivers/wlan/rt5370/include#

After I recompiled I just copied from:

/home/root/drivers/wlan/rt5370/os/linux/rt5370sta.ko

to:

/lib/modules/3.1.0+/kernel/drivers/net/wireless/rt5370sta.ko

and rebooted.

Thanks to everyone for their help and I hope this thread saves someone
some headache later.
Jerrill
> > > > | + oe_runmake KERNEL_PATH=/home/jerrill/projects/angstrom/setup-...
>
> read more »

irvanj...@gmail.com

unread,
Mar 30, 2012, 4:48:03 AM3/30/12
to beagl...@googlegroups.com
hi jerill,
I'm new in linux especially BeagleBoard
I have BBxM rev C installed with angstrom kernel 3.0.4+ and want to enable wireless adapter TP-Link TL-WN321G
but till now i couldnt do that, I begin to feel pain in my head now,,

when I type ifconfig, it yields nothing for wlan,
and when I try to ifup wlan0, it shows :

Error for wireless request "Set Mode" (8B06) :
    SET failed on device wlan0 ; No such device.
Error for wireless request "Set Frequency" (8B04) :
    SET failed on device wlan0 ; No such device.
Error for wireless request "Set ESSID" (8B1A) :
    SET failed on device wlan0 ; No such device.
SIOCSIFADDR: No such device
wlan0: unknown interface: No such device
SIOCSIFNETMASK: No such device
SIOCGIFADDR: No such device
SIOCSIFBROADCAST: No such device
wlan0: unknown interface: No such device
Failed to bring up wlan0.

it seems, angstrom couldnt generate the usb wireless.
thank you very much for your helping

Jerrill

unread,
Apr 12, 2012, 11:24:00 PM4/12/12
to beagl...@googlegroups.com
It looks like you don't have a driver on your system that supports your wlan card or that it isn't configured correctly.

Run lsusb to get the VID:PID of your device. In my case it's 148f:5370.

# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 148f:5370 Ralink Technology, Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

You need to determine if a driver compatible with your device is on your system via the modules.alias file.

# cat /lib/modules/3.2.14/modules.alias | grep "v148Fp5370"
alias usb:v148Fp5370d*dc*dsc*dp*ic*isc*ip* rt2800usb

NOTE: Your folder names may be different if you haven't updated lately.

My system tells me that this VID:PID is supported by the rt2800usb module. I tried to make this module work, but wasn't ever successful. I ultimately cracked open the device, got the chip set ID, went to Ralink's website and downloaded the linux drivers specific to my device and learned how to build it. I had to blacklist the rt2800usb driver because it kept trying to load that one instead of the other when I inserted the usb wlan device.

The ultimate goal is to get the CORRECT driver to show up automatically under lsmod when you insert the wlan device after a reboot:

# lsmod 
Module                  Size  Used by 
rt5370sta             566248  0 

Once you get that far, then you have to get the network setting configured for your access point. Check back when you get there or if you get stuck on the way.

Hope that helps,
Jerrill

ingha...@googlemail.com

unread,
Aug 19, 2013, 2:10:13 PM8/19/13
to beagl...@googlegroups.com
Dear Jerrill,

It looks like you have the driver file I need - any chance you could send me your compiled driver file?

It looks easier than the pain you went through to 'make it'., 

I can then just do the install. Post here would be useful for all of us running round with the maplin wireless card!

thank you - Andrew

jhuotd...@gmail.com

unread,
Sep 25, 2013, 11:51:21 AM9/25/13
to beagl...@googlegroups.com, ingha...@googlemail.com
Hi,

I'm also interested by this driver ! 

Thank you 

Julien

christopher.fr...@gmail.com

unread,
Oct 17, 2013, 10:05:42 PM10/17/13
to beagl...@googlegroups.com, ingha...@googlemail.com, jhuotd...@gmail.com
Hello all,

Is it also possible for me to get a copy of the driver for the Ralink RT5370 for my BBB?

I appreciate it greatly,
C

juancma...@gmail.com

unread,
Dec 13, 2013, 6:43:03 PM12/13/13
to beagl...@googlegroups.com
Hi Jerril, i compile drivers for rt5370 with a cross compiler, then i have the file rt5370sta.ko. But i don't know what i do. Could you help me?

John Syne

unread,
Dec 13, 2013, 7:42:05 PM12/13/13
to beagl...@googlegroups.com

On 12/13/13, 3:43 PM, "juancma...@gmail.com"
<juancma...@gmail.com> wrote:

>Hi Jerril, i compile drivers for rt5370 with a cross compiler, then i
>have the file rt5370sta.ko. But i don't know what i do. Could you help me?
sudo modprobe rt5370sta
The do the following to see that it was installed correctly
lsmod
If you see rt5370sta in the list, it was installed correctly.

Regards,
John

>
>--
>For more options, visit http://beagleboard.org/discuss
>---
>You received this message because you are subscribed to the Google Groups
>"BeagleBoard" group.
>To unsubscribe from this group and stop receiving emails from it, send an
>email to beagleboard...@googlegroups.com.
>For more options, visit https://groups.google.com/groups/opt_out.


juancma...@gmail.com

unread,
Dec 16, 2013, 2:23:06 AM12/16/13
to beagl...@googlegroups.com
Hi Jhon, thank you for your reply.
The problem is that I cmoplied the driver in ubuntu, then I don't know what files must be copy in my beaglebone.
Do you know what i mean?
regadrs.
Juan C.

juancma...@gmail.com

unread,
Dec 16, 2013, 2:27:44 AM12/16/13
to beagl...@googlegroups.com


El sábado, 14 de diciembre de 2013 01:42:05 UTC+1, John Syne escribió:

Hi Jhon, thank you for your reply.
I compiled the driver in ubuntu, but I don´t know what files must be copy in my beaglebone?
regards.
Juan C.

benjamin...@gmail.com

unread,
Jan 21, 2014, 4:46:49 PM1/21/14
to beagl...@googlegroups.com, ingha...@googlemail.com, jhuotd...@gmail.com, christopher.fr...@gmail.com
Hi everyone,

I've also been trying to get the Ralink RT5370 chipset in the Maplin N150 to work for my BBB.
Could I also have a copy of the driver please?

Thanks for putting all the hard work in and posting about it.
Ben
Reply all
Reply to author
Forward
0 new messages