Skip to main content
Home
for DLMS smart meters

Main navigation

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

Breadcrumb

  1. Home
  2. Issues With Connecting DLMS.XmlClient With HDLC E-mode In Python

Issues with connecting DLMS.XmlClient with HDLC e-mode in python

By IgorVasconcelos, 21 October, 2025
Forums
Gurux.DLMS

Hi,

I'm having problems connecting my meter to the XmlClient main.py file

I'm using this command:
python ./main.py -S COM6 -t Verbose -i HdlcWithModeE -c 16 -w 1 -f 256 -x "./Messages/LN/GetAssociationView.xml"

And receiving:

TX: 15:27:45 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 40 1E 5D FF FF 91 23 7E
Data send failed. Try to resend 1/3
Data send failed. Try to resend 2/3
RX: 15:28:00
Traceback (most recent call last):
File "C:\Gurux.DLMS.Python\Gurux.DLMS.XmlClient.python\main.py", line 165, in main
reader.aarqRequest()
~~~~~~~~~~~~~~~~~~^^
File "C:\Gurux.DLMS.Python\Gurux.DLMS.XmlClient.python\GXDLMSReader.py", line 74, in aarqRequest
self.readDataBlock(self.client.aarqRequest(), reply)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Gurux.DLMS.Python\Gurux.DLMS.XmlClient.python\GXDLMSReader.py", line 200, in readDataBlock
self.readDataBlock(it, reply)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
File "C:\Gurux.DLMS.Python\Gurux.DLMS.XmlClient.python\GXDLMSReader.py", line 203, in readDataBlock
self.readDLMSPacket(data, reply)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "C:\Gurux.DLMS.Python\Gurux.DLMS.XmlClient.python\GXDLMSReader.py", line 139, in readDLMSPacket
self.readDLMSPacket2(data, reply)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "C:\Gurux.DLMS.Python\Gurux.DLMS.XmlClient.python\GXDLMSReader.py", line 190, in readDLMSPacket2
raise e
File "C:\Gurux.DLMS.Python\Gurux.DLMS.XmlClient.python\GXDLMSReader.py", line 183, in readDLMSPacket2
raise TimeoutException("Failed to receive reply from the device in given time.")
gurux_common.TimeoutException.TimeoutException: Failed to receive reply from the device in given time.
Ended. Press any key to continue.

It seems like the program is not setting up e-mode connection correctly and I'm not sure how to do it myself. Can somebody help me?

IgorVasconcelos

1 month 2 weeks ago

HELP

It seems also that the xml main.py does not call initialize_connection which is strange

Profile picture for user Kurumi

Kurumi

1 month 2 weeks ago

Hi, The HdlcWithModeE…

Hi,

The HdlcWithModeE support is added to the XmlClient example. Get the latest version.

BR,
Mikko

IgorVasconcelos

1 month 2 weeks ago

Hi, I'll download it and…

Hi,

I'll download it and check if it works for me.

Thank you very much

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 12/02/2025 - 10:21
    gurux.dlms.c 9.0.2512.0201
  • Mon, 12/01/2025 - 13:55
    Gurux.DLMS.Python 1.0.193
  • Thu, 11/13/2025 - 15:23
    Gurux.DLMS.Python 1.0.192
  • Thu, 11/13/2025 - 14:55
    gurux.dlms.java 4.0.84
  • Wed, 10/29/2025 - 08:51
    gurux.dlms.c 9.0.2510.2901

New forum topics

  • DLMS Meter Gurux DLMS Director Properties
  • Using MAX3232 + FT232RL to Energy meter with GXDLMS Director
  • Incomplete Firmware Upgrade Process
  • SNRM byte mening
  • P384 Client Certificate incorrect issuer CN
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin