mnakada / atomcam_tools

Hack tool for atomcam and wyzecam.
Other
183 stars 22 forks source link

Hotfix/networking #13

Closed thematrixdev closed 2 years ago

thematrixdev commented 2 years ago

ip route default should exist after wifi connection is established. When there no wifi connection is made, there should be no value. So the value may be grabbed when there is still no connection, and ping-ing to an incorrect address since then.

Log before and after healthcheck, to determine if there is Internet (rather than LAN) connection issue.

mnakada commented 2 years ago

Wait until WiFi connection is made at the end of /etc/init.d/S38atomcam. By the time watchdog.sh is called, WiFi is connected.

I checked by connecting AtomCam2 serial console. The ip route default value is not output when WiFi is disconnected. Furthermore, even after WiFi is reconnected, the value is still not output.

If I try to read the router address inside the while loop, once the WiFi goes out, the router address will remain incorrect.

thematrixdev commented 2 years ago

I have updated some coding style according to IDE recommendation as well.

mnakada commented 2 years ago

I have updated some coding style according to IDE recommendation as well.

The sh in busybox requires a let to increment.

[root@atomswing:~]# a=1
[root@atomswing:~]# a++
-sh: a++: not found
[root@atomswing:~]# let a++
[root@atomswing:~]# echo $a
2