Browse Source

[Added][AW-CCS][Module_FactoryConfig.c]
2022-10-27 / EASON YANG
Action:
1. Added: Use generation code to decide customer SHELL & AMAZON. And default factory setting.

File:
1. Module_FactoryConfig.c
Action 1

FIRMWARE VERSION: B0.63.XX.XXXX.PX

8009 2 years ago
parent
commit
b79734618b
1 changed files with 69 additions and 34 deletions
  1. 69 34
      EVSE/Projects/AW-CCS/Apps/Module_FactoryConfig.c

+ 69 - 34
EVSE/Projects/AW-CCS/Apps/Module_FactoryConfig.c

@@ -333,44 +333,79 @@ int main(int argc, char *argv[])
 	SysConfig.isReqFirstUpgrade = 1;		// 0: Skip first upgrade, 	1: Process first upgrade
 
 	// Customization configuration item
-	if(SysConfig.ModelName[12] == 'P')
+	if(SysConfig.ModelName[11] == 'S')
 	{
-		// PHIHONG standard configuration
-		strcpy((char*)SysConfig.OcppServerURL, "");
-		sprintf((char*)SysConfig.ChargeBoxId, "%s%s", SysConfig.ModelName, SysConfig.SerialNumber);
-		strcpy((char *)SysConfig.chargePointVendor, "");
-		strcpy((char*)SysConfig.MaintainServerURL, "wss://ocpp.phihong.com.tw:2013/");
-	}
-	else if(SysConfig.ModelName[12] == 'T')
-	{
-		// TOG customization configuration
-		SysConfig.AuthorisationMode = 0;				// 0: enable, 1: disable
-		SysConfig.RfidCardNumEndian = 1;				// 0: Little endian	1: Big endian
-		SysConfig.QRCodeMadeMode = 1;					// for isQRCode=1 ; 0: default	1:customized
-		strcpy((char*)SysConfig.QRCodeContent, "NA");	// for QRCodeMadeMode=1
-
-		SysConfig.AthInterface.WifiMode = 1;		// 0: Disable 1: Infrastructure client 2: Infrastructure server	3: Ad-Hoc
-		strcpy((char*)SysConfig.AthInterface.WifiSsid, "ChargeLab-EVC");
-		strcpy((char*)SysConfig.AthInterface.WifiPassword, "evc-pwd-default-21");
-
-		strcpy((char*)SysConfig.TelecomInterface.TelcomApn, "m2minternet.apn");
-
-		strcpy((char*)SysConfig.OcppServerURL, "wss://ocpp.io");
-		sprintf((char*)SysConfig.ChargeBoxId, "%s%s", SysConfig.ModelName, SysConfig.SerialNumber);
-		strcpy((char*)SysConfig.chargePointVendor, "ChargeLab");
-		SysConfig.OfflinePolicy = 0;			// 0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
+		if(SysConfig.ModelName[12] == 'P')
+		{
+			// AXLU111001DSP4 SHELL customization configuration
+			SysConfig.AuthorisationMode = 0;				// 0: enable, 1: disable
+			SysConfig.AthInterface.WifiMode = 0;			// 0: Disable 1: Infrastructure client 2: Infrastructure server	3: Ad-Hoc
+			SysConfig.TelecomInterface.TelcomEnabled = 1; 	// 0: disable, 1: enable
+			strcpy((char*)SysConfig.TelecomInterface.TelcomApn, "ESEYE1");
+			strcpy((char*)SysConfig.OcppServerURL, "wss://charge.greenlots.com:9092/greenlots/ocpp");
+			strcpy((char*)SysConfig.ChargeBoxId, "");
+			strcpy((char *)SysConfig.chargePointVendor, "SRS-Zerova");
+			strcpy((char*)SysConfig.MaintainServerURL, "");
+		}
+		else if(SysConfig.ModelName[12] == 'Z')
+		{
+			// AXLU111001DSZ4 AMAZON customization configuration
+			SysConfig.AuthorisationMode = 1;				// 0: enable, 1: disable
+			SysConfig.AthInterface.WifiMode = 0;			// 0: Disable 1: Infrastructure client 2: Infrastructure server	3: Ad-Hoc
+			SysConfig.TelecomInterface.TelcomEnabled = 1; 	// 0: disable, 1: enable
+			strcpy((char*)SysConfig.TelecomInterface.TelcomApn, "ESEYE1");
+			strcpy((char*)SysConfig.OcppServerURL, "wss://charge.greenlots.com:9092/greenlots/ocpp");
+			strcpy((char*)SysConfig.ChargeBoxId, "");
+			strcpy((char *)SysConfig.chargePointVendor, "Amazon");
+			strcpy((char*)SysConfig.MaintainServerURL, "");
+		}
+		else
+		{}
 	}
-	else if(SysConfig.ModelName[12] == 'Z')
+	else
 	{
-		// AMAZON customization configuration
-		SysConfig.AuthorisationMode = 1;				// 0: enable, 1: disable
-		SysConfig.AthInterface.WifiMode = 0;			// 0: Disable 1: Infrastructure client 2: Infrastructure server	3: Ad-Hoc
-		strcpy((char*)SysConfig.OcppServerURL, "");
-		strcpy((char*)SysConfig.ChargeBoxId, "");
-		strcpy((char *)SysConfig.chargePointVendor, "Amazon");
+		if(SysConfig.ModelName[12] == 'P')
+		{
+			// PHIHONG standard configuration
+			strcpy((char*)SysConfig.OcppServerURL, "");
+			sprintf((char*)SysConfig.ChargeBoxId, "%s%s", SysConfig.ModelName, SysConfig.SerialNumber);
+			strcpy((char *)SysConfig.chargePointVendor, "");
+			strcpy((char*)SysConfig.MaintainServerURL, "wss://ocpp.phihong.com.tw:2013/");
+		}
+		else if(SysConfig.ModelName[12] == 'T')
+		{
+			// TOG customization configuration
+			SysConfig.AuthorisationMode = 0;				// 0: enable, 1: disable
+			SysConfig.RfidCardNumEndian = 1;				// 0: Little endian	1: Big endian
+			SysConfig.QRCodeMadeMode = 1;					// for isQRCode=1 ; 0: default	1:customized
+			strcpy((char*)SysConfig.QRCodeContent, "NA");	// for QRCodeMadeMode=1
+
+			SysConfig.AthInterface.WifiMode = 1;		// 0: Disable 1: Infrastructure client 2: Infrastructure server	3: Ad-Hoc
+			strcpy((char*)SysConfig.AthInterface.WifiSsid, "ChargeLab-EVC");
+			strcpy((char*)SysConfig.AthInterface.WifiPassword, "evc-pwd-default-21");
+
+			strcpy((char*)SysConfig.TelecomInterface.TelcomApn, "m2minternet.apn");
+
+			strcpy((char*)SysConfig.OcppServerURL, "wss://ocpp.io");
+			sprintf((char*)SysConfig.ChargeBoxId, "%s%s", SysConfig.ModelName, SysConfig.SerialNumber);
+			strcpy((char*)SysConfig.chargePointVendor, "ChargeLab");
+			SysConfig.OfflinePolicy = 0;			// 0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
+		}
+		else if(SysConfig.ModelName[12] == 'Z')
+		{
+			// AXLU111001D1Z4 AMAZON customization configuration
+			SysConfig.AuthorisationMode = 1;				// 0: enable, 1: disable
+			SysConfig.AthInterface.WifiMode = 0;			// 0: Disable 1: Infrastructure client 2: Infrastructure server	3: Ad-Hoc
+			SysConfig.TelecomInterface.TelcomEnabled = 1; 	// 0: disable, 1: enable
+			strcpy((char*)SysConfig.TelecomInterface.TelcomApn, "ESEYE1");
+			strcpy((char*)SysConfig.OcppServerURL, "wss://charge.greenlots.com:9092/greenlots/ocpp");
+			strcpy((char*)SysConfig.ChargeBoxId, "");
+			strcpy((char *)SysConfig.chargePointVendor, "Amazon");
+			strcpy((char*)SysConfig.MaintainServerURL, "");
+		}
+		else
+		{}
 	}
-	else
-	{}
 
 	// Copy default configuration to pointer
 	memcpy(ptr,&SysConfig,sizeof(struct SysConfigData));