ADD 1.增加找不到拨号端口日志;

main
wangbo 1 year ago
parent 70f7361f8b
commit 5b59ace186

@ -122,6 +122,7 @@ typedef enum _BOOT_MSG
BOOT_DAU_ERR_RESET, BOOT_DAU_ERR_RESET,
BOOT_PPP_NO_FOUND, BOOT_PPP_NO_FOUND,
BOOT_PPP_FOUND_LINK_FAIL, BOOT_PPP_FOUND_LINK_FAIL,
BOOT_TTYUSB_NO_FOUND,
BOOT_MAX, BOOT_MAX,
} BOOT_MSG; } BOOT_MSG;

@ -349,7 +349,7 @@ int _csg_response_realtime_data(int sendtype)
prtd->StartFlag1 = sysctrl.dev_hex_id; prtd->StartFlag1 = sysctrl.dev_hex_id;
prtd->FarmeType = sendtype; prtd->FarmeType = sendtype;
prtd->RunSecCnt = t - sysctrl.start_time; prtd->RunSecCnt = t - sysctrl.start_time;
prtd->Local_Vbat = 6500; prtd->Local_Vbat = pwr.vbat;
prtd->RMS_Ia = cauValues[0]; prtd->RMS_Ia = cauValues[0];
prtd->RMS_Ib = cauValues[1]; prtd->RMS_Ib = cauValues[1];
prtd->RMS_Ic = cauValues[2]; prtd->RMS_Ic = cauValues[2];

@ -343,8 +343,8 @@ int _network_ppp_check_test(void)
FILE *Read_fp; FILE *Read_fp;
int chars_read; int chars_read;
char buffer[1000]; char buffer[1000];
memset(buffer,0,1000); memset(buffer,0,sizeof(buffer));
memset(cmd,0,100); memset(cmd,0,sizeof(cmd));
sprintf(cmd,"ifconfig | grep ppp0"); sprintf(cmd,"ifconfig | grep ppp0");
Read_fp = popen(cmd,"r"); Read_fp = popen(cmd,"r");
if(Read_fp != NULL) if(Read_fp != NULL)
@ -487,7 +487,7 @@ void *_network_manage_thread(void *args)
if (++reset_cnt >= 6) if (++reset_cnt >= 6)
{ {
reset_cnt = 0; reset_cnt = 0;
reboot_system(LOG_NETWORK, BOOT_PPP_NO_FOUND); reboot_system(LOG_NETWORK, BOOT_TTYUSB_NO_FOUND);
} }
_network_usb_4g_power_on(); _network_usb_4g_power_on();

@ -607,6 +607,7 @@ boot_msg_t g_bootmsg[] =
{BOOT_DAU_ERR_RESET, "DAU communicate ERROR."}, {BOOT_DAU_ERR_RESET, "DAU communicate ERROR."},
{BOOT_PPP_NO_FOUND, "ppp0 not found."}, {BOOT_PPP_NO_FOUND, "ppp0 not found."},
{BOOT_PPP_FOUND_LINK_FAIL, "ppp0 found but link failed."}, {BOOT_PPP_FOUND_LINK_FAIL, "ppp0 found but link failed."},
{BOOT_TTYUSB_NO_FOUND, "/dev/ttyUSB3 not found."},
{BOOT_MAX, NULL} {BOOT_MAX, NULL}
}; };

Loading…
Cancel
Save