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

2 months 3 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

2 months 3 weeks ago

Hi, The HdlcWithModeE…

Hi,

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

BR,
Mikko

IgorVasconcelos

2 months 3 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

  • Mon, 12/29/2025 - 10:38
    Gurux.Serial.Android 3.0.5
  • Mon, 12/15/2025 - 08:11
    Gurux.DLMS.Net 4.0.87
  • Fri, 12/12/2025 - 08:38
    Gurux.DLMS.Python 1.0.195
  • Thu, 12/11/2025 - 13:22
    Gurux.DLMS.Python 1.0.194
  • Thu, 12/11/2025 - 11:01
    gurux.dlms.java 4.0.88

New forum topics

  • 6-digit field values from meter not fully received (only 5 digits shown)
  • Gurux DLMS Android App
  • AMR support for bidirectional meters.
  • addition of new object in object list, meter not working
  • old meter take to much time(l&t)
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin