I used the GXDLMSDirector Conformance Test scheme to check my dlms server, only 2 tests came back failed - Test 9 and Test 16.
I, however, tried to debug to see why this failed, and looking at the Log it appears that my responses were correct.
For Test 9 - Send Disc and then send an illegal frame. Send Disc and check that meter is in Normal Disconnected Mode.
------------------------------------------------------------------------------------
00:15:42 Disconnect request
12:15:42 AM HDLC test #9. Disconnect request
7E A0 07 03 21 53 03 C7 7E
12:15:42 AM
7E A0 07 21 03 1F 6B E9 7E
12:15:42 AM HDLC test #9. Unknown command
7E A0 1E 03 21 94 72 4F 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
12:15:42 AM
7E A0 07 21 03 1F 6B E9 7E
00:15:42 Disconnect request
12:15:42 AM HDLC test #9. Disconnect request
7E A0 07 03 21 53 03 C7 7E
12:15:42 AM
7E A0 07 21 03 1F 6B E9 7E
12:15:43 AM HDLC test #9. Illecal frame.
7E A0 1E 03 21 93 72 4F 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
00:15:48 Data send failed. Try to resend 1/3
00:15:53 Data send failed. Try to resend 2/3
12:15:58 AM Failed to receive reply from the device in given time.
00:15:58 Disconnect request
12:15:58 AM HDLC test #10. Disconnect request
7E A0 07 03 21 53 03 C7 7E
12:15:58 AM
7E A0 07 21 03 1F 6B E9 7E
While debugging, I observers that the HCS (72 4F) was wrong, which refers to the HDLC_FRAME_N7: HCS Field Check (Table 19) of the ATS_DL_V5 (Yellow book Ed6.1), and it explained that the expected response is to discard the frame. My server appears to discard the frame, but the verdict is still failed. Is there something I missed?
For Test 16 - This test is used to check that meter can handle if the frame is too long.
------------------------------------------------------------------------
00:16:33 Disconnect request
12:16:33 AM HDLC test #16. Disconnect request
7E A0 07 03 21 53 03 C7 7E
12:16:33 AM
7E A0 07 21 03 1F 6B E9 7E
12:16:34 AM HDLC test #16. SNRMRequest.
7E A0 1E 03 21 93 CD 3B 81 80 12 05 01 80 06 01 46 07 04 00 00 00 01 08 04 00 00 00 01 4E 83 7E
12:16:34 AM
7E A0 20 21 03 73 73 98 81 80 14 05 02 00 46 06 02 00 46 07 04 00 00 00 01 08 04 00 00 00 01 7D D6 7E
12:16:34 AM HDLC test #16. AARQRequest.
7E A8 4F 03 21 10 D3 1E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 DF 8F 7E
12:16:34 AM
7E A0 07 21 03 11 15 00 7E
00:16:34 Disconnect request
12:16:34 AM HDLC test #16. Disconnect request
7E A0 07 03 21 53 03 C7 7E
12:16:34 AM
7E A0 07 21 03 73 01 40 7E
From the log, the UA response of the server specified the max info field length as 0x46 (70), and the AARQ Request, sends a frame with an info field length of exactly 70. And because of the A8 format field and RR response was sent. Why is that a Failed?
As specified in 8.4.3.9 of the Green Book Ed9, an FRMR response will be sent if the receipt of an I/UI command or response, with an information field which exceeded the maximum Information field length which can be accommodated by the secondary/ combined station;
Test 9:
It seems that this test fails because DisconnectMode (0x1F) is returned to HDLC test #9. Unknown command. Yello Book says that If a response is received, the verdict is FAILED. Can you paste error message here, so I can check that this is same error.
Test 16.
This test fails because frame size is 70 bytes and 70 bytes is sent in the first frame, but your meter asks more data when frame size is full. You should skip this or return FRMR.
I checked this and DLMS CTT sends 71 bytes in one frame, not in 2 like this example. I'll add this to the work-list and this is improved to work in same way than DLMS conformance tests.
Test 16 is now improved in GXDLMSDirector to work the same way as DLMS certificate 3.1 tests.
We are also making some new clock and profile generic tests for one of our clients. Those tests are not in DLMS CTT, but they might be very interesting for you. They should be on the next release.
Hi Paul,
Hi Paul,
Test 9:
It seems that this test fails because DisconnectMode (0x1F) is returned to HDLC test #9. Unknown command. Yello Book says that If a response is received, the verdict is FAILED. Can you paste error message here, so I can check that this is same error.
Test 16.
This test fails because frame size is 70 bytes and 70 bytes is sent in the first frame, but your meter asks more data when frame size is full. You should skip this or return FRMR.
I checked this and DLMS CTT sends 71 bytes in one frame, not in 2 like this example. I'll add this to the work-list and this is improved to work in same way than DLMS conformance tests.
BR,
Mikko
Hi Mikko,
Hi Mikko,
So I had the meter respond with an FRMR frame for both cases, and it indicated passed.
12:52:42 AM HDLC test #9. Unknown command
7E A0 1E 03 21 94 72 4F 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
12:52:42 AM
7E A0 0C 21 03 97 3E 21 94 00 80 67 A1 7E (unknown control frame)
12:53:33 AM HDLC test #16. AARQRequest.
7E A8 4F 03 21 10 D3 1E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 DF 8F 7E
12:53:34 AM
7E A0 0C 21 03 97 3E 21 10 22 20 63 7B 7E (maximum Info length exceeded)
I also fixed your observation on how I handled Test 16 wrt the RR response.
Thanks
Paul.
Hi Paul,
Hi Paul,
Test 16 is now improved in GXDLMSDirector to work the same way as DLMS certificate 3.1 tests.
We are also making some new clock and profile generic tests for one of our clients. Those tests are not in DLMS CTT, but they might be very interesting for you. They should be on the next release.
BR,
Mikko
Hi Mikko,
Hi Mikko,
Would look forward to the new release.
Many Thank
Paul.
Hi.
Hi.
Information field format for FRMR response in modulo 8 operation
First bit transmitted
| 1 2
| 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|->| 0 0 1 0 | 1 0 0 1 |0 | N(S) | | N(R) |w x y z |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
C/R
REJ_ERROR_W 1 // unknown control frame
REJ_ERROR_WX 3 // invalid information field
REJ_ERROR_Y 4 // maximum Info length exceeded
REJ_ERROR_Z 8 // the control field invalid N(R)
Hi,
Hi,
You are right if we check the HDLC standard.
https://en.wikipedia.org/wiki/High-Level_Data_Link_Control
Green book defines only I, RR, RNR, SNRM, DISC, UA, DM, FRMR and UI frame types.
8.4.3.1 Selected repertoire and control field format
I don't know how well meters are supporting those HDLC error codes.
BR,
Mikko