By jonasfoyth, 21 April, 2020 Forums Gurux.DLMS Hello, I am trying to use HIGH_GMAC authentication with the python module, but the configuration is not working. Configuration: self.media = GXNet(NetworkType.UDP, str(meter_idetintfication), PORT) self.client = GXDLMSSecureClient(True) self.client.interfaceType = InterfaceType.WRAPPER self.client.serverAddress = int(1) self.client.clientAddress = int(16) self.client.authentication = Authentication['HIGH_GMAC'] self.client.ciphering.security = Security.AUTHENTICATION_ENCRYPTION self.client.ciphering.systemTitle = GXByteBuffer.hexToBytes('3132333435363738') self.client.ciphering.authenticationkey = GXByteBuffer.hexToBytes(AUTHENTICATION_KEY) self.client.ciphering.blockCipherKey = GXByteBuffer.hexToBytes(BLOCK_CYPER_KEYY) self.client.useLogicalNameReferencing = True In GXDLSMDirector it's working. Any suggestions for testing the configuration? The image is the error when i execute this configuration. Hi, Hi, I just tested and it worked. Can you try to run example client like this: python main.py -h localhost -p 4061 -a HighGMac -T 3132333435363738 -A D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF -B 000102030405060708090A0B0C0D0E0F -t Verbose Update your keys to example. BR, Mikko Yes, it's working with some Yes, it's working with some more configurations: python main.py -h 192.168.6.22 -p 4059 -a HighGMac -c 16 -s 1 -w -r ln -T 3132333435363738 -A XXXXX-B XXXXX -t Verbose But when a run my scrip: raise GXDLMSException(resultComponent, resultDiagnosticValue) gurux_dlms.GXDLMSException.GXDLMSException: Access Error : Device reports a hardware fault. It's caused by using: self.client.ciphering.security = Security.AUTHENTICATION_ENCRYPTION (used in GXDLSMDirector to connect) when i run without that (i try to write in a object): gurux_dlms.GXDLMSException.GXDLMSException: Access Error : Device reports Read-Write denied. Hi, Hi, So your meter also requires a ciphered connection. Add -C parameter like this: -C AuthenticationEncryption If it fails, try to read the invocation counter adding -v parameter. BR, Mikko Thanks Mikko, it's working Thanks Mikko, it's working now. Log in or register to post comments
Hi, Hi, I just tested and it worked. Can you try to run example client like this: python main.py -h localhost -p 4061 -a HighGMac -T 3132333435363738 -A D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF -B 000102030405060708090A0B0C0D0E0F -t Verbose Update your keys to example. BR, Mikko
Yes, it's working with some Yes, it's working with some more configurations: python main.py -h 192.168.6.22 -p 4059 -a HighGMac -c 16 -s 1 -w -r ln -T 3132333435363738 -A XXXXX-B XXXXX -t Verbose But when a run my scrip: raise GXDLMSException(resultComponent, resultDiagnosticValue) gurux_dlms.GXDLMSException.GXDLMSException: Access Error : Device reports a hardware fault. It's caused by using: self.client.ciphering.security = Security.AUTHENTICATION_ENCRYPTION (used in GXDLSMDirector to connect) when i run without that (i try to write in a object): gurux_dlms.GXDLMSException.GXDLMSException: Access Error : Device reports Read-Write denied.
Hi, Hi, So your meter also requires a ciphered connection. Add -C parameter like this: -C AuthenticationEncryption If it fails, try to read the invocation counter adding -v parameter. BR, Mikko
Hi,
Hi,
I just tested and it worked. Can you try to run example client like this:
python main.py -h localhost -p 4061 -a HighGMac -T 3132333435363738 -A D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF -B 000102030405060708090A0B0C0D0E0F -t Verbose
Update your keys to example.
BR,
Mikko
Yes, it's working with some
Yes, it's working with some more configurations:
python main.py -h 192.168.6.22 -p 4059 -a HighGMac -c 16 -s 1 -w -r ln -T 3132333435363738 -A XXXXX-B XXXXX -t Verbose
But when a run my scrip:
raise GXDLMSException(resultComponent, resultDiagnosticValue)
gurux_dlms.GXDLMSException.GXDLMSException: Access Error : Device reports a hardware fault.
It's caused by using:
self.client.ciphering.security = Security.AUTHENTICATION_ENCRYPTION (used in GXDLSMDirector to connect)
when i run without that (i try to write in a object):
gurux_dlms.GXDLMSException.GXDLMSException: Access Error : Device reports Read-Write denied.
Hi,
Hi,
So your meter also requires a ciphered connection. Add -C parameter like this:
-C AuthenticationEncryption
If it fails, try to read the invocation counter adding -v parameter.
BR,
Mikko
Thanks Mikko, it's working
Thanks Mikko, it's working now.