added handling of Authorization

This commit is contained in:
uhi22 2022-11-11 12:29:13 +01:00
parent e679123413
commit e9fd6c3068
3 changed files with 1240 additions and 3 deletions

View file

@ -231,8 +231,8 @@ def testReadExiFromFile():
if __name__ == "__main__":
nFail=0
print("Testing exiConnector...")
testReadExiFromFile()
exit()
#testReadExiFromFile()
#exit()
#testByteArrayConversion("123456")
#testByteArrayConversion("1234567")
#testByteArrayConversion("ABCDEF")
@ -269,6 +269,10 @@ if __name__ == "__main__":
testDecoder("80 9A 02 00 40 80 C1 01 41 81 C2 11 C0 00", pre="DD", comment="ServicePaymentSelectionRes")
print("The error response of the Ioniq with FAILED_ChargingSystemIncompatibility")
testDecoder("80 9A 02 00 40 80 C1 01 41 81 C2 11 30 20 00 0A 00 00 00 00", pre="DD", comment="PowerDeliveryReq")
print("The request of the Ioniq after ServicePaymentSelectionResponse")
testDecoder("80 9A 02 00 40 80 C1 01 41 81 C2 10 B8", pre="DD", comment="ContractAuthenticationReq")
if (False):
testDecoder("809a00113060", pre="DD", comment="PowerDeliveryReq")

View file

@ -124,7 +124,16 @@ class fsmEvse():
msg = addV2GTPHeader(exiEncode("EDg")) # EDg for Encode, Din, PreChargeResponse
print("responding " + prettyHexMessage(msg))
self.Tcp.transmit(msg)
self.enterState(stateWaitForFlexibleRequest) # todo: not clear, what is specified in DIN
self.enterState(stateWaitForFlexibleRequest) # todo: not clear, what is specified in DIN
if (strConverterResult.find("ContractAuthenticationReq")>0):
# todo: check the request content, and fill response parameters
msg = addV2GTPHeader(exiEncode("EDl")) # EDl for Encode, Din, ContractAuthenticationResponse
print("responding " + prettyHexMessage(msg))
self.Tcp.transmit(msg)
self.enterState(stateWaitForFlexibleRequest) # todo: not clear, what is specified in DIN
if (self.isTooLong()):
self.enterState(0)

File diff suppressed because it is too large Load diff