Hello Carlos,
Since you're doing a connection from one internal host
to another internal host, you are NOT going through your router or
using it's port forward setting.
***Explain?? PC is ethernet and Pi is wireless, how is it not
going thought the router?
Ah.. ok, I didn't remember hearing the Rpi was on wifi.? None the
less, I bet the PC and the Rpi are still on the same LAN so while
they are indeed using the router, they aren't going through any NAT
/ portforward functionality.?? My new suspect here is that your Rpi
is periodically dropping it's Wifi connection.
This log entry is from your VNC Viewer and seems to
indicate that the server isn't responding to keepalive packets.?
Can you post some of the relevant logs from the VNC *Server* side
of things?
***I am having trouble finding this file
-
Ping test.
***ping stopped when I lost connection running on cloud and on
direct.
Right.. I bet you're loosing wifi connection on the Rpi side.? Do
you have a HDMI monitor + USB keyboard connected on the Rpi?? If so,
run a ping from the Rpi to the default gateway (aka your router)
going.? See if that occasionally drops.? I bet it does.? If that's
correct, you need to see what's going on here.? Here is a little
script you can run on the Raspberry Pi to see what it think's it's
Wifi signal strength is:
?/usr/local/bin/get-wifi-stats.sh
--
#!/bin/bash
# 05/25/21 - dranch - minor fixes
# 04/19/21 - dranch - original version
echo -en "\nWifi Signal strength: "
iw wlan0 station dump | grep signal | awk '{print $2}'?
echo -e "?? -70 dbm or less? : is a weak signal and the link will
drop if it gets much weaker"
echo -e "?? -60 dbm to -50?? : is a good signal"
echo -e "?? -40 dbm or better: is a great signal"
echo -en "\nWifi RX speed: "
iw wlan0 station dump | grep 'rx bitrate' | awk '{print $3}'
echo -en "Wifi TX speed: "
iw wlan0 station dump | grep 'tx bitrate' | awk '{print $3}'
echo -en "Wifi session reconnects since last reboot (`uptime | awk
'{print $3}'` days ago): "
iw wlan0 station dump | grep failed | awk '{print $3}'
echo " "
--
The output on one of my weakly connected Rpis is as follows:
--
Wifi Signal strength: -71
?? -70 dbm or less? : is a weak signal and the link will drop if it
gets much weaker
?? -60 dbm to -50?? : is a good signal
?? -40 dbm or better: is a great signal
Wifi RX speed: 26.0
Wifi TX speed: 39.0
Wifi session reconnects since last reboot (35 days ago): 53
--
--David