Read the statement by Michael Teeuw here.
SSH & VNC & Alexa disconnected after a brief moment of MagicMirror startup
-
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