argief
Posts: 18
Joined: Sat Aug 18, 2012 6:35 pm

rt2x00usb_vendor_request: Error

Sun Nov 11, 2012 8:26 am

I have noticed that this is a common problem with WiFi USB dongles using the RT (Ralink) driver. Please be advised, the Ralink driver (rt2800usb) is not limited to actual "Ralink" devices, but refers to the chipset on your WiFi device. The list of devices using this chipset is endless, and a comprehensive list is outside the scope of this post. (Please feel free to add your devices below).

The most common symptom is a sudden unexpected, unexplained drop in connectivity. On review of dmesg:

Code: Select all

$ dmesg | grep vendor
The output contains something similar to:

Code: Select all

phy0 -> rt2x00usb_vendor_request: Error - Vendor request 0x07 failed for offset 0x101c with error -110.
and usually more than one of these lines. It is difficult to pinpoint, but it seems there is a specific timing trend underlying this error. Reports have been in the range of 90 seconds to an hour, with the re-occurrence being interestingly enough at the exact same interval. Given standard "polling" request and the underlying design of hardware drivers, it can be deduced that a recurring function call fails after repeated previous successful executions(adding to the mystery...).

As has been mentioned in numerous forums accross the internet, this seems to be a common problem on the linux platform with the rt2800usb driver, and is not limited to the raspi. Troubleshooting to identify the exact problem has been extensive, and consensus seems to be that this error results because of incompatible devices being used together with a rt2800usb supported device.

Furthermore, after this error has occurred, the only solution seems to be to reboot your raspi, as unplugging/reloading seems to be unsuccessful in the majority of cases.

The best workaround is to buy a different device unfortunately. But other suggestions would be greatly welcomed!

I have achieved the best results with the following approach:

Firmware:
Oddly enough, comparing the MD5 checksum on the (proprietary)firmware downloaded via my package manager (gentoo) showed that the firmware per the official Ralink site and that installed on my system are different? I have therefore replaced my firmware with the official firmware from the Ralink site. (replaced the file "rt2870.bin" in /lib/firmware - in my case I use this firmware file. There are other firmware files also which you may want to replace as needed (rt*.bin))

Power issues
Given that USB WiFi dongles are notorious for big power users, I have attached my dongle to an externally powered USB hub.

config.txt
Based on my observations, there seems to be some "inconsistency" related to timing. Given the variable clock speed under the new (raspi)firmware, I have opted for a static clock speed to reduce any "environmental" changes influencing the status quo, and added the following in my config.txt:

Code: Select all

arm_freq=900
core_freq=333
sdram_freq=450
over_voltage=2
force_turbo=1
With the above configuration, I manage to get around 6-8 hours of continues good wireless connectivity. The run usually ends with a "wpa_client: DICONNECT" (source: $ grep wpa_client /var/log/messages), which is a super improvement! Now I am able to simply reconnect the WiFi without a cold restart! Running a cron task to check connectivity periodically and restart the service when connection drops will be my next step, and should then result in manageable workaround.

In a moment of complete weakness, I bought 7 rt2800usb devices, so I am definitely invested in a solution... Your comments and suggestions would be much appreciated!

Nevyn_Hira
Posts: 1
Joined: Sat Nov 17, 2012 3:41 am

Re: rt2x00usb_vendor_request: Error

Sat Nov 17, 2012 4:05 am

I brought one of these recently myself after poor throughput with the usb wifi adaptor I had available to me.

I've found I can fairly consistently reproduce the problem using rsync. Attempting to copy a number of files from another machine with the following command:

rsync FILE* pi@192.168.1.3:"/mnt/usb/SomeDirectory" --progress -z --remove-source-files --partial

If FILE0 already exists at destination (where destination is the raspberry pi), the wifi adapter seems to stop functioning and after a minute or two come up with the error described in this post.

linux_cat
Posts: 8
Joined: Mon Nov 12, 2012 6:08 pm

Re: rt2x00usb_vendor_request: Error

Sat Nov 17, 2012 11:59 am

Ah, I see I recently posted a topic on the wi-pi performance, and streaming 720p videos...the wireless performance was pathetic with some tweaking ive manged to get it performing ok but no-where as near as fast if it was plugged into the ethernet.

Thanks for the info, at least now i know the the problem is not just restricted to my device and me!

argief
Posts: 18
Joined: Sat Aug 18, 2012 6:35 pm

Re: rt2x00usb_vendor_request: Error

Sat Nov 17, 2012 8:41 pm

@Nevyn_Hira: I think I have managed to resolve the error above. My deduction is that this is firmware related. I have found that various distros have outdated firmware for this chipset. I think their reasoning is that since the vendor (ralink) has not updated the complete driver tar file on the website, that the firmware also persists. This is incorrect, about half the "Linux Drivers" on the ralink website uses the same firmware file! Therefore, please head over to the site and download the latest (by date) tar file you can find. Look in the tar file for a file called rt2870.bin and replace your current firmware file in /lib/firmware. I still have random disconnects, but do not get the "vendor_request" error, and therefore I do not reed a restart to bring the device "live" again. Worst case, I have to unplug the device and plug in back in. At time of writing, the "RT3573 USB" tar file, contains the latest firmware file(2012).

So ralink released a new version of their staging drivers on Thursday 15 November 2012! Petty it was named incorrectly...and currently returns an empty file... :( It should include an even more up-to-date firmware! I will next try building the staging drivers, in the hope of an improvement. Will report back with the results, and if these yield an improvement, I will try decipher the README and write a easy to follow guide.

I unfortunately have to report that the script file suggested above in my original post does not seem to fix the problem of unexplained disconnection... The service fails to restart, and resolution thus far has been to pull the device and re-insert. This is a very messy solution, and breaks the whole run-level. Each service needs to be started individually hereafter. Not recommended.

lbsl
Posts: 4
Joined: Sun Jan 20, 2013 7:27 pm

Re: rt2x00usb_vendor_request: Error

Sat Mar 16, 2013 3:52 pm

I was looking for the error message, but i got this error line bloating in the syslog file (88MB's in size).
I believe one of the problems of the Realtek devices are indeed powerhunger.
I've seen solutions to turn down the powermanagement by doing sudo iwconfig wlan0 power off.
To get this permanent add a post-up command in the /etc/network/interfaces file:

Code: Select all

iface wlan0 inet manual
	post-up iwconfig wlan0 power off
	wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
This makes the device a lot more stable.

Spid
Posts: 525
Joined: Sat Jan 19, 2013 12:47 pm

Re: rt2x00usb_vendor_request: Error

Sat Mar 16, 2013 4:07 pm

lbsl wrote:I was looking for the error message, but i got this error line bloating in the syslog file (88MB's in size).
I believe one of the problems of the Realtek devices are indeed powerhunger.
I've seen solutions to turn down the powermanagement by doing sudo iwconfig wlan0 power off.
To get this permanent add a post-up command in the /etc/network/interfaces file:

Code: Select all

iface wlan0 inet manual
	post-up iwconfig wlan0 power off
	wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
This makes the device a lot more stable.
RTxxx series is actually made by Railink not sure what Realtek has to do with it though and the post you
responded to is out of date as most newer Railink Chipsets use the RT5070 firmware !

As has been said time and again, USB Peripherals are best plugged into a Powered Hub.
I will always assume you are running Raspbian for desktop and Raspbmc for XMBC !

lbsl
Posts: 4
Joined: Sun Jan 20, 2013 7:27 pm

Re: rt2x00usb_vendor_request: Error

Sat Mar 16, 2013 9:40 pm

Spid wrote: RTxxx series is actually made by Railink not sure what Realtek has to do with it though and the post you
responded to is out of date as most newer Railink Chipsets use the RT5070 firmware !

As has been said time and again, USB Peripherals are best plugged into a Powered Hub.
Ah yes, sorry, i meant Ralink indeed, i have a sitecom USB device (WL302) using the same driver and the device is pretty old. I usually don't throw away stuff that still works fine. I'm sure there are a lot of folks that do the same regarding these kind of projects. I'm not sure if the firmware on these USB devices can be updated though, i read some references to firmware, but folks mainly link to linux drivers.

Regarding powered USB hubs:
Some of us want to use the Pi somewhere in narrow space or hang it to a wall to have it operate autonomously, without having the clunkiness of extra USB hubs bungling around it. My stick operates perfectly fine without a powered hub, as long as that option is programmed.
Post may be outdated, for me the situation is quite actual.
Cheers.

komodo
Posts: 5
Joined: Fri Jan 18, 2013 7:33 am

Re: rt2x00usb_vendor_request: Error

Fri Apr 05, 2013 1:46 am

I'd come across this thread before, but i've returned to it following continued wackiness from my wifi adapter.

The stick in use is:

Code: Select all

Bus 001 Device 004: ID 050d:705a Belkin Components F5D7050 Wireless G Adapter v3000 [Ralink RT2571W]
I'm running arch currently, who source their firmware from upstream (*link*).

Checking the logs there show this rt2870.bin firmware was last updated on 2011-04-26 (!!!).

Poking at the vendor site yielded this(*link*) page, where the newest one was the RT5572.

Following extraction, the rt2870.bin file was found in the common subdirectory.

After backing up the original file, I copied this new one into place in the /lib/firmware directory on my pi.

Following a reboot, everything started up as normal. (Experiments on a wireless headless pi can be a bit nervewracking.)

dmesg showed no errors, initially at least.

Initial impressions are of a noticeable improvement overall; performance previously had been inconsistent. Random bouts of dropped packets, high latency, etc., particularly after a period of idle time. Currently, none of that has shown up, knock on wood.

The only anomaly is that the wifi didn't make the initial association, but did about 2 minutes later. I will include the dmesg excerpt in case it is of use to someone. It is also possible this was just a fluke in router/client timing, and doesn't mean much of anything.

Code: Select all

[   18.044916] wlan0: authenticate with 28:37:37:46:ed:0a
[   18.082287] wlan0: send auth to 28:37:37:46:ed:0a (try 1/3)
[   18.084238] wlan0: authenticated
[   18.085174] rt73usb 1-1.2:1.0: wlan0: disabling HT as WMM/QoS is not supported
[   18.116156] wlan0: associate with 28:37:37:46:ed:0a (try 1/3)
[   18.119124] wlan0: RX AssocResp from 28:37:37:46:ed:0a (capab=0x1431 status=0 aid=7)
[   18.137541] wlan0: associated
[   18.137801] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   18.138161] cfg80211: Pending regulatory request, waiting for it to be processed...
[  143.622023] ieee80211 phy0: wlan0: No probe response from AP 28:37:37:46:ed:0a after 500ms, disconnecting.
[  143.641302] cfg80211: All devices are disconnected, going to restore regulatory settings
[  143.641339] cfg80211: Restoring regulatory settings
[  143.641371] cfg80211: Calling CRDA for country: US
[  145.054524] wlan0: authenticate with 28:37:37:46:ed:0a
[  145.104809] wlan0: send auth to 28:37:37:46:ed:0a (try 1/3)
[  145.106692] wlan0: authenticated
[  145.107623] rt73usb 1-1.2:1.0: wlan0: disabling HT as WMM/QoS is not supported
[  145.141906] wlan0: associate with 28:37:37:46:ed:0a (try 1/3)
[  145.144809] wlan0: RX AssocResp from 28:37:37:46:ed:0a (capab=0x1431 status=0 aid=7)
[  145.164746] wlan0: associated
Thanks for the initial leg work in this thread. I'm hopeful that the card will behave a little more sanely now. With luck, it will live through the night as well! (The kernel would lose connectivity to it and generally freak out. I've had to restore multiple SD cards due to this silliness.)

mjf
Posts: 1
Joined: Thu Apr 25, 2013 10:53 pm

Re: rt2x00usb_vendor_request: Error

Thu Apr 25, 2013 11:10 pm

I was struggling with the same problems as the original post, i.e.. loss of connectivity after a defined period, and recovery only possible with a power-cycle of the pi.

I'm running raspbian-wheezy - this version....

Code: Select all

[//lib/firmware$ cat /proc/version
Linux version 3.6.11+ (dc4@dc4-arm-01) (gcc version 4.7.2 20120731 (prerelease) (crosstool-NG linaro-1.13.1+bzr2458 - Linaro GCC 2012.08) ) #371 PREEMPT Thu Feb 7 16:31:35 GMT 2013
]

The USB WiFi dongle I am using is a Sparklan Dual Band (2.4G and 5G)  WUBR-507N,  using the RT3572 chipset.

Replacing the rt2870.bin with the latest extracted from the MediaTek website download (as detailed by komodo) AND disabling power management by adding the line  "post-up iwconfig wlan0 power off" to the interfaces file has improved my WiFi reliability immensely - it's been stable now for 2 days - pingable and stable with SSH !!!

Muchos gracias to all the previous posters for their good work   :D

JohnWulff
Posts: 4
Joined: Wed Sep 11, 2013 5:13 am

Re: rt2x00usb_vendor_request: Error

Mon Sep 16, 2013 11:53 am

I had the same problem with the AusPi Technologies 11N 150M WiFi dongle on a Raspberry Pi.
lsusb lists it as: Ralink Technology, Corp. RT5370 Wireless Adapter.

After 5 minutes to 5 hours the WiFi would stop and nothing except rebooting would make it recover. I also got repeated error messages from dmesg: phy0 -> rt2x00usb_vendor_request: Error. That led me to this forum. I used the same fix as argief and a number of others.

MediaTek (Ralink) lists RT5370 in the file:
DP0_RT5572_LinuxSTA_2.6.1.3_20121022.tar.bz2 (816 kb)
and points to common/rt2870.bin (8192 bytes) as the correct bin file.

1) Replace /lib/firmware/rt2870.bin (after backing it up)
2) add a line to /etc/network/interfaces
iface wlan inet manual
insert ==> post-up iwconfig wlan0 power off
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

Rebooting was successful immediately and the WiFi has been stable for 48 hours running most of that time with network traffic and working during the day with 4 remote terminal windows via ssh. Thanks to everyone for this fix.

burkhardyoo
Posts: 1
Joined: Tue Nov 19, 2013 4:46 pm

Re: rt2x00usb_vendor_request: Error

Tue Nov 19, 2013 5:04 pm

Hello,

So I updated the firmware, however I am still getting very inconsistent ping to clients (hostap and isc-dhcp-server). I tried modifying the driver, turning the power management off. I am using a custom kernel (3.8.10)

I tested with rtl8192 and rtl8188 and got really good ping, however using wubr 507N I am getting ping shown below. Also I have a smart power supply and it shows the current draw. When I have the pi on hostap mode, I can see that the current draw fluctuates quite rapidly even though i have power management off. Any thoughts? I have been spending a week on this.

PING

Code: Select all

64 bytes from 10.0.0.3: icmp_req=1 ttl=64 time=81.7 ms
64 bytes from 10.0.0.3: icmp_req=2 ttl=64 time=112 ms
64 bytes from 10.0.0.3: icmp_req=3 ttl=64 time=143 ms
64 bytes from 10.0.0.3: icmp_req=4 ttl=64 time=149 ms
64 bytes from 10.0.0.3: icmp_req=5 ttl=64 time=62.4 ms
64 bytes from 10.0.0.3: icmp_req=6 ttl=64 time=2.23 ms
64 bytes from 10.0.0.3: icmp_req=7 ttl=64 time=78.9 ms
64 bytes from 10.0.0.3: icmp_req=8 ttl=64 time=109 ms
64 bytes from 10.0.0.3: icmp_req=9 ttl=64 time=1.77 ms
64 bytes from 10.0.0.3: icmp_req=10 ttl=64 time=60.9 ms
64 bytes from 10.0.0.3: icmp_req=11 ttl=64 time=16.2 ms
64 bytes from 10.0.0.3: icmp_req=12 ttl=64 time=141 ms
64 bytes from 10.0.0.3: icmp_req=13 ttl=64 time=128 ms
64 bytes from 10.0.0.3: icmp_req=14 ttl=64 time=39.7 ms
64 bytes from 10.0.0.3: icmp_req=15 ttl=64 time=81.0 ms
64 bytes from 10.0.0.3: icmp_req=16 ttl=64 time=0.999 ms
64 bytes from 10.0.0.3: icmp_req=17 ttl=64 time=123 ms
64 bytes from 10.0.0.3: icmp_req=18 ttl=64 time=64.5 ms
64 bytes from 10.0.0.3: icmp_req=19 ttl=64 time=1.60 ms
64 bytes from 10.0.0.3: icmp_req=20 ttl=64 time=80.9 ms
64 bytes from 10.0.0.3: icmp_req=21 ttl=64 time=28.1 ms
^C
--- 10.0.0.3 ping statistics ---
21 packets transmitted, 21 received, 0% packet loss, time 20028ms
rtt min/avg/max/mdev = 0.999/71.845/149.194/49.368 ms
lsmod

Code: Select all

Module                  Size  Used by
rt2800usb              13586  0 
rt2800lib              52194  1 rt2800usb
rt2x00usb               9926  1 rt2800usb
rt2x00lib              39039  3 rt2x00usb,rt2800lib,rt2800usb
dmesg

Code: Select all

[  823.650000] usb 1-2.1.4: new high-speed USB device number 2 using s5p-ehci
[  823.770000] usb 1-2.1.4: New USB device found, idVendor=148f, idProduct=3572
[  823.770000] usb 1-2.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  823.770000] usb 1-2.1.4: Product: 802.11 n WLAN
[  823.770000] usb 1-2.1.4: Manufacturer: Ralink
[  823.770000] usb 1-2.1.4: SerialNumber: 1.0
[  823.865000] usb 1-2.1.4: reset high-speed USB device number 2 using s5p-ehci
[  824.010000] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
Thanks!

forevertheuni
Posts: 9
Joined: Mon Mar 09, 2015 12:18 am

Re: rt2x00usb_vendor_request: Error

Sun Mar 22, 2015 10:05 pm

I have the same with a 8192cu :( from realtek no ralink.

JetztAnne
Posts: 1
Joined: Fri Jun 30, 2017 7:38 am

Re: rt2x00usb_vendor_request: Error

Fri Jun 30, 2017 7:51 am

I got the same error

Code: Select all

ieee80211 phy1: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x101c with error -110
I already replaced the 0.29 firmware with 0.36 from Debian repositories and I get the same results.

All this happens after a couple of hours and until then it works.

Power management is disabled for phy1.

Which Wi-Fi stick can I buy as an alternative, which would you recommend and that works with the Raspberry Pi 3? I don't want any disconnects anymore this is really annoying.

Return to “Troubleshooting”