|
@@ -1880,26 +1880,29 @@ void InitEthernet()
|
|
|
if(cnt_pingDNS_Fail >= 3)
|
|
|
{
|
|
|
ShmStatusCodeData->InfoCode.InfoEvents.bits.InternetDisconnectViaEthernet=ON;
|
|
|
- if((ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthDhcpClient==0))
|
|
|
+ if(!ShmSysConfigAndInfo->SysInfo.OcppConnStatus)
|
|
|
{
|
|
|
- system("pgrep -f \"udhcpc -i eth0\" | xargs kill");
|
|
|
- sprintf(tmpbuf, "/sbin/udhcpc -i eth0 -x hostname:CSU3_%s -s /root/dhcp_script/eth0.script > /dev/null &", ShmSysConfigAndInfo->SysConfig.SystemId);
|
|
|
- system(tmpbuf);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- system("pgrep -f \"udhcpc -i eth0\" | xargs kill");
|
|
|
- memset(tmpbuf,0,256);
|
|
|
- sprintf(tmpbuf,"/sbin/ifconfig eth0 %s netmask %s up &",
|
|
|
- ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthIpAddress,
|
|
|
- ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthSubmaskAddress);
|
|
|
- system(tmpbuf);
|
|
|
- memset(tmpbuf,0,256);
|
|
|
- sprintf(tmpbuf,"route add default gw %s eth0 &",
|
|
|
- ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthGatewayAddress);
|
|
|
- system(tmpbuf);
|
|
|
+ if((ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthDhcpClient==0))
|
|
|
+ {
|
|
|
+ system("pgrep -f \"udhcpc -i eth0\" | xargs kill");
|
|
|
+ sprintf(tmpbuf, "/sbin/udhcpc -i eth0 -x hostname:CSU3_%s -s /root/dhcp_script/eth0.script > /dev/null &", ShmSysConfigAndInfo->SysConfig.SystemId);
|
|
|
+ system(tmpbuf);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ system("pgrep -f \"udhcpc -i eth0\" | xargs kill");
|
|
|
+ memset(tmpbuf,0,256);
|
|
|
+ sprintf(tmpbuf,"/sbin/ifconfig eth0 %s netmask %s up &",
|
|
|
+ ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthIpAddress,
|
|
|
+ ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthSubmaskAddress);
|
|
|
+ system(tmpbuf);
|
|
|
+ memset(tmpbuf,0,256);
|
|
|
+ sprintf(tmpbuf,"route add default gw %s eth0 &",
|
|
|
+ ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthGatewayAddress);
|
|
|
+ system(tmpbuf);
|
|
|
+ }
|
|
|
+ cnt_pingDNS_Fail = 0;
|
|
|
}
|
|
|
- cnt_pingDNS_Fail = 0;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -2206,7 +2209,7 @@ void get_firmware_version(unsigned char gun_index)
|
|
|
strcpy((char*)ShmSysConfigAndInfo->SysInfo.CsuPrimFwRev, ShmCharger->gun_info[gun_index].ver.Version_FW);
|
|
|
|
|
|
// Get CSU root file system version
|
|
|
- sprintf((char*)ShmSysConfigAndInfo->SysInfo.CsuRootFsFwRev, "V0.54.00.0000.00");
|
|
|
+ sprintf((char*)ShmSysConfigAndInfo->SysInfo.CsuRootFsFwRev, "V0.55.00.0000.00");
|
|
|
|
|
|
// Get AC connector type from model name
|
|
|
for(uint8_t idx=0;idx<3;idx++)
|