February 20, 20242 yr Hi there, Every week or so I lose Internet connectivity to my solar system (Orange Pi) System is fine but just internet access goes off. I have a standard router upstairs with a wifi Extender closer to the kitchen pantry downstairs. Reasonable connectivity but extender was required. The router and extender are on the same Wifi Channel 4. No neighbours on similar wifi channels. As soon as I reset the unit (turn off/on) everything is back to normal but is irritating when I'm travelling to monitor my system. Any suggestions Please...
February 20, 20242 yr Any chance of running a wired connection to the (Orange Pi), should be rock solid then?
February 20, 20242 yr Had frustrating WiFi connection with my Pi as well. The WiFi on the Pi is not one of it's strong points, unless it's really close. Cable connection sorted that out. Never had an issue since Â
February 21, 20242 yr I had a similar issue when I started with SA a couple of years back. But I would get connectivity drops 3 or 4 times a day. So kind of lived with it. The easy fix is with a dedicated network cable. A few months ago I had to upgrade my wifi router at home and the SA Pi has been solid ever since. MdF Edited February 22, 20242 yr by MdF
February 21, 20242 yr @BillC, what you could do, is run a shell script via cron on the Orange Pi, which sends a ping request to a know device on the internet, that should respond, like 8.8.8.8 and if it responds, no further action required, since your connection is obviously up, but if no response, for 3 times in a row, lets say, then do a reboot... run said shell script every minute, so you could be down for 3 minutes before it initiates a reboot... Best option still a wired connection, like @TimCam suggested, but if this can't be done, the above suggestion has been used many a times over many a decade, where flaky connections are problematic...
February 21, 20242 yr 9 hours ago, MdF said: There is no easy fix with a dedicated network cable. Not quite sure why you would have had a LAN cable issue, unless of course your router was wonky. If a LAN cable has issues then its either the cable or a port issue. As stated, if the WiFi is intermittent, the Network cable will resolve it, and there are enough reports on the Net about Pi and the limited WiFi range.Â
February 22, 20242 yr 15 hours ago, zsde said: Not quite sure why you would have had a LAN cable issue, unless of course your router was wonky. If a LAN cable has issues then its either the cable or a port issue. As stated, if the WiFi is intermittent, the Network cable will resolve it, and there are enough reports on the Net about Pi and the limited WiFi range. I was in a rush typing and didn't read my message properly. Meant to say The easy fix is a dedicated network cable. MdFÂ
February 22, 20242 yr Author Hi All, Many thanks for your advice and suggestions. Unfortunately the dedicated network cable is not a starter as my router is too far away from the Pi device. I had a thought that I might try to replicate the WiFi dropping out by switching off both my Router and Extender - simultaneously and separately. When the Wifi then restored itself, access to SA was instant and available. Didn't have to restart the Pi device !! So, I am not sure if that proves that the "connectivity" is not an issue..and points to the Pi Device itself..currently everything going well with the system Kalahari Meerkat - I need to get my head around what a shell script via cron can do for me and if this reboot can be done remotely (via phone preferably)
February 22, 20242 yr 1 hour ago, BillC said: Kalahari Meerkat - I need to get my head around what a shell script via cron can do for me and if this reboot can be done remotely (via phone preferably) Not sure SA allows remote or local login to the Linux system. Anyone tried?
February 23, 20242 yr 18 hours ago, BillC said: Kalahari Meerkat - I need to get my head around what a shell script via cron can do for me and if this reboot can be done remotely (via phone preferably) #!/bin/bash ping -c 3 -i 3 8.8.8.8 if [ $? -ne 0 ]; then if [ -f /tmp/two ]; then rm -f /tmp/one /tmp/two sync shutdown -rf now exit 1 fi if [ -f /tmp/one ]; then rm -f /tmp/one touch /tmp/two sync exit 1 fi touch /tmp/one sync exit 1 fi rm -f /tmp/one /tmp/two exit 0 The above script, for the bash shell, for instance, should do the trick. It should be saved in root's home directory with the name check-for-network-link to make sense in regards to the rest of the reply. I assume sa lets you have shell access locally, then you'd either as root run "crontab -e" or as a normal user, run "sudo crontab -e" and insert a line at the bottom of that file, which reads... * * * * * /bin/bash ~/check-for-network-link 2>&1 /dev/null the *'s meaning are... every minute, every hour, every day of the month, every month and every day of the week then the command that would be executed would be bash to run the shell script named check-for-network-link which should be located in the home directory of root, hence the ~/ and any and all output 2>&1 (errors out & normal output) sent to /dev/null and this would run once a minute. The shell script itself would send 3 ping echo requests to 8.8.8.8, which is one of google's DNS servers, which do reply with and ping echo reply, with 3 seconds between packets. If your sa box cannot get responses it will try again a minute later and yet again a minute later, if it fails three times (three) in a row, then it will execute "shutdown -rf now" which is a reboot, fast via shutdown, all running tasks will get told to terminate and eventually the machine will reboot, which should, hopefully get its network connection working again. Since the network connection is the problem, according to you, getting you to reboot it from the outside, is not likely, unless you can add some extra hardware you can control from the outside, that yanks the power out from under the machine in question and then powers it up again... bad idea, not a clean shutdown etc. So, letting the machine, based on its inability to reach a known entity on the internet, decide that after 3 minutes and 3 tries each time, with a 3 second delay in between, reboot automatically, if probably the best way of doing it. One more option, one could just re-initalise the wi-fi interface, somehow, but not having sa and in general not connecting via wi-fi myself, you'd have to get someone more in the know to help you replace the "shutdown -rf now" with something that rather than reboot, just re-initalises the wi-fi interface, which hopefully will also get the machine talking again...
February 23, 20242 yr 20 hours ago, BillC said: So, I am not sure if that proves that the "connectivity" is not an issue..and points to the Pi Device itself..currently everything going well with the system Did you test reaching the local IP interface during the "internet connection" outage? You can access SA unauthenticated through the local IP of the PI
March 11, 20242 yr On 2024/02/20 at 6:20 PM, BillC said: ... The router and extender are on the same Wifi Channel 4. No neighbours on similar wifi channels. ... Best practice would be to have your router and extender on different channels, not the same channel. This will let your client device think it is the same access point. Change the channel to 1 on the router and 6 on the extender. If you have neighbours that use these channels, then try 4 on the router and 8/9 on the extender.
March 13, 20242 yr Author Thanks for the feedback. Solid advice..😀 will try it as even my home laptop is jumping between my router and the extender !! Â
March 15, 20242 yr I had a similar problem with Pi3B's and Pi Zero's. After months of trying everything I could find on the net with regard to Pi settings ( nothing worked ), the problem turned out to be a router setting. By default, my Asus router came with Airtime Fairness enabled. Once disabled, the issue was no more. The Pi's haven't dropped since Edited March 15, 20242 yr by hilt_ctn
March 15, 20242 yr Author Thanks for the advice. Can't see Airtime Fairness on my TP link router...at the moment everything is working well and hasn't dropped out so I'm holding thumbsÂ
March 15, 20242 yr On 2024/02/23 at 11:07 AM, Kalahari Meerkat said: #!/bin/bash ping -c 3 -i 3 8.8.8.8 if [ $? -ne 0 ]; then if [ -f /tmp/two ]; then rm -f /tmp/one /tmp/two sync shutdown -rf now exit 1 fi if [ -f /tmp/one ]; then rm -f /tmp/one touch /tmp/two sync exit 1 fi touch /tmp/one sync exit 1 fi rm -f /tmp/one /tmp/two exit 0 The above script, for the bash shell, for instance, should do the trick. It should be saved in root's home directory with the name check-for-network-link to make sense in regards to the rest of the reply. I assume sa lets you have shell access locally, then you'd either as root run "crontab -e" or as a normal user, run "sudo crontab -e" and insert a line at the bottom of that file, which reads... * * * * * /bin/bash ~/check-for-network-link 2>&1 /dev/null the *'s meaning are... every minute, every hour, every day of the month, every month and every day of the week then the command that would be executed would be bash to run the shell script named check-for-network-link which should be located in the home directory of root, hence the ~/ and any and all output 2>&1 (errors out & normal output) sent to /dev/null and this would run once a minute. The shell script itself would send 3 ping echo requests to 8.8.8.8, which is one of google's DNS servers, which do reply with and ping echo reply, with 3 seconds between packets. If your sa box cannot get responses it will try again a minute later and yet again a minute later, if it fails three times (three) in a row, then it will execute "shutdown -rf now" which is a reboot, fast via shutdown, all running tasks will get told to terminate and eventually the machine will reboot, which should, hopefully get its network connection working again. Since the network connection is the problem, according to you, getting you to reboot it from the outside, is not likely, unless you can add some extra hardware you can control from the outside, that yanks the power out from under the machine in question and then powers it up again... bad idea, not a clean shutdown etc. So, letting the machine, based on its inability to reach a known entity on the internet, decide that after 3 minutes and 3 tries each time, with a 3 second delay in between, reboot automatically, if probably the best way of doing it. One more option, one could just re-initalise the wi-fi interface, somehow, but not having sa and in general not connecting via wi-fi myself, you'd have to get someone more in the know to help you replace the "shutdown -rf now" with something that rather than reboot, just re-initalises the wi-fi interface, which hopefully will also get the machine talking again... Â On 2024/02/21 at 8:03 AM, Kalahari Meerkat said: @BillC, what you could do, is run a shell script via cron on the Orange Pi, which sends a ping request to a know device on the internet, that should respond, like 8.8.8.8 and if it responds, no further action required, since your connection is obviously up, but if no response, for 3 times in a row, lets say, then do a reboot... run said shell script every minute, so you could be down for 3 minutes before it initiates a reboot... Best option still a wired connection, like @TimCam suggested, but if this can't be done, the above suggestion has been used many a times over many a decade, where flaky connections are problematic... 1) Isn't the SA device "locked down" so that less hacker types can't get shell access? 2) Instead of "shutdown -rf now" try restarting the WiFi. eg. ifconfig wlan0 down ifconfig wlan0 up iw reg get iw list iw wlan0 scan wpa_cli -i wlan0 scan_results I had an issue with the RPI4 WiFi to a Cell-Phone hotspot on the 5Ghz. The RPI regulatory domain for 5Ghz bands for ZA was different from the Phone bands for ZA. Intermittency, the RPI could not see the hotspot. Â Edited March 15, 20242 yr by system32
March 15, 20242 yr Unencrypted filesystems are usually not protected from physical attacks,like Rooting a phone using ADB
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.