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.

  • Log in or register to post comments
  • 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

  • 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
  • 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
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin