Ralink RT5370 USB Wifi: slow and dropping out

Issues related to hardware problems
colinabrett
Posts: 33
Joined: 2012/01/31 10:05:24
Contact:

Ralink RT5370 USB Wifi: slow and dropping out

Post by colinabrett » 2021/02/20 10:42:10

Hello,

Firstly, let me apologise if this has been logged in the wrong board. I'm having networking problems with the above wifi dongle and I can't tell if it's a network problem or a hardware/driver problem. Could an admin please move this post to the appropriate board if this is not the right place for it? Thanks.

I have an HP Stream laptop which originally ran Windows 10. It just didn't have the storage space to run Windows 10 updates so I installed Centos 7. This was installed from 7.8 media and updated to 7.9.

The onboard wifi card (a Broadcom BCM43142) doesn't work due to Broadcom's licensing policy. I managed to find a compatible USB dongle, Ralink RT5370, which worked OK for a while but now it is slow and constantly dropping out. This makes it extremely difficult to get anything done which requires a network connection. My system information is as follows

Code: Select all

4 colin@stream> uname -a
Linux stream 3.10.0-1160.11.1.el7.x86_64 #1 SMP Fri Dec 18 16:34:56 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
5 colin@stream> cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)
6 colin@stream> 

Code: Select all

1 colin@stream> lspci
00:00.0 Host bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series SoC Transaction Register (rev 21)
00:02.0 VGA compatible controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller (rev 21)
00:0b.0 Signal processing controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Power Management Controller (rev 21)
00:14.0 USB controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series USB xHCI Controller (rev 21)
00:1a.0 Encryption controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Trusted Execution Engine (rev 21)
00:1b.0 Audio device: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series High Definition Audio Controller (rev 21)
00:1c.0 PCI bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Express Port #1 (rev 21)
00:1c.3 PCI bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Express Port #4 (rev 21)
00:1f.0 ISA bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCU (rev 21)
00:1f.3 SMBus: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx SMBus Controller (rev 21)
01:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader (rev 01)
02:00.0 Network controller: Broadcom Inc. and subsidiaries BCM43142 802.11b/g/n (rev 01)
2 colin@stream> lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 0a5c:216d Broadcom Corp. BCM43142A0 Bluetooth 4.0
Bus 001 Device 004: ID 0bda:57c4 Realtek Semiconductor Corp. 
Bus 001 Device 003: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
Bus 001 Device 002: ID 045e:07fd Microsoft Corp. Nano Transceiver 1.1
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
3 colin@stream> 
3 colin@stream> lsmod | grep rt2800
rt2800usb              31203  0 
rt2x00usb              20778  1 rt2800usb
rt2800lib             106640  1 rt2800usb
crc_ccitt              12707  1 rt2800lib
rt2x00lib              70005  3 rt2x00usb,rt2800lib,rt2800usb
mac80211              770617  3 rt2x00lib,rt2x00usb,rt2800lib
4 colin@stream> 
Now I'm finding errors like this when I use yum:

Code: Select all

http://mirror.sov.uk.goscomb.net/centos/7.9.2009/extras/x86_64/repodata/cd5c5a43f22077a43a0af22f1999a97312975ce0abbf9c09f6120055a212c3fa-primary.sqlite.bz2: [Errno 12] Timeout on http://mirror.sov.uk.goscomb.net/centos/7.9.2009/extras/x86_64/repodata/cd5c5a43f22077a43a0af22f1999a97312975ce0abbf9c09f6120055a212c3fa-primary.sqlite.bz2: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
...
epel/x86_64/updateinfo         FAILED                                                             ]  12 kB/s | 1.2 MB  00:29:28 ETA 
http://www.fedora.is/fedora/epel/7/x86_64/repodata/a50341a580e9935c68088e2e7caf182b4f96bd118e1fb4513aa4f47df72ff995-updateinfo.xml.bz2: [Errno 12] Timeout on http://www.fedora.is/fedora/epel/7/x86_64/repodata/a50341a580e9935c68088e2e7caf182b4f96bd118e1fb4513aa4f47df72ff995-updateinfo.xml.bz2: (28, 'Resolving timed out after 30546 milliseconds')
Trying other mirror.
...
I have tried disabling the "fastestmirror" plugin to no avail and have the appropriate driver (I think) but can't compile it until I can get gcc installed via yum. I believe the rt2800usb kernel module should work but it doesn't seem to be optimal. So, I guess I have a few questions for the experts (which I am not):
  • Is there any other information you might need to help debug this problem?
    Is there a "install drivers for dummies" guide you could point me towards?
    If all else fails, can anyone recommend a different brand/chipset of USB wifi dongle that will work "out of the box" in Centos 7?
I'm really at a loss here, so any advice would be gratefully received.

Regards,
Colin Brett

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Ralink RT5370 USB Wifi: slow and dropping out

Post by TrevorH » 2021/02/20 13:59:07

If all your errors are from yum and against the EPEL repo then I'd be tempted to just blame them. Their mirror network is very shonky and often suffers from problems like that. Now if you have examples that are not yum complaining about EPEL then that's different.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

colinabrett
Posts: 33
Joined: 2012/01/31 10:05:24
Contact:

Re: Ralink RT5370 USB Wifi: slow and dropping out

Post by colinabrett » 2021/03/19 08:10:27

TrevorH wrote:
2021/02/20 13:59:07
If all your errors are from yum and against the EPEL repo then I'd be tempted to just blame them. Their mirror network is very shonky and often suffers from problems like that. Now if you have examples that are not yum complaining about EPEL then that's different.
@TrevorH, thanks for your response. It has been nearly a month since my request and I've only recently had a chance to work on the laptop and the RT5370 wifi adapter. I do hope you can still offer assistance.

Further to my original post, it's not just the epel repo that is timing out. I tried

Code: Select all

yum --disablerepo=epel groupinstall 'Development Tools'
and other repos are showing the same errors. Nslookup times out with "no servers could be reached" about 50% of the time and I get "destination host unreachable" when pinging my main laptop. I have also seen - but don't know how to document - other machines on my network (another CentOS laptop, a Chromebook and even PlayStations and Android devices) timing out and losing their connection while yum is running on the HP Stream laptop.

I'm considering installing a different distro (eg Debian) to see if this problem goes away.

I am flummoxed!

Have you any other suggestions?

Regards,
Colin

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Ralink RT5370 USB Wifi: slow and dropping out

Post by TrevorH » 2021/03/19 10:40:24

Try it with a cable instead and see if the problem goes away. If it does then it's your wireless connection is flakey though the cause of that will still need to be found.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

colinabrett
Posts: 33
Joined: 2012/01/31 10:05:24
Contact:

Re: Ralink RT5370 USB Wifi: slow and dropping out

Post by colinabrett » 2021/04/01 03:48:55

TrevorH wrote:
2021/03/19 10:40:24
Try it with a cable instead and see if the problem goes away. If it does then it's your wireless connection is flakey though the cause of that will still need to be found.
Hi @TrevorH

Again, apologies for the late response to your suggestion. The HP Stream has no onboard ethernet port so I had to buy a USB adaptor and a 5m cable to reach my hub.

With the wired connection, yum works perfectly. So I ran "yum update" and "yum groupinstall 'Development Tools'" without any problems. At least I now have gcc installed so I can compile the driver from the source code that came with the RT5370 device if necessary.

After using yum, I switched back to the wireless adaptor and the problems returned. I did some searching around and found this link:

viewtopic.php?t=64991&p=273331

which I noted you responded to back in 2017. I followed some of the steps you described in that post, the output of which is below:

Code: Select all

1 root@stream# uname -a
Linux stream 3.10.0-1160.21.1.el7.x86_64 #1 SMP Tue Mar 16 18:28:22 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
2 root@stream# cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)
3 root@stream# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0a5c:216d Broadcom Corp. BCM43142A0 Bluetooth 4.0
Bus 001 Device 003: ID 0bda:57c4 Realtek Semiconductor Corp. 
Bus 001 Device 005: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
4 root@stream# lsmod | grep rt
rt2800usb              31203  0 
rt2x00usb              20778  1 rt2800usb
rt2800lib             106640  1 rt2800usb
crc_ccitt              12707  1 rt2800lib
rt2x00lib              70005  3 rt2x00usb,rt2800lib,rt2800usb
mac80211              770617  3 rt2x00lib,rt2x00usb,rt2800lib
cfg80211              710816  2 mac80211,rt2x00lib
btrtl                  12945  1 btusb
bluetooth             548730  41 bnep,btbcm,btrtl,btusb,rfcomm,btintel
rtsx_pci_ms            18168  0 
memstick               16760  1 rtsx_pci_ms
rtsx_pci_sdmmc         23620  0 
rtsx_pci               66608  2 rtsx_pci_ms,rtsx_pci_sdmmc
mmc_core              147317  4 mmc_block,sdhci,sdhci_acpi,rtsx_pci_sdmmc
5 root@stream# ifconfig -a
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 17  bytes 1599 (1.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 17  bytes 1599 (1.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp0s20u2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.89  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::99ae:3338:6a52:a3a  prefixlen 64  scopeid 0x20<link>
        ether 1c:bf:ce:e4:aa:40  txqueuelen 1000  (Ethernet)
        RX packets 46532  bytes 44539113 (42.4 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 41171  bytes 7162830 (6.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

6 root@stream# 
6 root@stream# modprobe rt2800usb
7 root@stream# 
It seems modprobe returns no output and nothing appears in /var/log/messages . I understand I'm going on old information but I really need a reliable wifi connection as I'll be using this machine "on the road", so to speak, when lockdown in the UK ends.

Is there any other information I can provide so we can work to fix this issue?

Thanks for your support,
Colin

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Ralink RT5370 USB Wifi: slow and dropping out

Post by TrevorH » 2021/04/01 05:59:10

If the interface shows up in ip link show then you already have the module for it built and loaded.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

colinabrett
Posts: 33
Joined: 2012/01/31 10:05:24
Contact:

Re: Ralink RT5370 USB Wifi: slow and dropping out

Post by colinabrett » 2021/04/02 04:25:20

TrevorH wrote:
2021/04/01 05:59:10
If the interface shows up in ip link show then you already have the module for it built and loaded.
Hello again @TrevorH

I've tried your suggestion and the command shows:

Code: Select all

1 root@stream# ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: wlp0s20u2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
    link/ether 1c:bf:ce:e4:aa:40 brd ff:ff:ff:ff:ff:ff
2 root@stream# 
I take it this means the module is loaded, so I don't need to compile from source?

The only thing I'm not sure about is "mode DORMANT". Is this a problem?

In other tests, I pinged my main laptop and got 2% packet loss. However, when running the Chrome browser and logged into Facebook there was 52% packet loss. Am I overloading the Ralink RT5370 in some way? It could be that the USB ports on the HP Stream are a bit iffy: the machine has two ports and both show the errors described earlier in this thread.

Thanks again for your help.
Colin

colinabrett
Posts: 33
Joined: 2012/01/31 10:05:24
Contact:

Re: Ralink RT5370 USB Wifi: slow and dropping out

Post by colinabrett » 2021/04/02 04:32:10

As an aside, I'm seeing errors like this:

Code: Select all

4 root@stream# 
Message from syslogd@stream at Apr  2 05:26:37 ...
 kernel:Disabling IRQ #9

You have new mail in /var/spool/mail/root
4 root@stream# 
And abrt says that

Code: Select all

kernel crashed

irq 9: nobody cared (try booting with the "irqpoll" option)
Could this be related or is it a red herring?

Colin

colinabrett
Posts: 33
Joined: 2012/01/31 10:05:24
Contact:

Re: Ralink RT5370 USB Wifi: slow and dropping out

Post by colinabrett » 2021/04/10 11:09:17

After a short break, I've tried this laptop again. Still no joy, however.

We recently changed broadband suppliers and I gave the router a different name.

I use paired TP-LINK powerline adapters to boost wifi strength in my son's bedroom. His CentOS 7 laptop had occasional network problems and would try to reconnect to the old router name. This would fail, of course, and sometimes needed a reboot of the laptop to reconnect to the new router.

I reasoned that the clash between router names could be the underlying cause of the problem with the HP stream laptop, so I reset the adapters and re-paired them. While my son's laptop is working fine, the HP Stream's network connection is still playing up. Ping shows a 40% packet loss and nslookup times out three times out of four.

Before I wipe CentOS and try a different distro (perhaps Debian, where I'd have to learn all the sysadmin stuff from scratch) are there any other resources or techniques I could try? Perhaps a different USB adapter (though this seems to be chucking good money after bad) or should I try to build the driver from source?

As ever, thanks in advance for any hints and tips you can provide.

Colin

User avatar
KernelOops
Posts: 428
Joined: 2013/12/18 15:04:03
Location: xfs file system

Re: Ralink RT5370 USB Wifi: slow and dropping out

Post by KernelOops » 2021/04/10 21:43:12

I've had a very bad experience with another Ralink adapter, their drivers are badly coded and of low quality. Eventually, I scrapped it for another USB dongle that used different chipset.

I would suggest, you either move to Fedora (which comes with a very recent kernel) or if you want stay with CentOS, then try the kernel-ml from elrepo.
--
R.I.P. CentOS :cry:
--

Post Reply