Hi Mikko,
"I am working on a Python application using the Gurux GXDLMS library and need help modifying my code to read Profile Generic parameters. I understand that I first need to establish the association by reading the PC (Public Client) association. The invocation counter retrieved from the PC association needs to be updated in the US (User Side) properties before proceeding.
Once the invocation counter is updated in the US, I should be able to read the nameplate and other parameters successfully. However, I am having difficulty modifying my current implementation to handle this process correctly.
Could you provide a modified version of my code or guidance on how to properly set up the invocation counter from the PC association and update it in the US properties to read Profile Generic parameters effectively?"
settings = GXSettings()
global disc
settings.media = ser
reader = None
reader= GXDLMSReader(settings.client, settings.media, settings.trace, settings.invocationCounter)
settings.client.ciphering.security= Security.AUTHENTICATION_ENCRYPTION
settings.client.ciphering.SystemTitle = bytes(str(Entry3.get()), encoding="UTF-8")
settings.client.ciphering.blockCipherKey = bytes(str(Entry4.get()), encoding="UTF-8")
settings.client.ciphering.authenticationKey = bytes(str(Entry5.get()), encoding='UTF-8')
settings.client.ciphering.dedicatedKey = bytes(str(Entry6.get()), encoding="UTF-8")
settings.client.password = str(Entry1.get())
settings.client.clientAddress = 48
settings.client.serverAddress = 1
settings.trace = TraceLevel.INFO
settings.outputFile = "output.xml"
settings.client.ciphering.Security = SecuritySuite.AES_GCM_128
settings.client.hdlcSettings.DEFAULT_WINDOWS_SIZE_TX = 1
settings.client.hdlcSettings.DEFAULT_WINDOWS_SIZE_RX = 1
settings.client.isAuthenticationRequired = SourceDiagnostic.AUTHENTICATION_REQUIRED
settings.client.authentication = Authentication.HIGH
settings.client.ciphering.invocationCounter = 1000
Regards
Kavya
Hi Kavya, You need to read…
Hi Kavya,
You need to read the invocationCounter from the meter and not use the static value.
Try to read your meter with GXDLMSDirector first. GXDLMSDirector shown the command line arguments that you need to use to establish the connection to the meter.
DLMS is a complicated protocol and there are lots of settings. The connection fails if one of the settings is different than the meter expects.
BR,
Mikko
Hi Mikko, I have…
Hi Mikko,
I have successfully implemented the process of reading the Invocation Counter in GXDLMSDirector and now seek assistance in replicating this functionality in my custom application. In GXDLMSDirector, I first accessed the PC association and identified the Invocation Counter at #3 (OBIS Code: 0.0.43.1.3.255). I was able to retrieve the data from this Invocation Counter under the US Association property without any issues. Similarly, I need my application to replicate this process by retrieving the Invocation Counter using the 16 association and automatically updating it in the settings for the 48 association (US Association). This will enable seamless handling of the Invocation Counter and ensure secure communication. Could you please provide guidance or examples to help implement this functionality in my application?
Regards
Kavya
Hi, You should check the…
Hi,
You should check the client example:
https://github.com/Gurux/Gurux.DLMS.Net/tree/master/Gurux.DLMS.Client.E…
You can get the correct command line argument for the client example when you se
lect the meter in GXDLMSDirector.
BR,
Mikko