mirror of
https://github.com/uhi22/pyPLC.git
synced 2024-11-10 01:05:42 +00:00
bugfix: resolved wrong declaration of non-dev-NMK as NMK. Improved logging.
This commit is contained in:
parent
533c95a507
commit
578bce9811
2 changed files with 4 additions and 4 deletions
|
@ -298,7 +298,7 @@ class fsmPev():
|
||||||
y = json.loads(strConverterResult)
|
y = json.loads(strConverterResult)
|
||||||
strResponseCode = y["ResponseCode"]
|
strResponseCode = y["ResponseCode"]
|
||||||
strEVSEProcessing = y["EVSEProcessing"]
|
strEVSEProcessing = y["EVSEProcessing"]
|
||||||
self.addToTrace("[PEV] The CableCheck result is " + strResponseCode + " " + strEVSEProcessing)
|
self.addToTrace("The CableCheck result is " + strResponseCode + " " + strEVSEProcessing)
|
||||||
except:
|
except:
|
||||||
self.addToTrace("ERROR: Could not decode the CableCheckRes")
|
self.addToTrace("ERROR: Could not decode the CableCheckRes")
|
||||||
# todo: check the request content, and fill response parameters
|
# todo: check the request content, and fill response parameters
|
||||||
|
|
|
@ -587,7 +587,7 @@ class pyPlcHomeplug():
|
||||||
for i in range(0, 7): # NID has 7 bytes
|
for i in range(0, 7): # NID has 7 bytes
|
||||||
self.NID[i] = self.myreceivebuffer[29+i]
|
self.NID[i] = self.myreceivebuffer[29+i]
|
||||||
s=s+hex(self.NID[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):
|
def evaluateSetKeyCnf(self):
|
||||||
|
@ -1062,8 +1062,8 @@ class pyPlcHomeplug():
|
||||||
self.findEthernetAdaptor()
|
self.findEthernetAdaptor()
|
||||||
self.sniffer = pcap.pcap(name=self.strInterfaceName, promisc=True, immediate=True, timeout_ms=50)
|
self.sniffer = pcap.pcap(name=self.strInterfaceName, promisc=True, immediate=True, timeout_ms=50)
|
||||||
self.sniffer.setnonblock(True)
|
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.NMKdevelopment = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ] # network key for development access
|
||||||
self.NMK = self.NMKdevelopment # a default network key
|
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.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.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.
|
self.evseMac = [0x55, 0x56, 0x57, 0xAA, 0xAA, 0xAA ] # a default evse MAC. Will be overwritten later.
|
||||||
|
|
Loading…
Reference in a new issue