Error Loading Wlan driver rt2x00lib on BB Green with 4.1

Merry Xmas

I am taking some time on the hollydays to get my BB Green running with BBB MINI = Autopilot is working OK so far

Now I want to use my Ralink 5Ghz USB

root@beaglebone:~# lsusb
Bus 001 Device 003: ID 148f:3572 Ralink Technology, Corp. RT3572 Wireless Adapter
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root@beaglebone:~# lsmod
Module Size Used by
usb_f_ecm 9497 1
g_ether 4790 0
usb_f_rndis 22480 2 g_ether
u_ether 11009 3 usb_f_ecm,usb_f_rndis,g_ether
libcomposite 43291 3 usb_f_ecm,usb_f_rndis,g_ether
ipt_MASQUERADE 1643 1
nf_nat_masquerade_ipv4 2587 1 ipt_MASQUERADE
iptable_nat 1853 1
nf_conntrack_ipv4 13953 1
nf_defrag_ipv4 1601 1 nf_conntrack_ipv4
nf_nat_ipv4 5232 1 iptable_nat
nf_nat 14645 2 nf_nat_ipv4,nf_nat_masquerade_ipv4
nf_conntrack 88457 4 nf_nat,nf_nat_ipv4,nf_nat_masquerade_ipv4,nf_conntrack_ipv4
ip_tables 10928 1 iptable_nat
x_tables 16084 2 ip_tables,ipt_MASQUERADE
arc4 1759 2
spidev 6366 0
rt2800usb 15977 0
rt2800lib 61566 1 rt2800usb
rt2x00usb 10375 1 rt2800usb
rt2x00lib 39647 3 rt2x00usb,rt2800lib,rt2800usb
omap_aes 13057 0
uio_pruss 4582 0
omap_sham 19144 0
mac80211 457670 3 rt2x00lib,rt2x00usb,rt2800lib
omap_rng 4346 0
rng_core 7237 1 omap_rng
cfg80211 378257 2 mac80211,rt2x00lib
crc_ccitt 1584 1 rt2800lib
c_can_platform 6410 0
c_can 9553 1 c_can_platform
can_dev 11401 1 c_can
evdev 7968 1
spi_omap2_mcspi 10472 0
leds_gpio 3094 0
uio_pdrv_genirq 3309 0
uio 8311 2 uio_pruss,uio_pdrv_genirq

I get this error while trying to load manually:

root@beaglebone:~# ifconfig wlan0 up
[ 133.781845] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file ‘rt2870.bin’
[ 133.791602] rt2800usb 1-1.1:1.0: Direct firmware load for rt2870.bin failed with error -2
[ 133.808551] ieee80211 phy0: rt2x00lib_request_firmware: Error - Failed to request Firmware
SIOCSIFFLAGS: No such file or directory

I tried wit both:
Linux beaglebone 4.1.12-ti-r29 #1 SMP PREEMPT Mon Nov 9 22:46:19 UTC 2015 armv7l GNU/Linux (Generic image)

and
Linux beaglebone 4.1.14-bone-rt-r17 #1 Sat Dec 12 11:34:12 UTC 2015 armv7l GNU/Linux (BBBMINI image)

Please note that the driver is loading OK at cold boot , but i have to type ifconfig -a to see it:

wlan0 Link encap:Ethernet HWaddr 00:23:d3:02:ac:02
inet addr:192.168.8.1 Bcast:192.168.8.255 Mask:255.255.255.0
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)

root@beaglebone:~# iw wlan0 info
Interface wlan0
ifindex 4
wdev 0x1
addr 00:23:d3:02:ac:02
type managed
wiphy 0

But I cannot manually reload it (ifconfig wlan0 down/up):

root@beaglebone:~# ifconfig wlan0 up
[ 512.010734] ieee80211 phy0: rt2x00lib_request_firmware: Error - Failed to request Firmware
SIOCSIFFLAGS: No such file or directory

and It cannot load Hostapd :

root@beaglebone:/etc/hostapd# hostapd hostapd.conf -dd
random: Trying to read entropy from /dev/random[ 334.613444] ieee80211 phy0: rt2x00lib_request_firmware: Error - Failed to request Firmware

The other issue is that I cannot set the country code within the kernel with iw reg set US
so it is looping at boot with an error related to the country code:
[ 41.398481] cfg80211: Calling CRDA to update world regulatory domain

This device is working fine on my BB Black with various Kernel release and the device is on a powered USB hub.
The iw reg set command is a little bit marginal and does not seem to works all the time and it is required by the driver
to run on the 5 Ghz Frequency Range

Thank for any help on this

Update:
loaded from original seed (Linux beaglebone 3.8.13-bone71.1) = work OK

Loaded Wheezy
http://builds.beagleboard.org/images/master/08132bf0d0cb284d1148c5d329fe3c8e1aaee44d/bone-debian-7.9-lxde-4gb-armhf-2015-11-12-4gb.img.xz
3.8.13-bone79

Gets lots of errors on startup with eth0

root@beaglebone:~# [ 26.327636] libphy: PHY 4a101000.mdio:01 not found
[ 26.332807] net eth0: phy 4a101000.mdio:01 not found on slave 1
[ 40.179215] libphy: PHY 4a101000.mdio:01 not found
[ 40.184316] net eth0: phy 4a101000.mdio:01 not found on slave 1
[ 40.943943] libphy: PHY 4a101000.mdio:01 not found
[ 40.949119] net eth0: phy 4a101000.mdio:01 not found on slave 1

It finally get connected but network services & hostapd have to be reloaded manually…

mdio:01 isn't populated..

Regards,

Hello Robert,

Is there a way to get rid of this ?

And what bout the problem with 4.1.x ( rt2800usb 1-1.1:1.0: Direct firmware load for rt2870.bin failed with error -2) ?

Best Regards

Resolved: I recreated interface and its ok (corrupted by cut&paste).
Still request help for Kernel 4.1.x Thanks

add that *.bin from:

https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/tree/

to /lib/firmware/

Regards,

Well, we moved one step :slight_smile:

57.594889] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file ‘rt2870.bin’
[ 57.604286] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 109.108
[ 57.616228] ieee80211 phy0: rt2x00lib_request_firmware: Error - Invalid firmware file length (len=57807)

Should I try with other releases ?

odd as:

https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/log/rt2870.bin

git clone git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
--depth=1
sudo cp -v ./linux-firmware/rt2870.bin /lib/firmware/rt2870.bin

Regards,

ALLELUYA !!!

Robert C. Nelson YOU are my Santa Claus :slight_smile:

May I have another request ??
I want to use mjpeg-streamer on this release and I cannot get it to stream with Logitech Webcam C170 (non UVC)
I know that I had to disable the mjpg streamer on the bbb to get it running as YUV under 4.x
like this: ./mjpg_streamer -i “./input_uvc.so -d /dev/video0 -y” -o "./output_http.so -w .$

But it is not working on this release (4.0.8-bone-rt-r8) BBGreen , got any clue ?

Here LSMOD of 3.8
uvcvideo 59360 0
videobuf2_vmalloc 2383 1 uvcvideo

LSMOD 4.0.8
uvcvideo 64315 0
videobuf2_vmalloc 4941 1 uvcvideo
videobuf2_memops 2574 1 videobuf2_vmalloc
videobuf2_core 36309 1 uvcvideo

Thanks for all !!

4.0.8-rt was really a stepping stone to 4.1.x-rt..

sudo apt-get install linux-image-4.1.15-bone-rt-r17

bbbmini should work fine with 4.1.15-bone-rt-r17

Regards,

Yep BBBMini works

mjpeg-streamer does not, I will order a UVC certified cam and meanwhile I am switching to gstreamer , I,ll get an update

Thanks for all Robert