|
@@ -112,7 +112,7 @@ void substr(char *dest, const char* src, unsigned int start, unsigned int cnt);
|
|
|
|
|
|
char *portName[3] = {"/dev/ttyUSB2", "/dev/ttyACM2", "/dev/ttyACM2"};
|
|
|
char *valid_Internet[2] = {"8.8.8.8", "180.76.76.76"};
|
|
|
-char *Version_And_Date[2] = {"V0.14","2022-09-12"};
|
|
|
+char *Version_And_Date[2] = {"V0.15","2022-11-04"};
|
|
|
pid_t pid;
|
|
|
|
|
|
struct dongle_info
|
|
@@ -224,12 +224,12 @@ int InitShareMemory()
|
|
|
//creat ShmOCPP16Data
|
|
|
if ((MeterSMId = shmget(ShmOcppModuleKey, sizeof(struct OCPP16Data), 0777)) < 0)
|
|
|
{
|
|
|
- DEBUG_ERROR("shmget ShmOCPP16Data NG");
|
|
|
+ DEBUG_ERROR("shmget ShmOCPP16Data NG\n");
|
|
|
result = FAIL;
|
|
|
}
|
|
|
else if ((ShmOCPP16Data = shmat(MeterSMId, NULL, 0)) == (void *) -1)
|
|
|
{
|
|
|
- DEBUG_ERROR("shmat ShmOCPP16Data NG");
|
|
|
+ DEBUG_ERROR("shmat ShmOCPP16Data NG\n");
|
|
|
result = FAIL;
|
|
|
}
|
|
|
else
|
|
@@ -1357,6 +1357,17 @@ void configNetworkMode(uint8_t actReq)
|
|
|
if(strstr(str, "ATE1") != NULL)
|
|
|
{
|
|
|
fprintf(fpDst, " OK \"AT+QCFG=\\\"nwscanmode\\\",%d,1\" \\\n", actReq);
|
|
|
+
|
|
|
+ if(actReq != NETWORK_MODE_GSM)
|
|
|
+ {
|
|
|
+ // Disable 2G band
|
|
|
+ fprintf(fpDst, " OK \"AT+QCFG=\\\"band\\\",3F0\" \\\n");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ // Enable 2G band
|
|
|
+ fprintf(fpDst, " OK \"AT+QCFG=\\\"band\\\",3FF\" \\\n");
|
|
|
+ }
|
|
|
}
|
|
|
memset(str, 0x00, ARRAY_SIZE(str));
|
|
|
}
|