|
@@ -156,7 +156,17 @@ static void updateNetState(){
|
|
|
//5分钟仍然断网,则重启
|
|
|
if (netOffCount > netOffMax){
|
|
|
netOffCount = 0;
|
|
|
+
|
|
|
+ // 网卡重启
|
|
|
+ LOGD("断网300秒,网卡断电重启");
|
|
|
+ std::string heartStr = "NETRESET,1F";
|
|
|
+ LOGD("=====> the heartStr == %s", heartStr.c_str());
|
|
|
+ const char* sendMsg = heartStr.c_str();
|
|
|
+ sendProtocolTo(UART_TTYS2, (byte*)(sendMsg), strlen(sendMsg));
|
|
|
+
|
|
|
//重启
|
|
|
+ sleep(3);
|
|
|
+ LOGD("网卡重启无效,程序内部重启");
|
|
|
sync();
|
|
|
reboot(RB_AUTOBOOT);
|
|
|
}
|