bugfix: resolved wrong declaration of non-dev-NMK as NMK. Improved logging.

This commit is contained in:
uhi22 2023-03-03 10:23:37 +01:00
parent 533c95a507
commit 578bce9811
2 changed files with 4 additions and 4 deletions

View file

@ -298,7 +298,7 @@ class fsmPev():
y = json.loads(strConverterResult)
strResponseCode = y["ResponseCode"]
strEVSEProcessing = y["EVSEProcessing"]
self.addToTrace("[PEV] The CableCheck result is " + strResponseCode + " " + strEVSEProcessing)
self.addToTrace("The CableCheck result is " + strResponseCode + " " + strEVSEProcessing)
except:
self.addToTrace("ERROR: Could not decode the CableCheckRes")
# todo: check the request content, and fill response parameters

View file

@ -587,7 +587,7 @@ class pyPlcHomeplug():
for i in range(0, 7): # NID has 7 bytes
self.NID[i] = self.myreceivebuffer[29+i]
s=s+hex(self.NID[i])+ " "
print("From GetKeyCnf, got network ID (NID) " + s)
self.addToTrace("From GetKeyCnf, got network ID (NID) " + s)
def evaluateSetKeyCnf(self):
@ -1062,8 +1062,8 @@ class pyPlcHomeplug():
self.findEthernetAdaptor()
self.sniffer = pcap.pcap(name=self.strInterfaceName, promisc=True, immediate=True, timeout_ms=50)
self.sniffer.setnonblock(True)
self.NMKdevelopment = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ] # a default network key
self.NMK = self.NMKdevelopment # a default network key
self.NMKdevelopment = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ] # network key for development access
self.NMK = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ] # a default network key. Will be overwritten later.
self.NID = [ 1, 2, 3, 4, 5, 6, 7 ] # a default network ID
self.pevMac = [0xDC, 0x0E, 0xA1, 0x11, 0x67, 0x08 ] # a default pev MAC. Will be overwritten later.
self.evseMac = [0x55, 0x56, 0x57, 0xAA, 0xAA, 0xAA ] # a default evse MAC. Will be overwritten later.