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. Node
  3. 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

11 months ago

HELP

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

Profile picture for user Kurumi

Kurumi

10 months 4 weeks ago

Hi, The HdlcWithModeE…

Hi,

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

BR,
Mikko

IgorVasconcelos

10 months 4 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

  • Wed, 08/26/2026 - 09:04
    Gurux.DLMS.Python 1.0.203
  • Mon, 08/17/2026 - 11:28
    Gurux.DLMS.Python 1.0.202
  • Mon, 08/17/2026 - 09:47
    gurux.dlms.cpp 9.0.2608.1701
  • Mon, 08/17/2026 - 09:25
    gurux.dlms.c 9.0.2608.1701
  • Mon, 07/27/2026 - 12:37
    gurux.dlms.cpp 9.0.2607.2701

New forum topics

  • Security vulnerability report — request for a private contact (GuruxDLMS.c / ANSI C)
  • Topic: Insufficient Memory Error When Reading Class 7 Profile Generic Objects
  • SN ReadResponse returns all-null values when response spans multiple HDLC frames
  • Gurux.Serial.Android 3.0.6 – CH340 (HL-340) USB-Serial Adapter Not Working,
  • Trying to talk to a L&G E360 meter (Using Python Gurux)
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin