|
@@ -58,7 +58,7 @@ struct appHandEXIDocument ccs_handshake;
|
|
|
struct dinEXIDocument ccs_exi_doc_DIN;
|
|
|
struct iso1EXIDocument ccs_exi_doc_ISO1;
|
|
|
struct iso2EXIDocument ccs_exi_doc_ISO2;
|
|
|
-unsigned char V2GTP_Tx_buf[V2GTP_MSG_TX_BUFFER_SIZE]; //64*1024 �5,536 = 65.5KB
|
|
|
+unsigned char V2GTP_Tx_buf[V2GTP_MSG_TX_BUFFER_SIZE]; //64*1024 ?65,536 = 65.5KB
|
|
|
unsigned char buf_log_evcomm[SIZE_OF_LOG_BUFFER];
|
|
|
unsigned char buf_log_evcomm_fork1[SIZE_OF_LOG_BUFFER];
|
|
|
unsigned char buf_log_evcomm_fork2[SIZE_OF_LOG_BUFFER];
|
|
@@ -2458,7 +2458,6 @@ int MmeProcess(unsigned char *Buffer, int DataLength)
|
|
|
}
|
|
|
}
|
|
|
#endif
|
|
|
-
|
|
|
//[To-Do] Adding a pre-check filter mechanism for Source and Destination MAC Address
|
|
|
|
|
|
//check if the destination address is broadcast or EVSE itself, it can be ignore if not belong to itself.
|
|
@@ -2481,7 +2480,7 @@ int MmeProcess(unsigned char *Buffer, int DataLength)
|
|
|
//SAVE_SYS_LOG_MSG_EVCOMM("[SLAC][Rx]CM_SLAC_PARM_REQ: ignored(QCA7K init...)");
|
|
|
break;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//Check error state
|
|
|
state = Check_V2G_Flow_Status();
|
|
|
if (state == Performance_Timeout || //253
|
|
@@ -2493,7 +2492,7 @@ int MmeProcess(unsigned char *Buffer, int DataLength)
|
|
|
}
|
|
|
|
|
|
//Printing EV MAC Address
|
|
|
- SAVE_SYS_LOG_MSG_EVCOMM("[SLAC][Rx]CM_SLAC_PARM_REQ");
|
|
|
+ //SAVE_SYS_LOG_MSG_EVCOMM("[SLAC][Rx]CM_SLAC_PARM_REQ");
|
|
|
|
|
|
//Avoid Coupled SLAC_PARM_REQ
|
|
|
if (CheckConnectorPlugIn() == FALSE) //12V(State 1)
|
|
@@ -2519,8 +2518,8 @@ int MmeProcess(unsigned char *Buffer, int DataLength)
|
|
|
|
|
|
//=================== Legal CM_SLAC_PARM_REQ Zone =================
|
|
|
|
|
|
- Update_V2G_Flow_Status(CM_SLAC_PARM_REQ);
|
|
|
-
|
|
|
+ //Update_V2G_Flow_Status(CM_SLAC_PARM_REQ);
|
|
|
+
|
|
|
#if (SLAC_FIRST_RESPONSE_METHOD == SET_5_PWM_ONCE_RX_CM_SLAC_PARM_REQ)
|
|
|
{
|
|
|
//Once receiving CM_SLAC_PARM_REQ, set PWM as 5%
|
|
@@ -2528,14 +2527,14 @@ int MmeProcess(unsigned char *Buffer, int DataLength)
|
|
|
OutputCpPwmDuty(5);
|
|
|
}
|
|
|
#endif
|
|
|
-
|
|
|
+
|
|
|
//Checking if this SLAC Req comes before 5% PWM (for 15118)
|
|
|
- if(ShmInternalComm->ChargingPermission == FALSE)
|
|
|
+ /*if(ShmInternalComm->ChargingPermission == FALSE)
|
|
|
{
|
|
|
//Sniffer_Tcpdump(ENABLE);
|
|
|
sprintf(buf_log_evcomm, "Check Permission: %d (SLAC first => START)", ShmInternalComm->ChargingPermission);
|
|
|
SAVE_SYS_LOG_MSG_EVCOMM(buf_log_evcomm);
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
#if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == ENABLE)
|
|
|
{
|
|
@@ -2683,11 +2682,10 @@ int MmeProcess(unsigned char *Buffer, int DataLength)
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
- Update_V2G_Flow_Status(CM_SLAC_PARM_CONF);
|
|
|
Rtn = sendto(RawSock, &SendMmePacket, SendMmePacketSize, 0, (struct sockaddr*)&DestSocketAddress, sizeof(struct sockaddr_ll));
|
|
|
-
|
|
|
+ Update_V2G_Flow_Status(CM_SLAC_PARM_CONF);
|
|
|
DEBUG_PRINTF_EVCOMM_DETAIL("SendMmePacketSize=%d,Rtn=%d\n",SendMmePacketSize,Rtn);
|
|
|
-
|
|
|
+
|
|
|
ftime(&SeqStartTime);
|
|
|
break;
|
|
|
}
|
|
@@ -4703,7 +4701,15 @@ int SlacComm()
|
|
|
//if(DiffTimeb(SeqStartTime, SeqEndTime)>TT_match_response)
|
|
|
if(DiffTimeb(SeqStartTime, SeqEndTime) > TT_match_response) //extended to 400ms due to the response of CM_ATTEN_CHAR.RSP of some EVCC is slower than 200ms.
|
|
|
{
|
|
|
- sprintf(buf_log_evcomm,
|
|
|
+ // Alston - 2022/07/05 : Fix can't resend Atten_char_ind problem
|
|
|
+ if(EVCOMM_SYS_INFO.CM_ATTEN_CHAR_IND_retry < 2)
|
|
|
+ {
|
|
|
+ EVCOMM_SYS_INFO.CM_ATTEN_CHAR_IND_retry++;
|
|
|
+ Update_V2G_Flow_Status(CM_MNBC_SOUND_IND);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ sprintf(buf_log_evcomm,
|
|
|
"SlacComm: Wait CM_ATTEN_CHAR_RSP Timeout - TT_match_response (%.02lf of %dms)",
|
|
|
DiffTimeb(SeqStartTime, SeqEndTime),
|
|
|
TT_match_response);
|
|
@@ -4723,6 +4729,7 @@ int SlacComm()
|
|
|
|
|
|
Update_V2G_Flow_Status(Sequence_Timeout);
|
|
|
return -1;
|
|
|
+ }
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
@@ -17850,7 +17857,7 @@ int main(int argc, char *argv[])
|
|
|
#endif
|
|
|
|
|
|
SAVE_SYS_LOG_MSG_EVCOMM("[Init]DONE");
|
|
|
-
|
|
|
+
|
|
|
while(1)
|
|
|
{
|
|
|
//DEBUG_PRINTF_EVCOMM_DETAIL("\nV2gFlowStatus = %d\n", V2gFlowStatus);
|