bkeister
Posts: 32
Joined: Tue Jan 10, 2017 3:29 am

wifi connection drops, then 'unreachable'

Thu Jul 11, 2019 12:27 pm

I have 5 Raspberry Pis running headless, 4 of which have an ethernet connection, while the fifth (Model 3 B+ with stretch OS) must run wifi as it is not near an ethernet port. Intermittently (can be a few minutes or 10 hours), the fifth unit disappears (I ssh into it from a Mac). I finally added a script to RPi-5 that would attempt to reconnect via

ip link set wlan0 up

with output to a log file. That file has repeated lines:

No network connection, restarting wlan0
connect: Network is unreachable

Because I can't ssh in, my only option is to unplug and re-power RPi-5.

Here are my questions:

1. Is there a better command line syntax for restarting wifi?
2. Is there a way for me to tell if the problem is actually hardware related (I've had this one less than a week)?

pcmanbob
Posts: 6630
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: wifi connection drops, then 'unreachable'

Thu Jul 11, 2019 2:15 pm

As a test I would try moving the pi closer to the wifi network router, to see if will stay connected then.
or
you could try this script I have running on one of my pi's that on wifi

Code: Select all

#!/bin/bash

# keep wifi alive
echo "................................................"
date "+%Y.%m.%d %H:%M:%S"
echo " "
ping -c2 192.168.1.1 
echo " "
 
if [ $? != 0 ] 
then 
  
  echo "No network connection, restarting wlan0"
  
  sudo ifconfig wlan0 down
  sleep 30
  sudo ifconfig wlan0 up
  
else
   cat /proc/net/wireless
fi
echo "................................................"
echo " "
not only will it attempt to reconnect but if there is a connection it logs the wifi information to a log file which includes link quality information.

like this

Code: Select all

................................................
2019.06.04 10:32:01
 
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=7.60 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=4.67 ms

--- 192.168.1.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 4.676/6.141/7.607/1.467 ms
 
Inter-| sta-|   Quality        |   Discarded packets               | Missed | WE
 face | tus | link level noise |  nwid  crypt   frag  retry   misc | beacon | 22
 wlan0: 0000   50.  -60.  -256        0      0      0     20      0        0
................................................
 
you will need to start it using cron with the line

Code: Select all

*/4 * * * * /home/pi/checkwifi.sh >> /home/pi/wifi.log 2>&1
so it runs every 4 mins assuming the file is called checkwifi.sh and is executable.


it might help to decide if your pi is on the edge of the wifi signal , just be aware the file can get big if left running .
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

bkeister
Posts: 32
Joined: Tue Jan 10, 2017 3:29 am

Re: wifi connection drops, then 'unreachable'

Thu Jul 11, 2019 3:07 pm

Thanks for the input. I had already implemented the shell script and cron entry that you've described.

I can move the RPi closer to the router, but my goal is to have it running a sensor in the house that I cannot move. I don't mind a dropped connection, but it's critical in practice that the RPi be able to recover on its own.

At this point when the RPi drops out of my ssh connection to it, I have to unplug and re-power it; if I do that it comes back immediately (no wifi problem), but then I have a chance to look at the log file, and it has only lines with "network unreachable".

I have "sleep 10" in the shell script. Is that long enough?

At this point the RPi is not able to recover on its own. So either I have configured this wrong, or else I have a hardware problem.

pcmanbob
Posts: 6630
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: wifi connection drops, then 'unreachable'

Thu Jul 11, 2019 3:25 pm

There is no sleep in my script because it runs once then exits , its then called again by cron 4 mins later,

your script may be different in that its only called once by cron then just loops , but I cant say without seeing it, does your script execute a ping to the server to keep the wifi connection open ?
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

bkeister
Posts: 32
Joined: Tue Jan 10, 2017 3:29 am

Re: wifi connection drops, then 'unreachable'

Thu Jul 11, 2019 4:19 pm

Here is the cron entry:

* * * * * /usr/bin/sudo -H /usr/local/bin/checkwifi >> wifi.log 2>&1

and here is the check wifi script (runs as root):

___________________
#!/bin/sh -f
ping -c4 192.168.1.1 > /dev/null

if [ $? != 0 ]
then
date
echo "No network connection, restarting wlan0"
ifconfig wlan0 down
sleep 30
ifconfig wlan0 up
fi
___________________

It doesn't loop, just gets called once per minute through cron.

I just noticed that this time the log file has a single line:

ping: sendmsg: Network is unreachable

(stderr not redirected to /dev/null)

There is no reconnection message, but also the connection was not dropped, in spite of the ping failure.

bls
Posts: 206
Joined: Mon Oct 22, 2018 11:25 pm

Re: wifi connection drops, then 'unreachable'

Thu Jul 11, 2019 4:56 pm

Is there anything relevant and useful in the system log (journalctl)?

bkeister
Posts: 32
Joined: Tue Jan 10, 2017 3:29 am

Re: wifi connection drops, then 'unreachable'

Thu Jul 11, 2019 5:51 pm

I don't see anything obvious, but then I'm not quite sure what I'm looking for in such a file (what's routine and what's not).

bls
Posts: 206
Joined: Mon Oct 22, 2018 11:25 pm

Re: wifi connection drops, then 'unreachable'

Thu Jul 11, 2019 6:41 pm

Here's an example of the kind of "WiFi bounce" errors that I get on one of my systems. Yours will probably look different, depending on how your network is configured (I use systemd-networkd. Other common choices are dhcpcd and NetworkManager).

Code: Select all

Jul 09 19:42:29 garagepi systemd-networkd[151]: wlan0: Lost carrier
Jul 09 19:42:29 garagepi systemd-networkd[151]: wlan0: DHCP lease lost
Jul 09 19:42:29 garagepi wpa_supplicant[365]: wlan0: Associated with 4c:01:43:65:49:f6
Jul 09 19:42:29 garagepi wpa_supplicant[365]: wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Jul 09 19:42:29 garagepi avahi-daemon[367]: Withdrawing address record for 192.168.xx.196 on wlan0.
Jul 09 19:42:29 garagepi avahi-daemon[367]: Leaving mDNS multicast group on interface wlan0.IPv4 with address 192.168.xx.196.
Jul 09 19:42:29 garagepi dbus[357]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service'
Jul 09 19:42:29 garagepi avahi-daemon[367]: Interface wlan0.IPv4 no longer relevant for mDNS.
Jul 09 19:42:29 garagepi systemd-networkd[151]: wlan0: Gained carrier

bkeister
Posts: 32
Joined: Tue Jan 10, 2017 3:29 am

Re: wifi connection drops, then 'unreachable'

Thu Jul 11, 2019 6:58 pm

I have a few entries like that:

Jul 11 09:17:16 Fermi3 dhcpcd[332]: wlan0: carrier lost
Jul 11 09:17:16 Fermi3 dhcpcd[332]: wlan0: deleting address fe80::e9da:5b7b:a540:1ee4
Jul 11 09:17:16 Fermi3 avahi-daemon[359]: Withdrawing address record for fe80::e9da:5b7b:a540:1ee4 on wlan0.
Jul 11 09:17:16 Fermi3 avahi-daemon[359]: Leaving mDNS multicast group on interface wlan0.IPv6 with address fe80::e9da:5b7b:a540:1ee4.
Jul 11 09:17:16 Fermi3 avahi-daemon[359]: Interface wlan0.IPv6 no longer relevant for mDNS.
Jul 11 09:17:19 Fermi3 dhcpcd[332]: wlan0: carrier acquired
Jul 11 09:17:19 Fermi3 dhcpcd[332]: wlan0: IAID eb:48:76:cd
Jul 11 09:17:19 Fermi3 dhcpcd[332]: wlan0: adding address fe80::e9da:5b7b:a540:1ee4

I guess to be useful, I need to write down when I lost the ssh connection to the RPi.

bkeister
Posts: 32
Joined: Tue Jan 10, 2017 3:29 am

Re: wifi connection drops, then 'unreachable'

Thu Jul 11, 2019 7:43 pm

Addendum: I now have a second line in the wifi.log file that reads

ping: sendmsg: Network is unreachable

I would think this would also involve a non-zero exit code from ping, which would trigger the wifi restart in the shell script, but I don't get the restart message from the script, and my ssh connection has been unbroken.

bkeister
Posts: 32
Joined: Tue Jan 10, 2017 3:29 am

Re: wifi connection drops, then 'unreachable'

Thu Jul 11, 2019 9:23 pm

It failed again, with wifi.log output every 5 minutes:

Thu Jul 11 16:50:14 EDT 2019
No network connection, restarting wlan0
connect: Network is unreachable
Thu Jul 11 16:55:01 EDT 2019
No network connection, restarting wlan0
connect: Network is unreachable
Thu Jul 11 17:00:01 EDT 2019
No network connection, restarting wlan0
connect: Network is unreachable
Thu Jul 11 17:05:01 EDT 2019
No network connection, restarting wlan0
connect: Network is unreachable
Thu Jul 11 17:10:01 EDT 2019
No network connection, restarting wlan0

I had to unplug and power up to get to this file.

While it was in this state, I connected a mouse, keyboard and monitor to it - no signal. It appears that the RPi is in some sort of semi-catatonic state where it keeps trying to reach a network but does not respond to a direct connection with keyboard and mouse.

pcmanbob
Posts: 6630
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: wifi connection drops, then 'unreachable'

Thu Jul 11, 2019 11:14 pm

If there is no hdmi screen attached and on at boot then there is no screen output , connecting one later after the pi has booted will not enable screen output.

May be you could try adding the WiFi details bit from my script to yours and changing your Cron line to write the output to a file to see what the WiFi signal is like.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

bls
Posts: 206
Joined: Mon Oct 22, 2018 11:25 pm

Re: wifi connection drops, then 'unreachable'

Thu Jul 11, 2019 11:54 pm

Can you correlate the times of the network dropping with the log entries showing wlan0 carrier lost?

bkeister
Posts: 32
Joined: Tue Jan 10, 2017 3:29 am

Re: wifi connection drops, then 'unreachable'

Fri Jul 12, 2019 1:14 pm

I've taken your suggestion and added lines to the shell script and modified the crontab entry so that nothing is thrown away. The RPi ran without trouble overnight. Then, between 8:15 and 8:20 this morning (cron runs every 5 minutes), it broke.

Here is the tail of the log file (after I restarted):
...................
Fri Jul 12 08:15:02 EDT 2019
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=4.29 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=7.15 ms

--- 192.168.1.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 4.295/5.727/7.159/1.432 ms
Inter-| sta-| Quality | Discarded packets | Missed | WE
face | tus | link level noise | nwid crypt frag retry misc | beacon | 22
wlan0: 0000 43. -67. -256 0 0 0 2 0 0
...................
Fri Jul 12 08:20:01 EDT 2019
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 192.168.1.193 icmp_seq=1 Destination Host Unreachable
From 192.168.1.193 icmp_seq=2 Destination Host Unreachable

--- 192.168.1.1 ping statistics ---
2 packets transmitted, 0 received, +2 errors, 100% packet loss, time 1027ms
pipe 2
No network connection, restarting wlan0
...................
Fri Jul 12 08:25:01 EDT 2019
connect: Network is unreachable
No network connection, restarting wlan0

During that time, if I tried ssh from my Mac, sometimes the terminal would hang, other times it would respond immediately with "host is down".

After restarting, I ran journalctl and inspected the output. There was no new content (less than 6 months old) until 8:17 (during the 5 minute period when wifi presumably failed) with dozens of entries, all within a few seconds of 8:17:00. Just one is "new USB device found", which makes no sense because I hadn't touched the board.

Here is the wifi carrier activity in the journal:

[Fermi3]~/% grep carrier journal
Jul 12 08:17:04 Fermi3 dhcpcd[342]: eth0: waiting for carrier
Jul 12 08:17:04 Fermi3 dhcpcd[342]: wlan0: waiting for carrier
Jul 12 08:17:04 Fermi3 dhcpcd[342]: wlan0: carrier acquired
Jul 12 08:17:04 Fermi3 dhcpcd[342]: wlan0: carrier lost
Jul 12 08:17:10 Fermi3 dhcpcd[342]: wlan0: carrier acquired
Jul 12 08:17:13 Fermi3 dhcpcd[342]: wlan0: carrier lost
Jul 12 08:17:16 Fermi3 dhcpcd[342]: wlan0: carrier acquired

So the journal has no record of the last loss of carrier, even though the shell script can't ping the router.

I'm not the expert who can put these strands together.

pcmanbob
Posts: 6630
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: wifi connection drops, then 'unreachable'

Fri Jul 12, 2019 1:21 pm

looking at the link level noise values you have they are about the same as my pi sees on my network so they seem ok , if they are all about the same.

It would be interesting to see if the wifi goes down at the same time every day, that might point to some thing that starting up that's interfering with the wifi , you could also try running the script at 2 min intervals I found that was about optimal in my case.

is there anything running on the pi that maybe become load intensive at about that time ?.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

bkeister
Posts: 32
Joined: Tue Jan 10, 2017 3:29 am

Re: wifi connection drops, then 'unreachable'

Fri Jul 12, 2019 2:25 pm

My ultimate goal for this pi is to run a GPIO temperature sensor with graphical output. I disconnected it yesterday, so at the time of the breakdown this morning it wasn't running anything except for a virtual desktop using tightvnc. I also was running some come intensive numerical calculations yesterday, but I terminated them because I could run them more quickly on another machine.

The journal file also has repeated instances of these lines every 5 minutes:

Jul 12 09:55:54 Fermi3 kernel: w1_master_driver w1_bus_master1: Attaching one wire slave 00.2a0000000000 crc 5d
Jul 12 09:55:54 Fermi3 kernel: w1_master_driver w1_bus_master1: Family 0 for 00.2a0000000000.5d is not registered.
Jul 12 09:56:33 Fermi3 kernel: w1_master_driver w1_bus_master1: Attaching one wire slave 00.aa0000000000 crc d1
Jul 12 09:56:33 Fermi3 kernel: w1_master_driver w1_bus_master1: Family 0 for 00.aa0000000000.d1 is not registered.
Jul 12 09:57:38 Fermi3 kernel: w1_master_driver w1_bus_master1: Attaching one wire slave 00.6a0000000000 crc 1b
Jul 12 09:57:38 Fermi3 kernel: w1_master_driver w1_bus_master1: Family 0 for 00.6a0000000000.1b is not registered.
Jul 12 09:58:40 Fermi3 kernel: w1_master_driver w1_bus_master1: Attaching one wire slave 00.ea0000000000 crc 97
Jul 12 09:58:40 Fermi3 kernel: w1_master_driver w1_bus_master1: Family 0 for 00.ea0000000000.97 is not registered.
Jul 12 09:59:20 Fermi3 kernel: w1_master_driver w1_bus_master1: Attaching one wire slave 00.1a0000000000 crc e3
Jul 12 09:59:20 Fermi3 kernel: w1_master_driver w1_bus_master1: Family 0 for 00.1a0000000000.e3 is not registered.

The temperature sensor is one-wire, but it's not connected now, and there's no software running it.

At this point I don't see any correlations between breakdowns and other activities or time of day. It can run without interruption for 10 hours, or only a few. It can fail in the middle of typing commands in an ssh terminal, or no activity al all.

pcmanbob
Posts: 6630
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: wifi connection drops, then 'unreachable'

Sat Jul 13, 2019 7:10 pm

bkeister wrote:
Fri Jul 12, 2019 2:25 pm
My ultimate goal for this pi is to run a GPIO temperature sensor with graphical output. I disconnected it yesterday, so at the time of the breakdown this morning it wasn't running anything except for a virtual desktop using tightvnc. I also was running some come intensive numerical calculations yesterday, but I terminated them because I could run them more quickly on another machine.

The journal file also has repeated instances of these lines every 5 minutes:

Jul 12 09:55:54 Fermi3 kernel: w1_master_driver w1_bus_master1: Attaching one wire slave 00.2a0000000000 crc 5d
Jul 12 09:55:54 Fermi3 kernel: w1_master_driver w1_bus_master1: Family 0 for 00.2a0000000000.5d is not registered.
Jul 12 09:56:33 Fermi3 kernel: w1_master_driver w1_bus_master1: Attaching one wire slave 00.aa0000000000 crc d1
Jul 12 09:56:33 Fermi3 kernel: w1_master_driver w1_bus_master1: Family 0 for 00.aa0000000000.d1 is not registered.
Jul 12 09:57:38 Fermi3 kernel: w1_master_driver w1_bus_master1: Attaching one wire slave 00.6a0000000000 crc 1b
Jul 12 09:57:38 Fermi3 kernel: w1_master_driver w1_bus_master1: Family 0 for 00.6a0000000000.1b is not registered.
Jul 12 09:58:40 Fermi3 kernel: w1_master_driver w1_bus_master1: Attaching one wire slave 00.ea0000000000 crc 97
Jul 12 09:58:40 Fermi3 kernel: w1_master_driver w1_bus_master1: Family 0 for 00.ea0000000000.97 is not registered.
Jul 12 09:59:20 Fermi3 kernel: w1_master_driver w1_bus_master1: Attaching one wire slave 00.1a0000000000 crc e3
Jul 12 09:59:20 Fermi3 kernel: w1_master_driver w1_bus_master1: Family 0 for 00.1a0000000000.e3 is not registered.

The temperature sensor is one-wire, but it's not connected now, and there's no software running it.

At this point I don't see any correlations between breakdowns and other activities or time of day. It can run without interruption for 10 hours, or only a few. It can fail in the middle of typing commands in an ssh terminal, or no activity al all.

That's just the 1-wire bus looking for new devices , I think you will find that the 1-wire bus checks for new device being connected every 5 min.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

bls
Posts: 206
Joined: Mon Oct 22, 2018 11:25 pm

Re: wifi connection drops, then 'unreachable'

Sat Jul 13, 2019 7:29 pm

bkeister wrote:
Fri Jul 12, 2019 1:14 pm

After restarting, I ran journalctl and inspected the output. There was no new content (less than 6 months old) until 8:17 (during the 5 minute period when wifi presumably failed) with dozens of entries, all within a few seconds of 8:17:00. Just one is "new USB device found", which makes no sense because I hadn't touched the board.

Here is the wifi carrier activity in the journal:

[Fermi3]~/% grep carrier journal
Jul 12 08:17:04 Fermi3 dhcpcd[342]: eth0: waiting for carrier
Jul 12 08:17:04 Fermi3 dhcpcd[342]: wlan0: waiting for carrier
Jul 12 08:17:04 Fermi3 dhcpcd[342]: wlan0: carrier acquired
Jul 12 08:17:04 Fermi3 dhcpcd[342]: wlan0: carrier lost
Jul 12 08:17:10 Fermi3 dhcpcd[342]: wlan0: carrier acquired
Jul 12 08:17:13 Fermi3 dhcpcd[342]: wlan0: carrier lost
Jul 12 08:17:16 Fermi3 dhcpcd[342]: wlan0: carrier acquired

So the journal has no record of the last loss of carrier, even though the shell script can't ping the router.

I'm not the expert who can put these strands together.
I'm a little confused. Could you post the journal from 8:15-8:25 (if it's not huge)? There may be other useful info in there that may help sort this out, and will most likely un-confuse me :lol:

bkeister
Posts: 32
Joined: Tue Jan 10, 2017 3:29 am

Re: wifi connection drops, then 'unreachable'

Sun Jul 14, 2019 6:08 pm

Sorry just saw your post. I think I've narrowed it down to lines like this in the journal:

Jul 14 07:59:46 Fermi3 kernel: brcmfmac: brcmf_sdio_hostmail: mailbox indicates firmware halted
Jul 14 07:59:49 Fermi3 kernel: brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
Jul 14 07:59:49 Fermi3 kernel: brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
Jul 14 07:59:49 Fermi3 kernel: brcmfmac: brcmf_run_escan: error (-110)
Jul 14 07:59:49 Fermi3 kernel: brcmfmac: brcmf_cfg80211_scan: scan error (-110)

Apparently brcmfmac is the wifi driver. There are posts on many web sites about these lines, and even some proposed fixes. Fixes are implemented, then overwritten by another update. I've tried updates, including "rbi-update" (that worked for some), and I still get the same behavior: wifi may work for 12 hours, or 1 hour, but the result is always the same. I have to pull the plug and restart.

At this point I've ordered a USB wifi dongle that I will try to use instead (has its own driver), as I see no solution to this.

bkeister
Posts: 32
Joined: Tue Jan 10, 2017 3:29 am

Re: wifi connection drops, then 'unreachable'

Mon Jul 15, 2019 2:45 pm

Here is the full sequence in a typical journal:

Jul 15 10:30:14 Fermi3 kernel: brcmfmac: brcmf_sdio_hostmail: mailbox indicates firmware halted
Jul 15 10:30:16 Fermi3 kernel: brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
Jul 15 10:30:16 Fermi3 kernel: brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
Jul 15 10:30:16 Fermi3 kernel: brcmfmac: brcmf_run_escan: error (-110)
Jul 15 10:30:16 Fermi3 kernel: brcmfmac: brcmf_cfg80211_scan: scan error (-110)
Jul 15 10:31:16 Fermi3 kernel: brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
Jul 15 10:31:16 Fermi3 kernel: brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
Jul 15 10:31:16 Fermi3 kernel: brcmfmac: brcmf_run_escan: error (-110)
Jul 15 10:31:16 Fermi3 kernel: brcmfmac: brcmf_cfg80211_scan: scan error (-110)
Jul 15 10:32:16 Fermi3 kernel: brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
Jul 15 10:32:16 Fermi3 kernel: brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
Jul 15 10:32:16 Fermi3 kernel: brcmfmac: brcmf_run_escan: error (-110)
Jul 15 10:32:16 Fermi3 kernel: brcmfmac: brcmf_cfg80211_scan: scan error (-110)
-- Reboot --

I find nothing predictable: sometimes wifi lasts for 18 hours, the 1 hour, then 10 minutes.

bkeister
Posts: 32
Joined: Tue Jan 10, 2017 3:29 am

Re: wifi connection drops, then 'unreachable'

Wed Jul 17, 2019 12:59 pm

(i'm afraid to say...) Here is what works:

1. Buy an Edimax 7811un wifi USB dongle ($10 at Amazon)
2. Make sure you have a clean OS on the SD card (without attempted fixes to the onboard wifi)
3. Put the onboard driver brcmfmac on the blacklist in /etc/modprobe.d to ensure that it does not load, grab an IP address and possibly interfere with the Edimax

The result is that signal quality is much better, and there has not been a single instance of wifi dropped. $10 is a modest investment, and the device doesn't add to the RPi footprint.

pcmanbob
Posts: 6630
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: wifi connection drops, then 'unreachable'

Wed Jul 17, 2019 1:10 pm

bkeister wrote:
Wed Jul 17, 2019 12:59 pm
(i'm afraid to say...) Here is what works:

1. Buy an Edimax 7811un wifi USB dongle ($10 at Amazon)
2. Make sure you have a clean OS on the SD card (without attempted fixes to the onboard wifi)
3. Put the onboard driver brcmfmac on the blacklist in /etc/modprobe.d to ensure that it does not load, grab an IP address and possibly interfere with the Edimax

The result is that signal quality is much better, and there has not been a single instance of wifi dropped. $10 is a modest investment, and the device doesn't add to the RPi footprint.
If that's what works for you and only cost $10 then go with it nothing saying you have to use the on board wifi.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

DavidVere
Posts: 1
Joined: Sun Aug 18, 2019 1:15 pm
Location: Banbury

Re: wifi connection drops, then 'unreachable'

Sun Aug 18, 2019 1:23 pm

Is anybody still grappling with this? Only my case is similar; I have two RPis on the network and a bunch of other devices Linux, Windows, Android &c.
What's happening is that initially everything plays nicely from my phone and my PCs I can SSH to the headless Pi(1), and to the usually headless Pi(3). I can also and frequently do SSH from my Pi(1) to my Pi(3). Then a little time goes by and nobody can SSH to Pi(3) EXCEPT Pi(1). So I end up going round that route. But I shouldn't have to.
As in the above discussion the troublesome RPi - Pi(3) - is attached by built-in wi-fi, the older Pi(1) by ethernet cable. All the other devices attach wirelessly.
Any insights?

Return to “Troubleshooting”