Forráskód Böngészése

2020.05.12 / Folus Wen

Actions:
1. EVSE/Modularization/Module_Wifi.c udhcpc add client hostname parameter with system id.
2. EVSE/Projects/AW-Regular/Apps/main.c udhcpc add client hostname parameter with system id.

Files:
1. As follow commit history

Image version: B0.40.XX.XXXX.XX
Image checksum: XXXXXXXX

Hardware PWB P/N : XXXXXXX
Hardware Version : XXXXXXX
FolusWen 4 éve
szülő
commit
5cdfd7e0c0

+ 2 - 2
EVSE/Modularization/Module_Wifi.c

@@ -739,7 +739,7 @@ int setWPAconf()
 			// Wifi IP set by DHCP client or static
 			if(ShmSysConfigAndInfo->SysConfig.AthInterface.WifiDhcpClient==0)
 			{
-				sprintf(cmdBuf, "/sbin/udhcpc -i %s -s /root/dhcp_script/wifi.script > /dev/null &", Wifi.currentInterface);
+				sprintf(cmdBuf, "/sbin/udhcpc -i %s -x hostname:CSU3_%s -s /root/dhcp_script/wifi.script > /dev/null &", Wifi.currentInterface, ShmSysConfigAndInfo->SysConfig.SystemId);
 				system(cmdBuf);
 			}
 			else
@@ -2787,7 +2787,7 @@ int checkIP(void)
 			system(cmd);
 			if(ShmSysConfigAndInfo->SysConfig.AthInterface.WifiDhcpClient==0)
 			{
-				sprintf(cmd, "/sbin/udhcpc -i %s -s /root/dhcp_script/wifi.script > /dev/null &", Wifi.currentInterface);
+				sprintf(cmd, "/sbin/udhcpc -i %s -x hostname:CSU3_%s -s /root/dhcp_script/wifi.script > /dev/null &", Wifi.currentInterface, ShmSysConfigAndInfo->SysConfig.SystemId);
 				system(cmd);
 			}
 			DEBUG_INFO("Sending DHCP request...\n");

+ 5 - 2
EVSE/Projects/AW-Regular/Apps/main.c

@@ -956,7 +956,10 @@ void InitEthernet()
 	system("echo nameserver 180.76.76.76 > /etc/resolv.conf");	//Baidu DNS server
 
 	if(ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthDhcpClient==0)
-		system("/sbin/udhcpc -i eth0 -s /root/dhcp_script/eth0.script > /dev/null &");
+	{
+		sprintf(tmpbuf, "/sbin/udhcpc -i eth0 -x hostname:CSU3_%s -s /root/dhcp_script/eth0.script > /dev/null &", ShmSysConfigAndInfo->SysConfig.SystemId);
+		system(tmpbuf);
+	}
 
 	// Upgrade system id to /etc/hostname
 	sprintf(tmpbuf, "echo %s > /etc/hostname", ShmSysConfigAndInfo->SysConfig.SystemId);
@@ -1178,7 +1181,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, "B0.39.00.0000.00");
+	sprintf((char*)ShmSysConfigAndInfo->SysInfo.CsuRootFsFwRev, "B0.40.00.0000.00");
 
 	// Get AC connector type from model name
 	for(uint8_t idx=0;idx<3;idx++)

BIN
EVSE/Projects/AW-Regular/Images/FactoryDefaultConfig.bin


BIN
EVSE/Projects/AW-Regular/Images/ramdisk.gz