Read the statement by Michael Teeuw here.
SSH & VNC & Alexa disconnected after a brief moment of MagicMirror startup
-
Does your Router gives any information about the connection status of the pi? Maybe u can see, if it disconnects some time.
Also u could use an local Keyboard or mouse when the problem starts and watch the IP connection status.
Do you use DHCP or static IP?
what kind of Raspbian? -
Even when the SSH and VNC connection is cut my router shows the PI as connected via wifi. The only additional setting I did one is on the router under “Port forwarding/triggering”: which I set to Service name: HTTP, Service Type: TCP/UDP, External port range: 3000-3000, Internal portrange: 3000-3000.
In the MM config.js file I maintained IP address “localhost” and I put 0.0.0.0 under the whitelist IP.
With a keyboard attached to the PI I can use Ctrl-M to switch the display to GUI and I get back SSH and VNC connectivity but the connection is super slow and basically useless.
I am using the latest Raspbian Scretch 4.9 and all the programs are updated.
I also noticed, that after leaving the MM on for a couple of hours that the time and date/calender is correct as well as the messages but the holidays and news are showing waiting as well. -
I would also like to mention how I start Alexa and MagicMirror.
I wrote an sh file which is saved under Desktop. This file starts Alexa with Sudo lxtermin… in three individual terminals. after 40sec of waiting it starts pm2 start mm.sh (without sudo) then MM changes from the GUI (which shows the three Alexa terminals) to the MM screen. After a few sec .the problem starts. -
@Sputnik Hrm. Try this one: comment out the PM2 command in your script. Reboot your mirror and let Alexa start up normally. Open up an VNC connection to your mirror and then run the PM2 command. Give it a minute or so and see if that kills your connection. VNC is a desktop sharing app, so it’s going to be kind of bandwidth intensive. If you can just use SSH, you might find the network performance acceptable.
-
First to check: what power supply u use? Use a wrong or “low level” power supply can bring some strange issues.
check if there are shown any errors while booting the pi.
try
sudo iwlist wlan0 scan | egrep "Cell|ESSID|Signal|Rates"
to show wifi strength.
the port forwarding has nothing to say when you try to connect in your local wifi (when same wifi and ip-adress/subnet is in use).
how did u set up your network on the pi? in what file u put in your data and do u use DHCP or static ip? if using DHCP try to disable.
When the problem is being there, try to ping an external gateway like “www.google.de” via the local terminal on the pi. if that isn’t working there is such a problem with general ip-config.
Maybe check if the problem comes up when using an ethernet cable.if this works try the following:
type in the terminal “ifconfig” on your pi. also try “service sshd status” and “service ssh status” and wrote here what it throws out. thats to check, if the ssh daemon is running.
Also check “sudo netstat -tulpen” to show if the pi is waiting for a request on the right port.try that all first. i am just brainstorming, but its a little bit strange that the problem comes up when alexa starts.
does the problem comes up when you just boot up the pi without using alexa?? -
@cruunnerr said in SSH & VNC & Alexa disconnected after a brief moment of MagicMirror startup:
sudo iwlist wlan0 scan | egrep “Cell|ESSID|Signal|Rates”
My signal strength was indeed weak with -71dB. I changed the wifi channel from ch9 to ch6 and it improved. I will monitor now for a couple of days and see if the situation stabilizes.
-
I have a wifi watchdog installed because my wifi connection sometimes breaks off.
It automatically turn the wifi controller off and on again, when the pi can’t ping my router. Maybe u should check this out:http://alexba.in/blog/2015/01/14/automatically-reconnecting-wifi-on-a-raspberrypi/
I just replaced the used IP Adresse from this Tutorial with my routers IP adress.
Brainstorming again. Maybe your Pi doesnt have enough power for the wifi controller when u turn on your alexa, magicmirror and such other stuff.
So it cannot hold the connection with the -71db. Maybe a repeater would help, so with e.g. -49db the wifi Controller doesnt need too much power