Read the statement by Michael Teeuw here.
No Internet Connection Magic mirror
-
@cfenner What did you do? Did you recreate the mirror when you didn’t find the problem?
-
-
@cfenner i think I must reinstall the mirror too. I try some options, but when these does not solve the problem, I will do it like you ;-)
-
@cfenner I hope it works after that. I’d say it’s independent of the MM since the Pi itself doesn’t connect and not really just the mirror.
I’ll just test it and see if it works.
There’s probably nothing else left.
I will also test to plug in a WiFi repeater nearby to see if the signal is too weak. -
I had a similar issue whereby my connection kept dropping, my issue was due to poor WiFi connectivity so I created a simple bash script to restart the network connection every so often to bring it back onto the network. Here’s how I did it.
#!/bin/bash # The IP for the server you wish to ping (8.8.8.8 is a public Google DNS server) SERVER=192.168.240.254 # Only send two pings, sending output to /dev/null ping -c2 ${SERVER} > /dev/null # If the return code from ping ($?) is not 0 (meaning there was an error) if [ $? != 0 ] then # Restart the wireless interface ifconfig wlan0 down ifconfig wlan0 up
This was inside a file within my home area, the IP address on line 4 is of my router (I couldn’t see a need to ping an internet endpoint in my scenario). The last two lines may need amending depending on which network interface your MM is using. Once that file is created insert a crontab (crontab -e) and insert the following to restart the network connection every 30 minutes (adjust to your needs)
*/30 * * * * root /home/pi/scripts/wifi_rebooter.sh