Page 1 of 1

wifi @raspberry pi2 - ralink rt5370 driver

Posted: Wed Apr 12, 2017 11:17 pm
by alexus
Hello! I'm trying to setup WIFI with my Raspberry Pi 2 and Ralink RT 5370 (kindly see bellow):

Code: Select all

pi@raspberrypi:~ $ cat /etc/os-release 
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
pi@raspberrypi:~ $ cat /etc/issue
Raspbian GNU/Linux 8 \n \l

pi@raspberrypi:~ $ cat /etc/rpi-issue 
Raspberry Pi reference 2017-04-10
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, acc4f56597e75225b93be3e1e20504a40565a9b9, stage5
pi@raspberrypi:~ $ lsusb | grep RT5370
Bus 001 Device 038: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
pi@raspberrypi:~ $ sudo apt-get install firmware-ralink
Reading package lists... Done
Building dependency tree       
Reading state information... Done
firmware-ralink is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@raspberrypi:~ $ ip addr show dev wlan1 
6: wlan1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:0f:54:0d:1f:42 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::a9cf:2ed1:685c:9554/64 scope link tentative 
       valid_lft forever preferred_lft forever
pi@raspberrypi:~ $ 
/var/log/syslog:

Code: Select all

Apr 12 10:03:26 raspberrypi kernel: [    5.253745] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected
Apr 12 10:03:26 raspberrypi kernel: [    5.283931] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5370 detected
Apr 12 10:03:26 raspberrypi kernel: [    5.306330] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
Apr 12 10:03:26 raspberrypi kernel: [    5.311501] usbcore: registered new interface driver rt2800usb
Apr 12 10:03:26 raspberrypi kernel: [    6.402565] random: nonblocking pool is initialized
Apr 12 10:03:26 raspberrypi kernel: [    7.122447] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
Apr 12 10:03:26 raspberrypi kernel: [    7.125445] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.29
Apr 12 10:03:26 raspberrypi kernel: [    7.452283] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x0500 with error -71
Apr 12 10:03:26 raspberrypi kernel: [    7.552282] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x0500 with error -71
Apr 12 10:03:26 raspberrypi kernel: [    7.652256] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x0500 with error -71
Apr 12 10:03:26 raspberrypi kernel: [    7.752295] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x0500 with error -71
Apr 12 10:03:26 raspberrypi kernel: [    7.852246] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x0500 with error -71
I get flooded with messages such last few message from snippet above and needless to say, I'm unable to use it((

Please advise.

Re: rt5370 raspberry pi driver

Posted: Thu Apr 13, 2017 12:33 am
by wh7qq
I have heard recently of some problems with the rt5370 driver but have been unable to locate any definitive info on it. Are you using the latest Raspbian? It should "just work". Try a fresh install of Raspbian on a different uSD card.

Re: rt5370 raspberry pi driver

Posted: Thu Apr 13, 2017 3:09 pm
by alexus
wh7qq wrote:I have heard recently of some problems with the rt5370 driver but have been unable to locate any definitive info on it. Are you using the latest Raspbian? It should "just work". Try a fresh install of Raspbian on a different uSD card.
Well... "it should just work" obviously isn't working for me, hence this post) I'm already at latest (April 2017) Raspbian (I apologize for not including all information at the first place, I updated my initial post as well).

What can I do, to help troubleshoot this issue?

Re: wifi @raspberry pi2 - ralink rt5370 driver

Posted: Fri Apr 14, 2017 7:29 pm
by wh7qq
As much of a PITA as this is, the fastest/easiest method for now is probably to get another dongle such as the Edimax 7811. They are cheap ($8 on Amazon) and have a low profile. I really don't know what is going on with the rt537 right now. Maybe another reader will have more info on this.

Re: wifi @raspberry pi2 - ralink rt5370 driver

Posted: Fri Apr 14, 2017 10:23 pm
by MaxK1
What else is connected via USB? The Ralink is showing up as wlan1 so what is wlan0? And why is the device number 38?
Could you post the full (unfiltered!) output from dmesg?

Re: wifi @raspberry pi2 - ralink rt5370 driver

Posted: Sat Apr 15, 2017 7:38 am
by allfox
Strange, I have a no brand RT5572 dongle, but seems to be working.

I think it should be the same chip generation as yours, but have two antennas and 5G capability:

Code: Select all

1092 Apr 15 15:15:05 pi1 kernel: [  103.905828] usb 1-1.5.4: new high-speed USB device number 9 using dwc_otg
1093 Apr 15 15:15:05 pi1 kernel: [  104.052205] usb 1-1.5.4: New USB device found, idVendor=148f, idProduct=5572
1094 Apr 15 15:15:05 pi1 kernel: [  104.052221] usb 1-1.5.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
1095 Apr 15 15:15:05 pi1 kernel: [  104.052247] usb 1-1.5.4: Product: 802.11 n WLAN
1096 Apr 15 15:15:05 pi1 kernel: [  104.052255] usb 1-1.5.4: Manufacturer: Ralink
1097 Apr 15 15:15:05 pi1 kernel: [  104.052263] usb 1-1.5.4: SerialNumber: 1.0
1098 Apr 15 15:15:05 pi1 systemd-udevd[3464]: failed to execute '/lib/udev/mtp-probe' 'mtp-probe /sys/devices/platform/soc/3f98     0000.usb/usb1/1-1/1-1.5/1-1.5.4 1 9': No such file or directory
1099 Apr 15 15:15:05 pi1 kernel: [  104.265837] usb 1-1.5.4: reset high-speed USB device number 9 using dwc_otg
1100 Apr 15 15:15:05 pi1 kernel: [  104.415159] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 5592, rev 0222 detected
1101 Apr 15 15:15:05 pi1 kernel: [  104.445748] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 000f detected
1102 Apr 15 15:15:05 pi1 kernel: [  104.447039] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
1103 Apr 15 15:15:05 pi1 kernel: [  104.449713] usbcore: registered new interface driver rt2800usb
1104 Apr 15 15:15:05 pi1 kernel: [  104.480936] rt2800usb 1-1.5.4:1.0 ap5g: renamed from wlan0
1105 Apr 15 15:15:05 pi1 systemd[1]: Starting Load/Save RF Kill Switch Status of rfkill1...
1106 Apr 15 15:15:05 pi1 systemd[1]: Started Load/Save RF Kill Switch Status of rfkill1.
1107 Apr 15 15:15:05 pi1 dhcpcd[678]: ap5g: adding address fe80::e6d:29b:ac4d:2663
1108 Apr 15 15:15:06 pi1 dhcpcd[3533]: sending commands to master dhcpcd process
1109 Apr 15 15:15:06 pi1 kernel: [  104.839911] ieee80211 phy1: rt2x00lib_request_firmware: Info - Loading firmware file 'rt287     0.bin'
1110 Apr 15 15:15:06 pi1 kernel: [  104.881708] ieee80211 phy1: rt2x00lib_request_firmware: Info - Firmware detected - version:      0.36
I see I got a newer firmware, maybe you could try upgrade the firmware either?
You could get the new firmware from: https://git.kernel.org/pub/scm/linux/ke ... rt2870.bin
Then place it into /lib/firmware, and reboot.

Re: wifi @raspberry pi2 - ralink rt5370 driver

Posted: Sat Apr 15, 2017 7:53 am
by DougieLawson
The easiest way to get over the deficiencies with RT5370 is to run a script periodically from crontab to restart networking.

They're cheap crap and the kernel driver is crap code. So you just have to live with it or stick your hand in your pocket and buy a better WiFi dongle.

https://shop.pimoroni.com/products/offi ... ifi-dongle

Re: wifi @raspberry pi2 - ralink rt5370 driver

Posted: Sat Apr 15, 2017 7:59 am
by MaxK1
@allfox - I doubt the firmware is the problem (I have the same version as the OP running just fine 3 or 4 machines). What I do think is curious is the device name (wlan1) and the number.