Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Forums
  3. Authentication

Authentication

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

Profile picture for user gzpmanish
By gzpmanish , 4 March, 2020
Forums
Gurux.Serial

I am using Sumeru verde energy meter.
I am used Gurux.DLMS.Python to read the value of energy meter.
Where I can enter high level authentication key in the code ?

Profile picture for user Kurumi

Kurumi

6 years 3 months ago

Hi.

Hi.

You need to change the client address also.

client = GXDLMSClient(True, 0x30, 0x1, Authentication.HIGH, bytes("Password"), InterfaceType.HDLC)

BR,
Mikko

Profile picture for user gzpmanish

gzpmanish

6 years 3 months ago

In reply to Hi. by Kurumi

Sir, I am not understand

Sir, I am not understand which python file change these setting.
I am run the main.py file.

Profile picture for user Kurumi

Kurumi

6 years 3 months ago

Hi,

Hi,

Add parameters -a High -P "PASSWORD".

Client examples are supporting only ASCII password. If you want to use HEX, you need to hardcode it.

BR,
Mikko

Profile picture for user gzpmanish

gzpmanish

6 years 3 months ago

In reply to Hi, by Kurumi

Sir, My meter password is

Sir, My meter password is 2222222222222222 in decimal.
I am write a python main.py -S /dev/ttyUSB0 -a High -P "7E5196E2AE38E" in the terminal, its gives the error. It shown the below.

Authentication: Authentication.HIGH
ClientAddress: 0x10
ServerAddress: 0x1
DisconnectRequest
Traceback (most recent call last):
File "main.py", line 69, in main
reader.readAll()
File "/home/pi/dlms/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 485, in readAll
self.initializeConnection()
File "/home/pi/dlms/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 303, in initializeConnection
self.client.parseAareResponse(reply.data)
File "/home/pi/.local/lib/python2.7/site-packages/gurux_dlms/GXDLMSClient.py", line 522, in parseAareResponse
self.isAuthenticationRequired = _GXAPDU.parsePDU(self.settings, self.settings.cipher, reply, None) == SourceDiagnostic.AUTHENTICATION_REQUIRED
File "/home/pi/.local/lib/python2.7/site-packages/gurux_dlms/_GXAPDU.py", line 641, in parsePDU
ret = _GXAPDU.parsePDU2(settings, cipher, buff, xml)
File "/home/pi/.local/lib/python2.7/site-packages/gurux_dlms/_GXAPDU.py", line 807, in parsePDU2
raise GXDLMSException(resultComponent, resultDiagnosticValue)
GXDLMSException: Access Error : Device reports a hardware fault.
Ended. Press any key to continue.

Profile picture for user Kurumi

Kurumi

6 years 3 months ago

Hi,

Hi,

That is a hex string. You need to hard code it. You can try to give it as hex value:
""""""""
0x22 equals " in ASCII

BR,
Mikko

Profile picture for user gzpmanish

gzpmanish

6 years 3 months ago

In reply to Hi, by Kurumi

Its gives a error(python main

Its gives a error(python main.py -S /dev/ttyUSB0 -a High -P """""""" )
Authentication: Authentication.HIGH
ClientAddress: 0x10
ServerAddress: 0x1
DisconnectRequest
Traceback (most recent call last):
File "main.py", line 69, in main
reader.readAll()
File "/home/pi/dlms/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 485, in readAll
self.initializeConnection()
File "/home/pi/dlms/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 303, in initializeConnection
self.client.parseAareResponse(reply.data)
File "/home/pi/.local/lib/python2.7/site-packages/gurux_dlms/GXDLMSClient.py", line 522, in parseAareResponse
self.isAuthenticationRequired = _GXAPDU.parsePDU(self.settings, self.settings.cipher, reply, None) == SourceDiagnostic.AUTHENTICATION_REQUIRED
File "/home/pi/.local/lib/python2.7/site-packages/gurux_dlms/_GXAPDU.py", line 641, in parsePDU
ret = _GXAPDU.parsePDU2(settings, cipher, buff, xml)
File "/home/pi/.local/lib/python2.7/site-packages/gurux_dlms/_GXAPDU.py", line 807, in parsePDU2
raise GXDLMSException(resultComponent, resultDiagnosticValue)
GXDLMSException: Access Error : Device reports a hardware fault.
Ended. Press any key to continue.

Profile picture for user Kurumi

Kurumi

6 years 3 months ago

Hi,

Hi,

Can you run this with -t Verbose parameter?

BR,
Mikko

Profile picture for user gzpmanish

gzpmanish

6 years 3 months ago

In reply to Hi, by Kurumi

Its gives this error(python

Its gives this error(python main.py -S /dev/ttyUSB0 -a High -P """""""" -t Verbose).
Authentication: Authentication.HIGH
ClientAddress: 0x10
ServerAddress: 0x1
TX: 16:38:23 7E A0 07 03 21 93 0F 01 7E
RX: 16:38:23 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
TX: 16:38:23 7E A0 4C 03 21 10 3E 61 E6 E6 00 60 3E A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 02 AC 12 80 10 80 F4 1E 41 C2 2B EC 1D 96 AE A6 D1 6F 9A D1 27 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF 50 79 7E
RX: 16:38:23 7E A0 37 21 03 30 6C 7C E6 E7 00 61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 01 A3 05 A1 03 02 01 0D BE 10 04 0E 08 00 06 5F 1F 04 00 00 00 10 02 00 00 07 0F 53 7E
DisconnectRequest
TX: 16:38:23 7E A0 07 03 21 53 03 C7 7E
RX: 16:38:23 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
Traceback (most recent call last):
File "main.py", line 69, in main
reader.readAll()
File "/home/pi/dlms/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 485, in readAll
self.initializeConnection()
File "/home/pi/dlms/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 303, in initializeConnection
self.client.parseAareResponse(reply.data)
File "/home/pi/.local/lib/python2.7/site-packages/gurux_dlms/GXDLMSClient.py", line 522, in parseAareResponse
self.isAuthenticationRequired = _GXAPDU.parsePDU(self.settings, self.settings.cipher, reply, None) == SourceDiagnostic.AUTHENTICATION_REQUIRED
File "/home/pi/.local/lib/python2.7/site-packages/gurux_dlms/_GXAPDU.py", line 641, in parsePDU
ret = _GXAPDU.parsePDU2(settings, cipher, buff, xml)
File "/home/pi/.local/lib/python2.7/site-packages/gurux_dlms/_GXAPDU.py", line 807, in parsePDU2
raise GXDLMSException(resultComponent, resultDiagnosticValue)
GXDLMSException: Access Error : Device reports a hardware fault.
Ended. Press any key to continue.

Profile picture for user Kurumi

Kurumi

6 years 3 months ago

Hi,

Hi,

Your client address is wrong.It should be 48 (0x30). Try to add parameter -c 48

BR,
Mikko

Profile picture for user gzpmanish

gzpmanish

6 years 3 months ago

In reply to Hi, by Kurumi

Again its gives a error

Again its gives a error(python main.py -S /dev/ttyUSB0 -a High -P """""""" -c 48 -t Verbose).
Authentication: Authentication.HIGH
ClientAddress: 0x30
ServerAddress: 0x1
TX: 22:36:55 7E A0 07 03 61 93 69 47 7E
RX: 22:36:56 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
TX: 22:36:56 7E A0 4C 03 61 10 58 27 E6 E6 00 60 3E A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 02 AC 12 80 10 29 0E 8D 7D 51 D3 AC 66 32 FF 4F 28 77 E3 33 13 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF FC 78 7E
RX: 22:36:56 7E A0 58 61 03 30 07 51 E6 E7 00 61 4A A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 0E 88 02 07 80 89 07 60 85 74 05 08 02 02 AA 12 80 10 31 32 33 34 35 36 37 38 39 30 41 42 43 44 45 46 BE 10 04 0E 08 00 06 5F 1F 04 00 00 18 1D 02 00 00 07 93 D9 7E
DisconnectRequest
TX: 22:36:56 7E A0 07 03 61 53 65 81 7E
RX: 22:36:56 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
Traceback (most recent call last):
File "main.py", line 69, in main
reader.readAll()
File "/home/pi/dlms/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 485, in readAll
self.initializeConnection()
File "/home/pi/dlms/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 306, in initializeConnection
for it in self.client.getApplicationAssociationRequest():
File "/home/pi/.local/lib/python2.7/site-packages/gurux_dlms/GXDLMSClient.py", line 539, in getApplicationAssociationRequest
raise ValueError("Password is invalid.")
ValueError: Password is invalid.
Ended. Press any key to continue.

Profile picture for user Kurumi

Kurumi

6 years 3 months ago

Hi Manish,

Hi Manish,

You need to change password to the client example. Our locale settings are different and the password is not recognized for ASCII string.

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More

Who's new

  • Tuanhgg
  • Adel
  • charnon
  • Paddles
  • Miguel Ángel
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin