arnohr
Posts: 27
Joined: Sun May 20, 2012 4:05 pm

WLAN Dongle RT5370 - great packet delay

Fri May 24, 2013 4:24 pm

Hi guys!

A few days ago I bought a new tiny WLAN RT5370 USB Dongle (USB-ID 148f:5370) for my second Pi http://www.logilink.eu/showproduct/WL0084B.htm. Like mentioned on http://elinux.org/RPi_VerifiedPeriphera ... i_Adapters the installation of the dongle is quite easy. After updating the wpa_supplicant.conf with the details of my network, everything worked fine I thought. But then I figured out that communication over the wlan device is very slow and laggy. A common ICMP packet needs 200 ms to travel between my client and the Pi. Even a ssh session is very unpleasant slow. Where my other Pi with a different WLAN-Dongle needs only around 7 ms for an ICMP-Packet.

If I put the dongle into my laptop it works very fine. The funny thing is, if I ping from the Pi to any client-device there is no delay. On the other hand, if I ping from any client to the Pi there is this bad delay.

As a power source I use a 5V/5A max. industry power supply which powers the Pi and the USB-Hub directly. I'm using the latest Raspian version freshly updated (24.05.2013). I also tried two different Pi's. One revision 1 and oner revision 2 of the Modell B Pi.

I have no idea how to fix this problem... I will be happy about any suggestions.

M33P
Posts: 199
Joined: Sun Sep 02, 2012 1:14 pm

Re: WLAN Dongle RT5370 - great packet delay

Fri May 24, 2013 6:16 pm

Try sudo iwconfig wlan0 power off to see if that helps. It prevents "sleeping" the radio after inactivity which can be a cause of lag.

arnohr
Posts: 27
Joined: Sun May 20, 2012 4:05 pm

Re: WLAN Dongle RT5370 - great packet delay

Fri May 24, 2013 6:40 pm

Jackpot! This solves the delay problem. But if I copy a 100 MB file via the wlan0 device the transfer rate is limited to 1,3 MB/s... I think this is worth some more investigation.

But another question... How do I make the power off wlan0 configuration persistent?
Last edited by arnohr on Fri May 24, 2013 7:11 pm, edited 1 time in total.

M33P
Posts: 199
Joined: Sun Sep 02, 2012 1:14 pm

Re: WLAN Dongle RT5370 - great packet delay

Fri May 24, 2013 7:11 pm

In /etc/network/interfaces, in the block defining wlan0 add the line:

Code: Select all

wireless-power off
1.3MB/s may be due to many things - chief of which is wireless signal quality/strength. sudo iwconfig will show the current state/speed of the connection and link quality. Note that the actual maximum you'll ever realistically get from a wifi link is about half the actual channel bitrate.

If you're transferring the data via scp/sftp/ssh tunnel, Samba or to a drive attached to the Pi with an NTFS file system, these are all CPU hogs. Try running top with the transfer active.

arnohr
Posts: 27
Joined: Sun May 20, 2012 4:05 pm

Re: WLAN Dongle RT5370 - great packet delay

Fri May 24, 2013 8:00 pm

sudo iwconfig says I'm connected with a speed of 6.5 MB/s.
My netbook is connected with a speed of 65 MB/s to the same AP and the scp transfer rate is much the same. I think it is a general problem with my wifi network.

Thank for your help.

mrteach
Posts: 181
Joined: Sun May 26, 2013 6:49 am

Re: WLAN Dongle RT5370 - great packet delay

Mon Jun 10, 2013 9:02 pm

I'm having a packet delay too. Maybe the rt5370 just sucks... =/

I'm getting 6.5mb/s. My other wireless devices work well =/ 4/5 or 5/5 usually.
ssh is SO so slow. Even when the device was close to the router it was a bit choppy, but not that much. Not its terrible...

Anyway to boost the power?

arnohr
Posts: 27
Joined: Sun May 20, 2012 4:05 pm

Re: WLAN Dongle RT5370 - great packet delay

Tue Jun 11, 2013 8:21 am

As M33P mentioned:
Try sudo iwconfig wlan0 power off to see if that helps. It prevents "sleeping" the radio after inactivity which can be a cause of lag.

pjc123
Posts: 911
Joined: Thu Mar 29, 2012 3:37 pm

Re: WLAN Dongle RT5370 - great packet delay

Wed Jun 12, 2013 11:10 am

I am also seeing high packet loss, at bandwidths greater than 12 Mbits/s with a different wifi dongle, but I have narrowed my problem to either my router or dongle, not a pi related issue.

Here is thread related to that issue and how you can do some testing:

http://www.raspberrypi.org/phpBB3/viewt ... 28&t=27881
My Raspberry Pi Project Page:
http://www.flaminghellmet.com/launch/

rickyman35
Posts: 1
Joined: Sun Nov 03, 2013 3:54 pm

Re: WLAN Dongle RT5370 - great packet delay

Sun Nov 03, 2013 3:59 pm

Thanks You!

The

Code: Select all

wireless-power off
worked for me. At first I was getting between 50ms - 1500ms of latency when I pinged my Pi, then I bought a powered USB hub and was getting around 50ms - 300ms of latency. Although when I pinged my PC from my Pi I would get 1ms of latency. Adding

Code: Select all

wireless-power off
brought it down to 1ms of latency on both ends. :D , Thanks.

Return to “Troubleshooting”

Who is online

Users browsing this forum: bouni and 84 guests