Found 2 errors in AARQ generation in HLS mode in the length bytes :
Here is the diff
1 file changed, 2 insertions(+), 2 deletions(-)
Gurux.DLMS.python/gurux_dlms/_GXAPDU.py | 4 ++--
modified Gurux.DLMS.python/gurux_dlms/_GXAPDU.py
@@ -145,7 +145,7 @@ class _GXAPDU:
# Add calling-AP-title
data.setUInt8((BerType.CONTEXT.value | BerType.CONSTRUCTED.value | PduType.CALLING_AP_TITLE.value))
# LEN
- data.setUInt8((len(cipher.systemTitle)))
+ data.setUInt8((len(cipher.systemTitle))+2)
data.setUInt8(BerType.OCTET_STRING.value)
# LEN
data.setUInt8(len(cipher.systemTitle))
@@ -249,7 +249,7 @@ class _GXAPDU:
p.authenticationKey = cipher.authenticationKey
crypted = GXCiphering.encrypt(p, tmp.array())
# Length for AARQ user field
- data.setUInt8((len(crypted)))
+ data.setUInt8((2+len(crypted)))
# Coding the choice for user-information (Octet string,
# universal)
data.setUInt8(BerType.OCTET_STRING.value)
[back]
Hi,
Hi,
This is verified and fixed. Your name is added to the credits.
BR,
Mikko
Hi,
Hi,
This is verified and fixed. Your name is added to the credits.
BR,
Mikko