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. Official Gurux.DLMS.Client.Example.Net Fails During High GMAC Secure Association (Invalid PDU), While Gurux Director Connects Successfully

Official Gurux.DLMS.Client.Example.Net fails during High GMAC secure association (Invalid PDU), while Gurux Director connects successfully

Profile picture for user utkarsh9460
By utkarsh9460 , 4 August, 2026
Forums
Gurux.Net

Hello Gurux Team,

I am using the latest official Gurux.DLMS.Client.Example.Net to communicate with a DLMS meter over a serial (HDLC) connection.

Environment
Gurux.DLMS : 9.0.2605.2801
Gurux.Common : 8.4.2503.602
Gurux.Serial : 8.4.2503.603
.NET Framework : 4.7.2
Communication : Serial (HDLC)
Meter Configuration
Interface Type : HDLC
Referencing : Logical Name (LN)
Authentication : HighGMAC
Security : AuthenticationEncryption
Security Suite : Suite0

Client Address : 30
Server Address : 1

Invocation Counter Object:
0.0.43.1.3.255

(I have omitted the actual System Title and Security Keys for security reasons.)

What works successfully

The official Client Example successfully performs:

Opens the serial port.
HDLC Handshake (SNRM / UA).
Initial AARQ / AARE association.
Reads the Invocation Counter (0.0.43.1.3.255).
Disconnects and reconnects for secure communication.

Example output:

SNRM -> UA OK
AARQ -> AARE OK
Invocation Counter Read OK

The invocation counter is read successfully before secure authentication.

Problem

The failure occurs during the second secure association (High GMAC).

The client sends the secure AARQ request, and the meter immediately replies with:

E6 E7 00 9E

After that, the Client Example throws:

System.InvalidOperationException: Invalid PDU

The exception occurs in:

GXDLMSReader.InitializeConnection()
GXDLMSReader.ReadDLMSPacket()
Important Observation

Using Gurux Director with the same meter, same communication settings, and same security configuration, the connection is successful.

The Gurux Director PDU trace shows:

HDLC Handshake OK
Initial Association OK
Read Invocation Counter OK
Secure Association OK
Encrypted Action Request OK
Encrypted Action Response OK

So the meter accepts secure authentication when using Gurux Director.

My Question

Is there any runtime configuration or client property that Gurux Director sets automatically, but the official Client Example does not?

Could this be related to:

Authentication mode
Secure AARQ generation
Client Address handling
Server System Title
Security configuration
Any recent library changes
I can provide
Gurux Director PDU trace
Client Example console log
Secure AARQ packet
.gxc project configuration
Full debug output

Could you please help identify why Gurux Director succeeds while the official Client Example fails during the secure High GMAC association?

Thank you.

Profile picture for user Kurumi

Kurumi

1 week 5 days ago

Hi, One of the DLMS…

Hi,

One of the DLMS arguments is different from what you are using, and the meter doesn't accept your connection.

Select your meter in GXDLMSDirector, and you can see the command-line arguments.
Use the same arguments with your client example, and you can connect to the meter.

Regards,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • 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
  • Thu, 07/23/2026 - 16:19
    gurux.dlms.java 4.0.96

New forum topics

  • negative indexing for custom method/attribute
  • System title
  • Elster a1800 clock reset to year 2000 with one tariff billing
  • Possible memory leak in file dlms.c, getCompactArrayItem(), getCompactArrayItem2()
  • Official Gurux.DLMS.Client.Example.Net fails during High GMAC secure association (Invalid PDU), while Gurux Director connects successfully
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin