Error Loading Wlan driver rt2x00lib on BB Green with 4.1

242 views
Skip to first unread message

Patrick Poirier

unread,
Dec 25, 2015, 11:45:59 AM12/25/15
to BeagleBoard
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

 

Patrick Poirier

unread,
Dec 28, 2015, 1:36:45 PM12/28/15
to BeagleBoard
Update:
loaded from original seed (Linux beaglebone 3.8.13-bone71.1) = work OK

Loaded Wheezy
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...

Robert Nelson

unread,
Dec 28, 2015, 1:40:39 PM12/28/15
to Beagle Board, Patrick Poirier
On Mon, Dec 28, 2015 at 12:36 PM, Patrick Poirier
<patrickp...@gmail.com> wrote:
> 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,

--
Robert Nelson
https://rcn-ee.com/

Patrick Poirier

unread,
Dec 28, 2015, 1:55:20 PM12/28/15
to BeagleBoard, patrickp...@gmail.com
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

Patrick Poirier

unread,
Dec 28, 2015, 2:10:41 PM12/28/15
to BeagleBoard, patrickp...@gmail.com
Resolved: I recreated interface and its ok (corrupted by cut&paste).
Still request help for Kernel 4.1.x  Thanks

Robert Nelson

unread,
Dec 28, 2015, 2:16:25 PM12/28/15
to Beagle Board, Patrick Poirier
On Mon, Dec 28, 2015 at 12:55 PM, Patrick Poirier
<patrickp...@gmail.com> wrote:
> 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) ?

add that *.bin from:

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

to /lib/firmware/

Patrick Poirier

unread,
Dec 28, 2015, 2:35:22 PM12/28/15
to BeagleBoard, patrickp...@gmail.com
Well, we moved one step :-)

   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 ?

Robert Nelson

unread,
Dec 28, 2015, 2:41:52 PM12/28/15
to Beagle Board, Patrick Poirier
On Mon, Dec 28, 2015 at 1:35 PM, Patrick Poirier
<patrickp...@gmail.com> wrote:
> Well, we moved one step :-)
>
> 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

Patrick Poirier

unread,
Dec 28, 2015, 3:16:13 PM12/28/15
to BeagleBoard, patrickp...@gmail.com
ALLELUYA !!!

Robert C. Nelson YOU are my Santa Claus :-)


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 !!

Robert Nelson

unread,
Dec 28, 2015, 3:21:09 PM12/28/15
to Beagle Board, Patrick Poirier
On Mon, Dec 28, 2015 at 2:16 PM, Patrick Poirier
<patrickp...@gmail.com> wrote:
> ALLELUYA !!!
>
> Robert C. Nelson YOU are my Santa Claus :-)
>
>
> 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

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

Patrick Poirier

unread,
Dec 28, 2015, 4:51:22 PM12/28/15
to BeagleBoard, patrickp...@gmail.com
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
Reply all
Reply to author
Forward
0 new messages