RPi 3B dropping wifi connection after fresh install


After a fresh install of OSMC on a new SD card about two weeks ago, I have to report problems with my wifi connection using the OSMC adapter. I’ve chronicled some of my most recent struggles and apparent recent successes here separately, but now I’m throwing in the towel and seeking advice from those in the know.

My RPi 3B can’t seem to maintain a wireless connection for more than two days. The last time I connected successfully was Saturday 12/12/2020. It maintained the connection all day yesterday (Sunday) , but this morning (Monday) I could not ping the Pi (Ping returned “host unreachable”). I checked My OSMC>Network and there it reported that there was “no wireless connection”. The adapter could see my SSID so I clicked on it and elected to connect. I had to re-enter my password, and when I did, I got a message that the connection failed, but the colorful icons next to the SSID indicated that I did have a connection (the leftmost blue “dot” had a check mark in it). I exited back to the main menu and tried to ping the Pi from my laptop and did so successfully. Then I generated logs and was able to retrieve the URL for the log file. So, there evidently is internet connectivity despite the error message. Now, about 15 minutes later, My OSMC>Network reports “Connected”.

I have been through a lot of gyrations on network connectivity and I almost hesitate to bring them up again. My previous installation remained connected for weeks without difficulty but somehow my new installation cannot. I have a feeling I may have some wifi setting wrong but I don’t know.

I have moved the “template” file for the adapter to the .dat file and have placed BackgroundScanning=false into the etc/connman.conf file.

Here is the link to my most recent logfile: paste.osmc.tv/badetotuji

Thanks very much for any help.

Your WiFi connection is showing a large number of RX errors that might be causing the connection to drop:

wlan0: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC>  mtu 1500
        inet  netmask  broadcast
        ether 7c:dd:90:b7:67:5b  txqueuelen 1000  (Ethernet)
        RX packets 11136352  bytes 3465638002 (3.2 GiB)
        RX errors 61804  dropped 280742  overruns 171  frame 171
        TX packets 841800  bytes 233833643 (223.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

It might be down to a poor connection to the AP, external interference or an issue with the adapter itself. Changing the position of the Pi might help, as might changing the channel. If possible, run a channel survey to see what’s running nearby.

Thanks for your help and insight. A couple points before I start changing things, in case they’re relevant:

First , the Pi is connected to the adapter via a USB cable about 10 ft long. The adapter itself is mounted atop a piece of furniture so that it is closer and more “visible” to the AP. This has been the case for several years, without any connectivity issues. I can move the adapter to another spot if you still think that might be helpful.

When I run “Wifi Analyzer” on my cell phone, I’m seeing another SSID intermittently that looks like it could be interfering with mine. There is no name associated with it. Maybe it’s one of my neighbor’s, and he/she has changed something recently to cause new problems for me?

I can change the channel and see what happens. I’m currently on 42. I know there are some issues with military use of certain channels, so I’m going to have to go back and revisit what they are and what my options are for that. Again, it is perhaps useful to note that I have about 10 other devices connected to this SSID. They’re experiencing no difficulty.

I’ll also note that, when I do have a wireless connection, it’s pretty good quality. iperf reports speeds of around 80 Mbps, more than satisfactory for my needs.

I’m inclined to think that the problem is with the adapter itself, although it’s the same one that was running fine 2 weeks ago. Could something have messed it up when I did the fresh install?

Again thank you very much for your support and insight. Do any of these observations suggest a path forward for me?

It’s always difficult to pin down problems with WiFi. It might be down to one or all of the following:

  • insufficient voltage to the Pi;
  • voltage drop over the USB cable caused by a kink or poor connection;
  • intermittent interference from a nearby device; or
  • an issue with the dongle itself.

If the problem started immediately after you reinstalled OSMC, that could be because there’s something not quite right with the new installation or might simply be down to you having physically disturbed the device or connections/cables in some way.

FYI, all the disconnects in the log occurred close together after 5am on 14 Dec. The first four had a reason code of zero, whatever that means, and the final one had a reason code of 3, which seems to mean that you were disconnected (“deauthenticated”) by the access point itself. The device reconnected at 10:23:19, possibly because of manual action on your part.

Dec 14 05:38:32 osmc wpa_supplicant[200]: wlan0: CTRL-EVENT-DISCONNECTED bssid=d4:b2:7a:44:b3:7e reason=0
Dec 14 05:46:30 osmc wpa_supplicant[200]: wlan0: CTRL-EVENT-DISCONNECTED bssid=d4:b2:7a:44:b3:7e reason=0
Dec 14 05:46:55 osmc wpa_supplicant[200]: wlan0: CTRL-EVENT-DISCONNECTED bssid=d4:b2:7a:44:b3:7e reason=0
Dec 14 05:52:01 osmc wpa_supplicant[200]: wlan0: CTRL-EVENT-DISCONNECTED bssid=d4:b2:7a:44:b3:7e reason=0
Dec 14 05:52:20 osmc wpa_supplicant[200]: wlan0: CTRL-EVENT-DISCONNECTED bssid=d4:b2:7a:44:b3:7e reason=3 locally_generated=1

Given that all the disconnects occurred within a short timeframe early in the morning, it could be a problem caused by external interference. For now, I would suggest you monitor the situation further and see if a pattern emerges.

Thank you. I’ll monitor and advise accordingly. Regarding your points from above:

  • I thought about the possible need for a new power supply. The “old” installation started performing very erratically which lead to my replacing the SD card and reinstalling OSMC. Perhaps a bad power supply contributed to the SD card failure? I have seen no other “erratic” behavior other than wifi drops, since the new installation, so I’m doubting it’s a power supply problem. I guess I could get a powered USB hub to plug the dongle into as well, but, again, that wasn’t needed before. With that in mind, could I use an “old” USB 2.0 hub that I’ve currently connected to my Windows computer?

  • I did unplug and plug in the USB cable a few times during the course of the new installation as I switched from ethernet to wireless connections. I wrangled with this thing for several hours before I got wireless to work. I checked the physical USB connection just now and it seems solid. I did not introduce any kinks during the new installation

  • My Roku TV is right next to the Pi and connects to the internet using this SSID from time to time. It could be that it connects every other day between 5 and 6 am. I’ll keep an eye on the timing of disconnects in the logs. Also, there is a nameless SSID running on the same channel I am. It does not, however, appear to be impacting the Pi’s wifi performance now though, so I suspect that’s not the problem

You’re right, I reconnected manually about 10:23 this morning.

Is there a sleep setting on this dongle the could be the culprit? It seems like the RX errors are concentrated around 5:45 this morning and there were very few at other times during the last couple days. Maybe the dongle went to sleep at that time? I wasn’t aware of anything like this before, but maybe I missed something related in the new installation. I haven’t changed anything except adding the “BackgroundScanning=false” since the install.

Again, thanks for your help. I’ll keep an eye on things and report back any findings here.

1 Like