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

Conformance Tests

By Alexandre K. Zim , 21 March, 2024
Forums
DLMSDirector

Hi

I began executing conformance test in my "meter simulator" and something strange happened. It is at "Initialize tests" in "HDLC Conformance Tests".

Please, see log below:

16:08:27 Send SNRM request.
TX: 7E A0 07 03 21 93 0F 01 7E
16:08:27
RX: 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
16:08:27 Send AARQ request.
TX: 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 62 1E 5D FF FF 88 55 7E
16:08:27
RX: 7E A0 43 21 03 30 C5 54 E6 E7 00 61 35 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 A4 0A 04 08 4D 4D 4D 00 00 BC 61 4E BE 10 04 0E 08 00 06 5F 1F 04 00 00 12 19 01 1B 00 07 85 A8 7E
16:08:27 HDLC test #1. Disconnect request
TX: 7E A0 07 03 21 53 03 C7 7E
16:08:27
RX: 7E A0 07 21 03 73 01 40 7E
16:08:27 HDLC test #1. SNRM request
TX: 7E A0 07 03 21 93 0F 01 7E
16:08:27
RX: 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
16:08:27
SNRM request succeeded. MaxInfoLengthTransmit: 128 MaxInfoLengthReceive: 128 WindowSizeTransmit: 1 WindowSizeReceive: 1

16:08:27 HDLC test #1. Receiver Ready
TX: 7E A0 07 03 21 11 15 A6 7E
16:08:32 Data send failed. Try to resend 1/3 7E A0 07 21 03 11 15 00 7E
16:08:37 Data send failed. Try to resend 2/3 7E A0 07 21 03 11 15 00 7E 7E A0 07 21 03 11 15 00 7E
16:08:42 Data send failed. Try to resend 3/3 7E A0 07 21 03 11 15 00 7E 7E A0 07 21 03 11 15 00 7E 7E A0 07 21 03 11 15 00 7E
16:08:48 Failed to receive reply from the device in given time. 7E A0 07 21 03 11 15 00 7E 7E A0 07 21 03 11 15 00 7E 7E A0 07 21 03 11 15 00 7E 7E A0 07 21 03 11 15 00 7E
16:08:48
RX: 7E A0 07 21 03 11 15 00 7E 7E A0 07 21 03 11 15 00 7E 7E A0 07 21 03 11 15 00 7E 7E A0 07 21 03 11 15 00 7E
16:08:48
Receiver Ready failed.
16:08:48 HDLC test #1. Disconnect request
TX: 7E A0 07 03 21 53 03 C7 7E
16:08:48
RX: 7E A0 07 21 03 73 01 40 7E
16:08:48
[a href="https://www.gurux.fi/gurux.dlms.ctt.tests#hdlc1"]Test #1 failed.[/a]

At 16:08:27, my server receives a RR frame. Since it is connected and there are no I frames to be sent, it sends a RR frame too. At 16:08:32, Conformance Test informs a "send failure" and sends RR again, but writes the frame that the server sent in this same line. It means that the RR frame that was sent by the server was received by the client (Conformance Test), but apparently not accepted.
I already analysed several times the RR Frame that the Server sent, but I cannot find anything wrong in it.

May you help?

Profile picture for user Kurumi

Kurumi

2 years 2 months ago

Hi, You need to increase…

Hi,

You need to increase Receive sequence no. You don't increase it and the reply is ignored.

https://en.wikipedia.org/wiki/High-Level_Data_Link_Control

BR,
Mikko

Alexandre K. Zim

2 years 2 months ago

Thanks for your response!…

Thanks for your response!
The reason why the sequence number is zero in this case is a sentence found in item "6.4.3.6 Set normal response mode (SNRM) command" of IEC62056-46(ed 1.1):
"Upon acceptance of this command, the secondary station send
and receive state variables shall be set to zero."
As the RR Frame is sent by the secondary station immediately ater the acceptance of the SNRM, sequence number is set to zero in this frame.
Aren't sequence numbers supposed to be state variables?

Alexandre K. Zim

2 years 2 months ago

Mmmmmm....... Maybe N(R) in…

Mmmmmm.......
Maybe N(R) in a RR Frame sent by the server must be considered a primary station's state variable, and not a secondary station's state variable.
It makes sense.
I'll test it.

Alexandre K. Zim

2 years 2 months ago

Hi, Mikko I altered my …

Hi, Mikko

I altered my "server emulator", not resetting clients's state variables. The resulting log is shown below:

14:24:30 Send SNRM request.
TX: 7E A0 07 03 21 93 0F 01 7E
14:24:30
RX: 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
14:24:30 Send AARQ request.
TX: 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 62 1E 5D FF FF 88 55 7E
14:24:30
RX: 7E A0 43 21 03 30 C5 54 E6 E7 00 61 35 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 A4 0A 04 08 4D 4D 4D 00 00 BC 61 4E BE 10 04 0E 08 00 06 5F 1F 04 00 00 12 19 01 1B 00 07 85 A8 7E
14:24:30 HDLC test #1. Disconnect request
TX: 7E A0 07 03 21 53 03 C7 7E
14:24:30
RX: 7E A0 07 21 03 73 01 40 7E
14:24:30 HDLC test #1. SNRM request
TX: 7E A0 07 03 21 93 0F 01 7E
14:24:31
RX: 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
14:24:31
SNRM request succeeded. MaxInfoLengthTransmit: 128 MaxInfoLengthReceive: 128 WindowSizeTransmit: 1 WindowSizeReceive: 1
14:24:31 HDLC test #1. Receiver Ready
TX: 7E A0 07 03 21 11 15 A6 7E
14:24:31
RX: 7E A0 07 21 03 31 17 21 7E
14:24:31
<a href="https://www.gurux.fi/gurux.dlms.ctt.tests#hdlc1">Test #1 failed</a>. Receive sequence number is not 0
14:24:31 HDLC test #1. Disconnect request
TX: 7E A0 07 03 21 53 03 C7 7E
14:24:31
RX: 7E A0 07 21 03 73 01 40 7E
14:24:31
<a href="https://www.gurux.fi/gurux.dlms.ctt.tests#hdlc1">Test #1 failed.</a>
14:24:31 HDLC test #2. SNRM request
TX: 7E A0 07 03 21 93 0F 01 7E
14:24:31
RX: 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
14:24:31
SNRM request succeeded. MaxInfoLengthTransmit: 128 MaxInfoLengthReceive: 128 WindowSizeTransmit: 1 WindowSizeReceive: 1
14:24:31 HDLC test #2. Illegal frame.
TX: 7E A0 07 03 21 53 03 C7
14:24:36
Data send failed. Try to resend 1/3
14:24:41
Data send failed. Try to resend 2/3
14:24:46
Failed to receive reply from the device in given time.
14:24:46
O índice estava fora do intervalo. Ele deve ser não-negativo e menor que o tamanho da coleção.
Nome do parâmetro: index
14:24:46 Disconnect request
TX: 7E A0 07 03 21 53 03 C7 7E
14:24:46
RX: 7E A0 07 21 03 73 01 40 7E

At 14:24:31, the Receiver Ready Test began.
It seems that, now, my RR Frame (with N(R) = 1) was accepted by the conformance tes SW. But the log showed the message:
"<a href="https://www.gurux.fi/gurux.dlms.ctt.tests#hdlc1">Test #1 failed</a>. Receive sequence number is not 0"
I didn't understand this message, because by not resetting client's sequence variables, N(S) in my RR Frame is 1. The error message says it is not zero...

May you clarify?

Profile picture for user Kurumi

Kurumi

2 years 2 months ago

Hi, HDLC framing can be a…

Hi,

HDLC framing can be a real pain. This test is a direct copy of DLMS CTT tests. I checked this and Subtest 2 fails if N(R) is not zero.

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin