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.