FlightAware Discussions

Wifi drops on Raspi 4 PA 3.8.1

Hi,
Newbie here, so gently please :slight_smile:

New Raspberry Pi 4 2GB. Bought with Piaware SD install. Netgear Orbi Router home network works a treat with everything else.
Raspi repeatedly drops wifi randomly with “carrier lost”. Maximum connection is about 1 hour. Minimum 10 secs.

iwconfig gives


lo no wireless extensions.

wlan0 IEEE 802.11 ESSID:“Wi-Fi Network”
Mode:Managed Frequency:2.472 GHz Access Point: 3C:84:6A:51:45:9F
Bit Rate=150 Mb/s Tx-Power=31 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:off
Link Quality=70/70 Signal level=-23 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:16 Invalid misc:0 Missed beacon:0

eth0 no wireless extensions.


Worked my way tenaciously thru google and this site trying everything mentioned, anywhere.
power saving off.
IPv6 disabled
noarp

All to no avail!

Typical syslog extract (repeated ad nauseam)


Sep 14 16:33:18 piaware kernel: [ 6218.338762] brcmfmac: brcmf_cfg80211_scan: Connecting: status (3)

Sep 14 16:33:34 piaware dhcpcd[740]: wlan0: carrier acquired

Sep 14 16:33:34 piaware dhcpcd[740]: wlan0: IAID 32:c6:a4:94

Sep 14 16:33:34 piaware dhcpcd[740]: wlan0: rebinding lease of 192.168.1.35

Sep 14 16:33:35 piaware dhcpcd[740]: wlan0: leased 192.168.1.35 for 86400 seconds

Sep 14 16:33:35 piaware avahi-daemon[274]: Joining mDNS multicast group on interface wlan0.IPv4 with address 192.168.1.35.

Sep 14 16:33:35 piaware avahi-daemon[274]: New relevant interface wlan0.IPv4 for mDNS.

Sep 14 16:33:35 piaware avahi-daemon[274]: Registering new address record for 192.168.1.35 on wlan0.IPv4.

Sep 14 16:33:35 piaware dhcpcd[740]: wlan0: adding route to 192.168.1.0/24

Sep 14 16:33:35 piaware dhcpcd[740]: wlan0: adding default route via 192.168.1.1

Sep 14 16:33:35 piaware dhcpcd[740]: wlan0: soliciting an IPv6 router

Sep 14 16:33:35 piaware dhcpcd[740]: ipv6nd_startrs1: Address family not supported by protocol

Sep 14 16:33:36 piaware ntpd[803]: Listen normally on 12 wlan0 192.168.1.35:123

Sep 14 16:33:36 piaware ntpd[803]: new interface(s) found: waking up resolver

Sep 14 16:35:01 piaware CRON[8349]: (root) CMD (/usr/local/bin/checkwifi &> /dev/null)

Sep 14 16:37:54 piaware dhcpcd[740]: wlan0: carrier lost

Sep 14 16:37:54 piaware avahi-daemon[274]: Withdrawing address record for 192.168.1.35 on wlan0.

Sep 14 16:37:54 piaware avahi-daemon[274]: Leaving mDNS multicast group on interface wlan0.IPv4 with address 192.168.1.35.

Sep 14 16:37:54 piaware avahi-daemon[274]: Interface wlan0.IPv4 no longer relevant for mDNS.

Sep 14 16:37:54 piaware dhcpcd[740]: wlan0: deleting route to 192.168.1.0/24

Sep 14 16:37:54 piaware dhcpcd[740]: wlan0: deleting default route via 192.168.1.1

Sep 14 16:37:56 piaware ntpd[803]: Deleting interface #12 wlan0, 192.168.1.35#123, interface stats: received=0, sent=0, dropped=0, active_time=260 secs


Tried a different sd card with a Etcher image of 3.8.1.
Default settings. Still the same issue. Drops repeatedly.

Then tried FR24 image instead to see if I had a dodgy wifi chip.
Using FR24 image on new SD card I have rock solid wifi connection for hours at time.

So, to get to the point!!
I think there is something about the 3.8.1 image build that doesn’t play nicely with ?my Netgear mesh wifi? I see one similar comment on the forums - but no solution
I am a complete novice in Linux and networking so there has been a huge amount of learning, and trial and error. Beginning to wonder if I’m going mad!

I can use wired connection for now (no problems, rock solid) but would dearly love to get wireless working, as the best location for my antenna is in the middle of a field and I wanted to set up a solar powered remote site, which obviously I can’t cable to, so need reliable wifi !

In desperation I now post here, to see if anyone has any guidance to offer as to where I go from here?
I see that dhcpcd is under active development and wonder if a newer version of that may help, but I’ve absolutely no idea how to do that or if its even possible without wrecking the install.

Any help gratefully received
Pretty please :grinning:

ps tried DHCP and static IP address. No difference. Still “wlan0 carrier lost”

You can try rewriting the image.
I’d never trust what was written to an sd-card by some seller.

Oh you can also try upgrading the Raspbian to the most current state:

sudo apt update
sudo apt dist-upgrade

Apart from that you could just start with a normal Raspbian Lite image:
https://github.com/wiedehopf/adsb-wiki/wiki/Raspbian-Lite:-ADS-B-receiver

Thanks for your very prompt reply :+1:
I’d already tried a new image. But not tried the update. So I’m off to try that now.
Thanks again. I’ll report back.

With my previous Raspberry 4B bought last year i had also WiFi drops every now and then. Sometimes it was three times a day, sometimes it lasted several days.

I never got it fixed, the only solution i had was a check that my router was reachable. If not, the device performed a reboot.

I later moved the device indoor and replaced it with my old Pi3, after moving the Pi4 it never lost connection.

Now i am operating another Pi4 at the same spot and this one did not show the issue.
I know that doesn’t answer your question, but maybe the workaround helps.

Quick update. Got new SD card and used Raspberry Pi Imager to set up Raspbian Lite. With just this installed and nothing else, the wifi continues to flap. Updated and no better.
So got a different wireless AP out and tried it with that. Same result.
THink I just hity a lucky streak when I tried the FR24 Image. Probably didn’t leave it for long enough to properly test.
So, I’m coming to the conclusion this may be a hardware problem with the wifi chip, rather than software related. So I’ll chase that up now. Thanks for your help.

Not necessarily, they might be offering a somewhat older image.

There are some kernel downgrade instructions in here somwhere you can try:
FYI New Pi Kernel causes dump1090-fa to run much harder

As in go back to a 4.9 kernel.
WiFi issues are very annoying.

Does it reconnect? In that case it’s not hat bad i’d say :stuck_out_tongue_winking_eye:

Is there any chance the the RPI is in a metal case? That would affect WIFI performance.

1 Like

It is in a mixed plastic/metal case, but for testing purposes it is sat about 10cm from the router! To gets 70/70 and 21dB connection on iwconfig. So I dont think its a signal issue. But good thought. I’ll perhaps try it out of the case just to be sure.

Ah!
So much to learn!
I’m actually having quite a bit of fun trying to track this down, even though, as you say, it is frustrating!

I’ll perhaps give a go to downgrade the kernal. What could possibily go wrong :slight_smile:

It does reconnect, but can take a little while to do so. The site I’m looking at for permanent placement is not easy to access, so I want it as solid as I can, before going further.
Thanks again.

And whilst I’m on, a big thank you for the absolutely wonderful 1090graph and tar1090. Just brilliant!

In case the device is not accessible easily you should consider a sort of monitoring for it.
As already said, a simple ping to the router once every five minutes and a reboot if not reachable.

My device is outdoor on my balcony. Easy to access it, but i still have a script running. For the worst case it’s connected to a controlled power connector which i can switch off and on remotely

Thanks. Yes. I’ve got a little script which will ping the router and restart the wifi if no contact. Then reboots the Pi if still no contact after that.
But I dont really like workarounds for a problem that I’ve not fully got to the bottom of !!
But even if it was connected 100%, Id still want your suggested script as security anyway :slight_smile:

Yes, a workaround is never a a solution. But sometimes a permanent workaround creates less headache.

I also still does not understand why another Pi4 works outside without issues. And the same Pi4 causing trouble is now indoor up and running since 33 days

But some things i simply do not need to know

1 Like

Quick update. I’ve bought a Pi ZeroW as I want to use a solar powered set up, and using the same SD card in the Pi Zero I have not had a single WiFi drop out. Hurray :+1:
Definitely something about the Pi4 that’s wrong! Either the current software versions don’t play nicely with it or it’s a defective unit.
Anyway I’ve given up investigation for now, as I need to get the solar power set up working with the Zero. The Pi4 is temporarliy retired!

Yes, that was my case as well. I researched a lot, tried different drivers for the built-in WiFi but nothing worked.
Now the second Pi4 works exaclty at the same location without issues. It was up and running for 22 days but now i needed to shutdown for maintainance

Maybe a series which has the issue.

Maybe you want to try WiFi @ 5 GHz to avoid the 2.4 GHz/USB3 interferences: https://www.reddit.com/r/raspberry_pi/comments/gp3jhm/raspberry_pi_4s_usb_30_ports_are_causing/

I tried that as well. The result was at the end the same.
I also used different USB-Ports for the stick