Guest sandmen Posted July 29, 2015 Posted July 29, 2015 Gent's currently I run Igor's Debian Image on a BananaPi (kernel 3.4.105). I want to add the wifi driver for Ralink_RT5527. What is to do? Here my thoughts, - install header's - pull sunxi-kernel - copy config from running kernel - make menuconfig - add the driver - make correct ? Regards
Igor Posted July 29, 2015 Posted July 29, 2015 No. Everything is prepared until: "Get driver source & type make ARCH=arm" From there you are on your own. I can guarantee that the driver will work. Install part is also on your own / from the driver if exits. P.S. But there is a driver already on the system: rt2500usb rt2800lib rt2800usb rt2x00lib rt2x00usb
Guest sandmen Posted July 31, 2015 Posted July 31, 2015 modprobe rt2800usb is loading, and usbcore say's register device. But nothing more. :-( No wifi device available. iw list is empty... Any hints? ralink-firmware is installed.
kernelpaniclite Posted November 22, 2015 Posted November 22, 2015 Same here. "lshw", "lsusb -t" and dmesg see the device recognized but no driver is applied. Firmware-Ralink package is also installed. Device output from "lsusb" is "Bus 002 Device 005: ID 148f:5572 Ralink Technology, Corp. RT5572 Wireless Adapter". Haven't looked at the kernelconfig yet, could it be a old version of the driver?
zador.blood.stained Posted November 22, 2015 Posted November 22, 2015 @kernelpaniclite, what is your kernel version? And please post output of "lsmod" and "dmesg | grep usb" here.
kernelpaniclite Posted November 23, 2015 Posted November 23, 2015 (edited) I have currently an edimax usb wifi dongle rt8192cu and the mentioned ralink one attached. lsmod: root@cubieboard2:~# lsmod Module Size Used by cpufreq_userspace 3524 0 snd_usb_audio 99287 0 snd_hwdep 5811 1 snd_usb_audio snd_usbmidi_lib 17859 1 snd_usb_audio snd_seq_midi 4682 0 snd_seq_midi_event 6339 1 snd_seq_midi snd_seq 51584 2 snd_seq_midi_event,snd_seq_midi snd_rawmidi 20567 2 snd_usbmidi_lib,snd_seq_midi snd_seq_device 6371 3 snd_seq,snd_rawmidi,snd_seq_midi 8192cu 454584 0 bnep 14462 2 sunxi_ir 4037 0 hidp 17640 0 rfcomm 58686 0 hci_uart 25000 0 bluetooth 264185 12 bnep,hidp,hci_uart,rfcomm "dmesg | grep usb": [ 0.392114] usbcore: registered new interface driver usbfs [ 0.396439] usbcore: registered new interface driver hub [ 0.400615] usbcore: registered new device driver usb [ 0.435010] [usb_manager]: CONFIG_USB_SW_SUNXI_USB0_OTG [ 0.438802] [sw_hcd0]: usb host driver initialize........ [ 0.443020] [sw_hcd0]: open_usb_clock [ 0.468245] [sw_hcd0]: platform is usb host [ 0.513155] [sw_hcd0]: sw_usb_host0_disable start [ 0.530011] [sw_hcd0]: close_usb_clock [ 0.532475] [sw_hcd0]: sw_usb_host0_disable end [ 1.428009] usbcore: registered new interface driver usb-storage [ 1.436526] usbcore: registered new interface driver ums-alauda [ 1.441526] usbcore: registered new interface driver ums-cypress [ 1.446550] usbcore: registered new interface driver ums-datafab [ 1.451721] usbcore: registered new interface driver ums_eneub6250 [ 1.457175] usb 2-1: new high-speed USB device number 2 using sw-ehci [ 1.462141] usbcore: registered new interface driver ums-freecom [ 1.467078] usbcore: registered new interface driver ums-isd200 [ 1.472182] usbcore: registered new interface driver ums-jumpshot [ 1.477032] usbcore: registered new interface driver ums-karma [ 1.482119] usbcore: registered new interface driver ums-onetouch [ 1.487148] usbcore: registered new interface driver ums-realtek [ 1.492059] usbcore: registered new interface driver ums-sddr09 [ 1.496990] usbcore: registered new interface driver ums-sddr55 [ 1.501815] usbcore: registered new interface driver ums-usbat [ 1.761780] usbcore: registered new interface driver usbhid [ 1.764604] usbhid: USB HID core driver [ 1.939510] usb 2-1.1: new high-speed USB device number 3 using sw-ehci [ 2.144246] usb 2-1.2: new full-speed USB device number 4 using sw-ehci [ 2.261712] input: C-Media USB Headphone Set as /devices/platform/sw-ehci.1/usb2/2-1/2-1.2/2-1.2:1.3/input/input1 [ 2.273398] generic-usb 0003:0D8C:000C.0001: input,hidraw0: USB HID v1.00 Device [C-Media USB Headphone Set ] on usb-sw-ehci-1.2/input3 [ 7.238643] ERR: script_parser_fetch usb_controller_type failed [ 7.770111] usbcore: registered new interface driver rtl8192cu [ 7.874895] usbcore: registered new interface driver snd-usb-audio [ 549.444389] usb 2-1.3: new high-speed USB device number 5 using sw-ehci [ 789.076039] usb 2-1.3: USB disconnect, device number 5 [89774.141031] usb 2-1.3: new high-speed USB device number 6 using sw-ehci "uname -a": Linux cubieboard2 3.4.109-sun7i #5 SMP PREEMPT Wed Oct 14 20:33:00 CEST 2015 armv7l armv7l armv7l GNU/Linux Edited November 23, 2015 by kernelpaniclite
zador.blood.stained Posted November 23, 2015 Posted November 23, 2015 Well, rt2800usb module is not loaded. What if you try to load it manually (insmod rt2800usb)?
kernelpaniclite Posted November 24, 2015 Posted November 24, 2015 Thank you for your interest:-) root@cubieboard2:~# lsmod Module Size Used by rt2800usb 13671 0 rt2800lib 48693 1 rt2800usb rt2x00usb 11033 1 rt2800usb rt2x00lib 41780 3 rt2x00usb,rt2800lib,rt2800usb mac80211 245765 3 rt2x00lib,rt2x00usb,rt2800lib sg 23765 0 cpufreq_userspace 3524 0 snd_usb_audio 99287 0 snd_hwdep 5811 1 snd_usb_audio snd_usbmidi_lib 17859 1 snd_usb_audio snd_seq_midi 4682 0 snd_seq_midi_event 6339 1 snd_seq_midi snd_seq 51584 2 snd_seq_midi_event,snd_seq_midi snd_rawmidi 20567 2 snd_usbmidi_lib,snd_seq_midi snd_seq_device 6371 3 snd_seq,snd_rawmidi,snd_seq_midi 8192cu 454584 0 bnep 14462 2 sunxi_ir 4037 0 hidp 17640 0 rfcomm 58686 0 hci_uart 25000 0 bluetooth 264185 12 bnep,hidp,hci_uart,rfcomm root@cubieboard2:~# lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 006: ID 148f:5572 Ralink Technology, Corp. RT5572 Wireless Adapter Bus 002 Device 004: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter Bus 002 Device 003: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS] Bus 002 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub root@cubieboard2:~# lsusb -t /: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=sw-ohci/1p, 12M /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=sw-ehci/1p, 480M /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=sw-ohci/1p, 12M /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=sw-ehci/1p, 480M |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=rtl8192cu, 480M |__ Port 2: Dev 4, If 0, Class=Audio, Driver=snd-usb-audio, 12M |__ Port 2: Dev 4, If 1, Class=Audio, Driver=snd-usb-audio, 12M |__ Port 2: Dev 4, If 2, Class=Audio, Driver=snd-usb-audio, 12M |__ Port 2: Dev 4, If 3, Class=Human Interface Device, Driver=usbhid, 12M |__ Port 3: Dev 6, If 0, Class=Vendor Specific Class, Driver=, 480M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=sw_hcd_host0/1p, 480M root@cubieboard2:~# dmesg . . . [ 765.625913] ADDRCONF(NETDEV_UP): wlan0: link is not ready [ 769.933587] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready [ 780.671412] wlan0: no IPv6 routers present [ 789.076039] usb 2-1.3: USB disconnect, device number 5 [89774.141031] usb 2-1.3: new high-speed USB device number 6 using sw-ehci [169986.157307] usbcore: registered new interface driver rt2800usb Nothing more:-(
zador.blood.stained Posted November 24, 2015 Posted November 24, 2015 Okay, This exact ID 148f:5572 is not supported by this driver in this kernel version, I checked kernel sources. Next you may try this solution: https://unix.stackexchange.com/questions/234315/rt5572-shown-in-lsusb-but-not-iwconfig Minimum kernel version supporting this chip is 3.10. Looking at module commit history, you may need to compile new module version (which probably won't work due to possible changes in other modules in kernel wireless stack), upgrade to mainline kernel (depends on your use case) or buy different wireless adapter (easiest solution).
kernelpaniclite Posted December 7, 2015 Posted December 7, 2015 sorry for the late reply. I switched to the 4.2 image and wifi is now working fine. Just need to fix the no audio issue now;-) Thanks for your help!
pschasch Posted December 8, 2015 Posted December 8, 2015 Hi, I like this idea of badrianiulian's hardware-mod on R1 ( http://forum.armbian.com/index.php/topic/372-hardware-mod-bpi-r1/) and looked for that chip/driver. http://elinux.org/RPi_USB_Wi-Fi_Adapters RT5572 USB ID 148f:5572 native driver available in Kernel 3.10.36+ (rt2800usb) uname -a 3.4.108schaschr1+ #2 SMP PREEMPT Thu Oct 22 08:59:09 CEST 2015 armv7l GNU/Linux http://www.ctheroux.com/category/rt5572/#patched version for older DPO_RT5572_LinuxSTA_2.6.0.1_20120629.tar.bz2.bz2 #I think no need to patch (first) patches wget https://dl.dropboxusercontent.com/u/11876059/DPO_RT5572_LinuxSTA_2.6.1.3_20121022.tar.gz tar -xvf DPO_RT5572_LinuxSTA_2.6.1.3_20121022.tar.gz cd DPO_RT5572_LinuxSTA_2.6.1.3_20121022 patch no need to patch ( os/linux/config.mk os/linux/usb_main_dev.c), allready up-to-date pathed common/cmm_mac_usb.c make / make install (compile ok) modprobe rt5572sta i do not have hardware yet, but this should work...
pschasch Posted December 22, 2015 Posted December 22, 2015 hi, only for info: The DPO_RT5572_LinuxSTA_2.6.1.3_20121022.tar.gz / rt5572sta.ko -stuff does not work with sunxi-3.4.10x-kernel. I got this "ralink rt5572" on kernel 3.4.10x to work with driver backports: echo "see:https://backports.wi....php/Main_Page" wget https://www.kernel.o....11.8-1.tar.bz2 tar xvf backports-3.12.8-1.tar.xz cd backports-3.12.8-1 make defconfig-wifi time make -J2 echo "BACKUP YOUR old 3.4.10x-modules in /lib/modules/3.4.10xy /lib/modules/3.4.10xy_backup to if you want to switch back...ok?" read make install reboot ............................................................................................... root@Dev:~# modinfo rt2800usb | grep "version\|5572"version: backported from Linux (v3.12.8-0-g97f15f1) using backports v3.12.8-1-0-geb41fadversion: 2.3.0srcversion: D0035750636933A8C0E52C5alias: usb:v148Fp5572d*dc*dsc*dp*ic*isc*ip*vermagic: 3.4.108schaschr1+ SMP preempt mod_unload modversions ARMv7 p2v8 regards 1
Ikrk Posted April 15, 2016 Posted April 15, 2016 Hi all, I have this configuration: uname -a Linux orangepione 3.4.110-sun8i #18 SMP PREEMPT Tue Mar 8 20:03:32 CET 2016 armv7l GNU/Linux and also Ralink RT5572 and I can confirm, that driver DPO_RT5572_LinuxSTA_2.6.1.3_20121022 does not work for me either... So I have tried to backport the rt2800usb drivers as pschasch proposed and I could get the same result: modinfo ./rt2800usb.ko | grep "version\|5572" version: backported from Linux (v3.12.8-0-g97f15f1) using backports v3.12.8-1-0-geb41fad version: 2.3.0 srcversion: D0035750636933A8C0E52C5 alias: usb:v148Fp5572d*dc*dsc*dp*ic*isc*ip* vermagic: 3.4.110 SMP preempt mod_unload modversions ARMv7 p2v8 Unfortunately, the module cannot be loaded and dmesg sais: rt2800usb: disagrees about version of symbol rt2800_config_erprt2800usb: Unknown symbol rt2800_config_erp (err -22) and many other symbols... After a research, I have read, that this can happen when the module is compiled againt another Kernel version or when the configuration differs. I have used the linux-headers-3.4.110-sun8i that came within the image and executed make scripts before compiling backports. My understanding of backports was, that it should take the .config file from /usr/src/linux-headers-... and do the configuration automatically... Do you have any idea, where could be the problem? Thank you very much for any help! Regards.
Ikrk Posted April 16, 2016 Posted April 16, 2016 Resolved! I took this modified driver: https://github.com/shaun2029/rt5572sta(Btw, thank you so much shaun2029!) Then you have to in ./include/os/rt_linux.h change the datatypes "kuid_t" to "uid_t" and "kgid_t" to "gid_t" (this is possibly valid only for kernels >= 3.4.0) And then in driver's root just: make -j4 ARCH=arm make install modprobe rt5572sta Best regards 2
pschasch Posted April 20, 2016 Posted April 20, 2016 Hello Ikrk, thanks for info! The backported driver I compiled on my R1, but before I compiled the 3.4.108-git-kernel version too on my R1. My backported driver works good (19 day uptime R1 as only AP) , but I got a lot of driver-messages in my logs. I will try/test the shaun2029-driver too, Did you compile on R1 or crosscompile by igors-toolchain? @igor can I somehow compile your 3.4.110-R1-kernel-version with all you patches on R1? Does it support csi-cam? regards
Igor Posted April 20, 2016 Posted April 20, 2016 Tools might work in native environment with small modification - remove cross compiler out here: https://github.com/igorpecovnik/lib/blob/master/configuration.sh#L222 I hope that's enough ... but still you should stick to Ubuntu Trusty base, elsewhere other problems emerge. CSI cam - if it's wired the same as on normal Banana - should work.
pschasch Posted April 20, 2016 Posted April 20, 2016 Hello Igor, thanks for answering! OK, I am not R1-ubuntu , I hoped I could clone a git and test it without your graet tooltchain. regards
Igor Posted April 20, 2016 Posted April 20, 2016 I just checked. Some more modifications would be required to be able to run script in native environment. I guess rather do it manually - you find patches here: https://github.com/igorpecovnik/lib/tree/master/patch
Ikrk Posted April 27, 2016 Posted April 27, 2016 Hi pschasch, as mentioned before, I have Orange Pi One with 3.4.110-sun8i kernel and I compiled directly on the device. I did not try to crosscompile. Regards
Angelo Calvão Posted May 3, 2017 Posted May 3, 2017 Hello, i am also trying to use the "Ralink Technology, Corp. RT5572 Wireless Adapter", as suggested by Ikrk. I have this: $ lsmod Module Size Used by disp_ump 850 0 mali_drm 2611 1 drm 214553 2 mali_drm cpufreq_userspace 3540 0 bridge 76954 0 sg 23918 0 rt5572sta 775499 0 spidev 6339 0 mali 112222 0 ump 61778 4 mali,disp_ump 8021q 18659 0 garp 6084 1 8021q stp 2028 2 garp,bridge llc 5421 3 stp,garp,bridge sunxi_ir 4044 0 hidp 17740 0 rfcomm 58820 0 hci_uart 25074 0 bluetooth 265449 5 hidp,hci_uart,rfcomm $ iwconfig lo no wireless extensions. br0 no wireless extensions. tunl0 no wireless extensions. ra0 Ralink STA eth0 no wireless extensions. bond0 no wireless extensions. and $ iwlist scan lo Interface doesn't support scanning. br0 Interface doesn't support scanning. tunl0 Interface doesn't support scanning. ra0 Failed to read scan data : Network is down eth0 Interface doesn't support scanning. bond0 Interface doesn't support scanning. # ip link set dev ra0 up RTNETLINK answers: Operation not permitted Any ideas?
Angelo Calvão Posted May 4, 2017 Posted May 4, 2017 I changed from ubuntu to debian, and with the mainline kernel the wifi seems to work out of the box.
Recommended Posts