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

9 months 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

9 months 2 weeks ago

Hi, The HdlcWithModeE…

Hi,

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

BR,
Mikko

IgorVasconcelos

9 months 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

  • Mon, 07/27/2026 - 12:37
    gurux.dlms.cpp 9.0.2607.2701
  • Thu, 07/23/2026 - 16:19
    gurux.dlms.java 4.0.96
  • Thu, 07/09/2026 - 14:34
    Gurux.DLMS.Python 1.0.201
  • Fri, 06/26/2026 - 16:32
    Gurux.Service 3.0.2606.2601
  • Wed, 06/24/2026 - 08:36
    Gurux.DLMS.Python 1.0.200

New forum topics

  • gurux_dlms.GXDateTime.GXDateTime object Error in Python
  • T_APPL_DATA_LN_N1 subtest 3 fails on an LN-only server regardless of the response to a non-existing-object GET
  • Version mismatch between Gurux.DLMS 9.x and Gurux.Common/Gurux.Serial 8.x
  • Service not known error on gprs communication
  • Help Needed: Interfacing Saral 100 Energy Meter with Microcontroller via RS232
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin