I have made the connection settings as below using python. I can read the objects when the auth is low and client address is 32. But i am having issue with high authentication.
Note: I have purposefully did not add passwords here.
if ser.isOpen():
print('if - 1')
settings.client.ciphering.security= Security.AUTHENTICATION_ENCRYPTION
settings.client.ciphering.invocationCounter = 1000
settings.client.useLogicalNameReferencing = True
settings.client.manufacturerId = bytearray("", encoding="UTF-8")
settings.client.standard = Standard.DLMS
settings.client.clientAddress = 48
settings.client.serverAddress = 1
settings.client.interfaceType = InterfaceType.HDLC
settings.client.ciphering.systemTitle = bytearray("", encoding="UTF-8")
settings.client.isAuthenticationRequired = SourceDiagnostic.AUTHENTICATION_REQUIRED
settings.client.authentication = Authentication.HIGH
settings.client.ciphering.blockCipherKey = bytearray("", encoding="UTF-8")
settings.client.ciphering.authenticationKey = bytearray("", encoding="UTF-8")
settings.client.ciphering.dedicatedKey = bytearray("", encoding="UTF-8")
settings.client.password= bytearray("", encoding="UTF-8")
settings.trace = TraceLevel.INFO
settings.outputFile = "output.txt"
settings.client.ciphering.Security = SecuritySuite.AES_GCM_128
I am getting the exception is output saying that "ParseApplicationAssociation response failed" Client to server did not match.
Forums
This is the output exception…
This is the output exception message.
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1008.0_x64__qbz5n2kfra8p0\Lib\tkinter\__init__.py", line 1948, in __call__
return self.func(*args)
^^^^^^^^^^^^^^^^
File "c:\Users\\Desktop\DLMS\US.py", line 312, in connect_to_serial
connection()
File "c:\Users\\Desktop\DLMS\US.py", line 345, in connection
reader.initializeConnection()
File "C:\Users\\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\gurux_dlms\GXDLMSReader.py", line 347, in initializeConnection
self.client.parseApplicationAssociationResponse(reply.data)
File "C:\Users\\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\gurux_dlms\GXDLMSClient.py", line 679, in parseApplicationAssociationResponse
raise Exception("parseApplicationAssociationResponse failed. " + " Server to Client do not match.")
Exception: parseApplicationAssociationResponse failed. Server to Client do not match.
Hi, I believe that your…
Hi,
I believe that your password, block cipher, or authentication key is invalid. Check that first.
BR,
Mikko
Hi Mikko I have checked the…
Hi Mikko
I have checked the password, blockcipher key and authentication key. Those are all as expected. The association works in GXDLMSDirector with the same auth information.
Regards
Aparna
From the frames it seems…
From the frames it seems that the invocation counter is not getting incremented for AARE.
SNRM
TX: 14:51:32 7E A0 07 03 61 93 69 47 7E 8
RX: 14:51:33 7E A0 1E 61 03 73 B5 7C 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E 8
ARQ
TX: 14:51:33 7E A0 72 03 61 10 E8 C5 E6 E6 00 60 64 A1 09 06 07 60 85 74 05 08 01 03 A6 0A 04 08 56 41 52 32 33 30 30 31 8A 02 07 80 8B 07 60 85 74 05 08 02 02 AC 08 80 06 40 56 41 52 2A 40 BE 34 04 32 21 30 30 00 00 0B B8 54 69 78 FB 02 CD 59 B3 04 8F 27 AE 35 15 D6 F1 FD 82 90 29 E4 8A 2A E2 97 9C CE DA 54 2F 24 32 46 02 41 53 CB 3B 68 65 A3 C8 2E 10 D7 7E 8
RX: 14:51:33 7E A0 77 61 03 30 AD 6C E6 E7 00 61 69 A1 09 06 07 60 85 74 05 08 01 03 A2 03 02 01 00 A3 05 A1 03 02 01 0E A4 0A 04 08 56 41 52 32 33 30 30 31 88 02 07 80 89 07 60 85 74 05 08 02 02 AA 12 80 10 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 BE 23 04 21 28 1F 30 00 00 00 02 00 BC C0 78 9D 81 B9 12 9F 13 81 B9 39 D8 32 9D 0A AB AE FE 29 89 81 8C E6 D7 FE 76 7E 8
TX: 14:51:33 7E A0 3E 03 61 32 7B 46 E6 E6 00 CB 30 30 00 00 0B B8 96 69 A9 BE 4B 84 1A DA 45 CA 96 FC 79 5D 94 D5 35 D5 8E C4 A2 EF A3 BE A0 FE 13 7B 68 78 89 1A D3 76 17 C2 98 BB 3A 89 C9 22 A2 BB 6C 7E 8
while - not receive data
Data send failed. Try to resend 1/3
RX: 14:51:43 7E A0 07 61 03 51 67 44 7E 8
Hi, Because I don't have the…
Hi,
Because I don't have the block cipher key I can't verify this fro the bytes. Have you read the frame (invocation) counter value from the meter before you establish the ciphered connection for the meter?
BR,
Mikko
I am unable to read the…
I am unable to read the invocation counter value even in PC as an object. I am getting the below exception[gurux_dlms.GXDLMSException.GXDLMSException: Access Error : Device reports a undefined object.] when reading the invocation counter object this way
client.useLogicalNameReferencing = True
client.clientAddress = 16
client.serverAddress = 1
client.authentication = None
client.interfaceType = InterfaceType.HDLC
settings.trace = TraceLevel.INFO
settings.outputFile = "output.txt"
sc.ciphering.security = Security.NONE
reader = None
reader= GXDLMSReader(settings.client, settings.media,
settings.trace, settings.invocationCounter)
#reader.invocationCounter = "0.0.43.1.3.255"
reader.initializeConnection()
d = GXDLMSData("0.0.43.1.1.255")
invo_Counter = reader.read(d,2)
I want to pass this value to the invocation counter settings in US auth type to check if it resolves the issue. Is there any other way to read invocation counter before ciphering?
Hi, I believe your meter is…
Hi,
I believe your meter is using a different OBIS code than 0.0.43.1.1.255 for the invocation counter object. Establish the connection for your meter with GXDLMSDirector and check what frame counter objects you can see.
Device reports an undefined object means that the object you try to access is not in the association view.
BR,
Mikko
Hi Mikko The meter which we…
Hi Mikko
The meter which we use does not have invocation counter obis code. Will it affect in communicating with meter in US? I can establish communication in PC and MR successfully and invocation counter is getting incremented as expected.
Regards
Aparna
Hi, Check the US password…
Hi,
Check the US password and block cipher and authentication keys. Also, make sure that the US client address is 48.
BR,
Mikko