uhi22 / pyPLC

Electric vehicle CCS charging investigations with Python
GNU General Public License v3.0
154 stars 35 forks source link

Often running into test case 1 TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT #2

Closed ArendJanKramer closed 1 year ago

ArendJanKramer commented 1 year ago

What could be the cause of frequently hitting test case 1 (TC_EVSE_ResponseCode_SequenceError_for_SessionSetup)? Can you explain what goes wrong?

afbeelding

[64ms] pyPlcTcpSocket listening on port 15118
[64ms] evsepi
[70ms] The socket is linked the following IP addresses:
[70ms] ::1
[70ms] ::1
[70ms] ::1
[100ms] [CONNMGR] ConnectionLevel changed from 0 to 5
[101ms] transmitting SET_KEY.REQ, to configure the EVSE modem with random NMK
[132ms] received SET_KEY.CNF
[132ms] SetKeyCnf says 1, this is formally 'rejected', but indeed ok.
[162ms] [CONNMGR] ConnectionLevel changed from 5 to 15
[26829ms] [CONNMGR] ConnectionLevel changed from 15 to 5
[38204ms] received SLAC_PARAM.REQ
[addressManager] pev has MAC 04:65:65:00:8F:4B
[38205ms] [EVSE] transmitting CM_SLAC_PARAM.CNF
[38449ms] received MNBC_SOUND.IND
[38450ms] received MNBC_SOUND.IND
[38531ms] received MNBC_SOUND.IND
[38532ms] received MNBC_SOUND.IND
[38533ms] received MNBC_SOUND.IND
[38533ms] received MNBC_SOUND.IND
[38615ms] received MNBC_SOUND.IND
[38615ms] received MNBC_SOUND.IND
[38616ms] received MNBC_SOUND.IND
[38616ms] received MNBC_SOUND.IND
[38617ms] [EVSE] transmitting ATTEN_CHAR.IND
[39587ms] received SLAC_MATCH.REQ
[39587ms] [EVSE] transmitting SLAC_MATCH.CNF
[addressManager] pev has IP fe80:0000:0000:0000:0665:65ff:fe00:8f4b
V2GTP (10bytes) = 01 FE 90 00 00 00 00 02 10 00 
Ok, this was a valid SDP request. We are the SECC. Sending SDP response.
SDP payload (20bytes) = FE 80 00 00 00 00 00 00 BC 66 69 FA 28 BE A3 59 3B 0E 10 00 
V2Gframe (28bytes) = 01 FE 90 01 00 00 00 14 FE 80 00 00 00 00 00 00 BC 66 69 FA 28 BE A3 59 3B 0E 10 00 
[44441ms] Connection from ('fe80::665:65ff:fe00:8f4b', 57240, 0, 4)
[44661ms] [EVSE] In state WaitForSupportedApplicationProtocolRequest, received (42bytes) = 01 FE 80 01 00 00 00 22 80 00 DB AB 93 71 D3 23 4B 71 D1 B9 81 89 91 89 D1 91 81 89 91 D2 6B 9B 3A 23 2B 30 02 00 00 04 00 40 
[44673ms] [EVSE] {
"msgName": "supportedAppProtocolReq",
"info": "34 bytes to convert", 
"error": "",
"result": "Vehicle supports 1 protocols. ProtocolEntry#1 ProtocolNamespace=urn:din:70121:2012:MsgDef Version=2.0 SchemaID=1 Priority=1 ",
"schema": "appHandshake",
"debug": ""
}
[44674ms] [EVSE] Detected DIN
[TESTSUITE] Setting up test case 1 TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
[44687ms] [EVSE] responding (12bytes) = 01 FE 80 01 00 00 00 04 80 40 00 40 
[44688ms] [EVSE] from 0 entering 1
[SNIFFER] EXI from 57240 to 15118 (34bytes) = 80 00 DB AB 93 71 D3 23 4B 71 D1 B9 81 89 91 89 D1 91 81 89 91 D2 6B 9B 3A 23 2B 30 02 00 00 04 00 40 
[SNIFFER] EXI from 15118 to 57240 (4bytes) = 80 40 00 40 
[SNIFFER] EXI from 57240 to 15118 (21bytes) = 80 9A 02 00 00 00 00 00 00 00 00 11 D0 18 11 95 94 02 3D 2C 00 
[44964ms] [EVSE] In state WaitForSessionSetupRequest, received (29bytes) = 01 FE 80 01 00 00 00 15 80 9A 02 00 00 00 00 00 00 00 00 11 D0 18 11 95 94 02 3D 2C 00 
[44976ms] [EVSE] {
"msgName": "SessionSetupReq",
"info": "21 bytes to convert", 
"error": "",
"result": "",
"schema": "DIN",
"g_errn": "0",
"header.SessionID": "0000000000000000",
"header.Notification_isUsed": "0",
"header.Signature_isUsed": "0",
"EVCCID.bytesLen": "6",
"EVCCID": "046565008f4b",
"debug": "Line532"
}
[44989ms] [EVSE] responding (31bytes) = 01 FE 80 01 00 00 00 17 80 9A 02 00 40 80 C1 01 41 81 C2 11 E0 20 1D 69 68 C0 C0 C0 C0 C0 80 
[TESTSUITE] Fired test case 1 TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
[44990ms] [EVSE] responding (40bytes) = 01 FE 80 01 00 00 00 20 80 9A 02 32 41 7B 66 15 14 A4 CB 91 E0 A0 2D 06 91 55 95 29 54 8C 08 41 E0 FC 1A F4 50 74 60 C0 
[44991ms] [EVSE] from 1 entering 2
[SNIFFER] EXI from 15118 to 57240 (32bytes) = 80 9A 02 32 41 7B 66 15 14 A4 CB 91 E0 A0 2D 06 91 55 95 29 54 8C 08 41 E0 FC 1A F4 50 74 60 C0 
[45185ms] connection closed
[45186ms] [EVSE] re-initializing fsmEvse due to broken connection
[45186ms] [EVSE] re-initializing fsmEvse
[45186ms] Trying to reset the TCP socket
[45187ms] pyPlcTcpSocket listening on port 15118
[45188ms] The socket is linked the following IP addresses:
[45189ms] ::1
[45189ms] ::1
[45189ms] ::1

Using SmartEVSE. Applying 5% PWM after 12V (DC) switches to 9V. Car: Hyundai Ioniq Electric 2018 28kWh

uhi22 commented 1 year ago

This means, a test case is fired. This is good when the evse is used to test the implementation of the pev. But in this case, you do not want this. The feature is (roughly) described here: https://github.com/uhi22/pyPLC#testing-and-simulation-on-desk The solution is to configure testsuite_enable = No in the pyPlc.ini.

ArendJanKramer commented 1 year ago

Oh wow, never expected that one. Pretty funny fix, thank you