DLMS User Association Proposal for a new version of Interface Class IEC HDLC setup (class_id: 23) Written by Gyozo Kmethy – GNARUS ENGINEERING Services Ltd. 23d January 2002 Version 2.0, file HDLC23V1_GK020123 Replaces Version 1.0, file HDLC23V1_011122 CONTENTS 1 Introduction ...................................................................................................................... 2 2 References ....................................................................................................................... 2 3 HDLC parameter negotiation ............................................................................................ 2 3.1 3.2 4 The problem ............................................................................................................ 2 The solution ............................................................................................................ 3 3.2.1 Change in IEC 62056-46 and in the Green Book .......................................... 3 3.3 Change in conformance testing ............................................................................... 3 Maximum value of the maximum_information_field_length parameter ............................... 3 4.1 4.2 5 The problem ............................................................................................................ 3 The solution ............................................................................................................ 3 4.2.1 Change in IEC 62056-46 and the Green Book ............................................. 4 4.2.2 Change in IEC 62056-62 and the Blue Book ................................................ 4 4.3 Change in conformance testing ............................................................................... 7 Maximum value of inter_octet_time out ............................................................................. 8 5.1 5.2 6 The problem ............................................................................................................ 8 The solution ............................................................................................................ 8 5.2.1 Amendment to IEC 62056-46 and the Green Book ....................................... 8 5.2.2 Amendment to IEC 62056-62 and the Blue Book ......................................... 8 5.2.3 Modification to conformance testing ............................................................. 8 Change in the conformance test specification and test plans ............................................ 9 6.1 6.2 6.3 6.4 6.5 Support of IC 23 version 0 and 1 ............................................................................. 9 Length of the information field in the SNRM frame ................................................... 9 Parameter negotiation - max_info_field_length ........................................................ 9 Parameter negotiation: window_size ..................................................................... 10 Length of information field in an I or UI frame ........................................................ 11 1 DLMS User Association 1 Introduction During performing conformance tests with the first versions of the COSEM CTT three problems have been identified with the HDLC parameter negotiation and with the interface class 23, IEC HDLC setup: negotiation of the HDLC parameters max_info_field_ length and window_size; maximum values of the max_info_field_length parameter; maximum value of the inter-octet time out parameter. The purpose of this paper to propose modifications to conformance testing and to the interface class IEC HDLC setup. This is the second version of the document, taking into account the comments received on the first version. 2 References [1] draft IEC 62056-46 Electricity metering - Data exchange for meter reading, tariff and load control – Part 46: Data link layer using HDLC protocol [2] ISO/IEC 13230:2000 Information technology – Telecommunication and information exchange between systems – High level data link control procedures [3] DLMS UA 1000-2:2001 COSEM Three layer connection oriented architecture (the Green Book), Second edition [4] draft IEC 62056-62 Electricity metering - Data exchange for meter reading, tariff and load control – Part 62: COSEM Interface classes [5] DLMS UA 100-1:2001 COSEM Identification system and interface objects (the Blue Book), fourth edition. [6] COSEM conformance testing – Data link layer V 1.2 October 2001 3 3.1 HDLC parameter negotiation The problem [1] defines the negotiation of HDLC parameters: the max_info_field_length transmit/receive the window_size receive transmit/receive. These parameters, among others, are held in the server in an instance of the interface class 23 IEC HDLC setup. The primary station proposes values of these parameters in the SNRM frame. The secondary station sends back an UA frame with the negotiated values. These are the smal ler of the proposed values and the values supported by the secondary station. Default values can be used in both directions; these are not transmitted. The parameter negotiation is described in Clause 6.4.4.3.2 of [1] and Clause 5.5.3.2.2.2, Table 11 of [2]. The HDLC parameters are given in a PI/PL/PV (Parameter Identifier/Parameter Value/Parameter Length) structure. 2 DLMS User Association Name PI PL PV maximum_information_field_length (transmit) 5 N binary maximum_information_field_length (receive) 6 N binary window size k (transmit) 7 4 binary window size k (receive) 8 4 binary The length of parameters 5 and 6 is N bytes, the value is 32 D -128 D in case of version 0 of IC 23. The length of parameters 7 and 8 is 4 bytes, the value is 1 D – to 7 D . The problem is, that during the first conformance tests it has been found that some existing server implementations do not accept a data link layer connection, if the proposed max_info_field_length is smaller than the buffer used by the server. Instead of sending back the negotiated value, they send back their own value or refuse the connection (by sending a DM frame). It is reasonable to expect that there is less limitation on the primary station side than on the secondary station side. The primary station should be able to support at least the same buffer size than the secondary station. Therefore this behaviour should be acceptable. Another problem which has been found in some implementations, that the window size parameters are sent back on 1 byte, instead of 4 bytes, as defined i n [2]. This may cause a problem with client implementations. Therefore a test needs to be added to the CTT. 3.2 The solution 3.2.1 Change in IEC 62056-46 and in the Green Book Amend [1] by adding a note a note in Clause 6.4.4.3.2 above Table 8: Note: For reasons of communication efficiency, the value of the parameter maximum_information_field_length_ receive proposed by the primary station should be at least as big as the value of the parameter of the maximum_information_field_length_transmit supported by the secondary station (the buffer size) The same change will be made in clause 6.3.4.4.43.2. of [3]. 3.3 Change in conformance testing See in Clause 6 of this document. 4 4.1 Maximum value of the maximum_information_field_length parameter The problem Version 0 of IC 23 defines the default and maximum values max_info_field_length_receive and _transmit parameters as 128 D (type unsigned). of the It was felt that this was too low. To increase the efficiency of the communication, higher values should be allowed when communication channels of high integrity are used. 4.2 The solution Change the type of these parameters to unsigned-long and change the maximum value to 2030 (the maximum possible length of the frame is 2047 bytes, the maximum overhead is 11 bytes with four bytes addressing on the secondary used station side). The minimum value remains 32 D and the default value 128 D . 3 DLMS User Association This requires modifying the interface class version from 0 to 1. See the new interface class definition below. 4.2.1 Change in IEC 62056-46 and the Green Book In Clause 6.4.3.3 of [1], change the last paragraph: Existing paragraph: “For data integrity reasons, in this profile, the default maximum length of the information field is limited to 128 bytes. Other values may be negotiated at co nnection establishment time, see 6.4.4.4.3.1.” New paragraph: “For data integrity reasons, in this profile the default value of the maximum information length - receive and maximum information field length - transmit HDLC parameters is 128 bytes. Other values may be negotiated at connection establishment time, see 6.4.4.4.3.1. Note: In order to ensure a minimal performance, the master station should offer at least a max_info_field length_receive of 128 bytes. ” The same changes will be made in Clause 6.3.4 .3.3 of [3]. 4.2.2 Change in IEC 62056-62 and the Blue Book Clause A.5 of [4] will be changed as follows: A.5 IEC HDLC Setup (class_id: 23) An instance of the IEC HDLC Setup class contains all data necessary to set up a communication channel according to IEC 62056-46. Several communication channels can be configured. The logical_names shall be as defined in D 1.1.12. IEC HDLC setup Attribute(s) 1. logical_name 2. comm_speed 3. window_size_ transmit 4. window_size_ receive 5. max_info_field_ length_transmit 6. max_info_field_ length_receive 7. inter_octet_time_ out 8. inactivity_time_ out 9. device_address Specific method(s) 0..n class_id = 23, version = 0 (static) Data type octet-string enum unsigned (static) unsigned (static) long-unsigned 32 2030 128 (static) long-unsigned 32 2030 128 (static) long-unsigned 20 6000 25 (static) long-unsigned 0 (static) long-unsigned m/o 16 (static) (static) Min. Max. Def 0 1 9 7 5 1 1 7 1 120 0x3FFD 0 Notes: The maximum value of the attributes max_info_field_length_transmit and max_info_field_length_receive has been increased from 128 to 2030 for efficiency reasons. 4 DLMS User Association In order to ensure a minimal performance, max_info_field_length_receive of 128 bytes. The maximum value of the inter-octet-time-out attribute has been increased from 1000 ms to 6000 ms in order to allow using communication media, where long delays may occur. The default value has been changed to 25 ms to align with Clause 6.4.4.3.3. of IEC 62056-46. the primary station should offer at least Attribute Description comm_speed The communication speed supported by the corresponding port Enum: (0) 300 baud (1) 600 baud (2) 1 200 baud (3) 2 400 baud (4) 4 800 baud (5) 9 600 baud (6) 19 200 baud (7) 38 400 baud (8) 57 600 baud (9) 115 200 baud This communication speed can be overridden if the HDLC mode of a device is entered through a special mode of another protocol. window_size_transmit The maximum number of frames that a device or system can transmit before it needs to receive an acknowledgement from corresponding station. During logon a smaller value can be negotiated. window_size_receive The maximum number of frames that a device or system can receive before it needs to transmit an acknowledgement to the corresponding station. During logon a smaller value can be negotiated. The maximum information field length that a device can transmit. During logon a higher or lower value can be negotiated. The maximum information field length that a device can receive. During logon a higher or lower value can be negotiated. Defines the time, expressed in ms, over which, when any character is received from the primary station, the device will treat the already received data as a complete frame. Defines the time, expressed in seconds over which, when any frame is received from the primary station, the device will process a disconnection. When this value is set to 0, this means that the inactivity_time_out is not operational. max_info_length_transmit max_info_length_receive Inter_octet_time_out inactivity_time_out 5 a DLMS User Association device_address Contains the physical device address of a device: In case of single 0x00 0x01…0x0F 0x10...0x7D 0x7E 0x7F byte addressing: NO_STATION Address Reserved for future use Usable address space ‘CALLING’ device address Broadcast address In case of double byte addressing: 0x0000 NO_STATION Address 0x0001..0x000F Reserved for future use 0x0010..0x3FFD Usable address space 0x3FFE ‘CALLING’ Physical Device address 0x3FFF Broadcast address The same change will be made to Clause 4.4.5 of [5]. Clause C1 of IEC 62056-62 – Using short names The version of IC 23 will be amended from 0 to 1. Same change will be made in Clause 4.5.1. of the Blue book. Annex E of IEC 62056-62 Version 0 of the interface class (see below) will be added to Annex E. The same change will be made in Clause 4.7 of the Blue Book. IEC HDLC Setup (class_id: 23, version 0) An instance of the IEC HDLC Setup class contains all data necessary to set up a communication channel according to IEC 62056-46. Several communication channels can be configured. The logical_names shall be as defined in D.1.1.12. IEC HDLC setup Attribute(s) 1. logical_name 2. comm_speed 3. window_size_ transmit 4. window_size_ receive 5. max_info_field_ length_transmit 6. max_info_field_ length_receive 7. inter_octet_time_ out 8. inactivity_time_ out 9. device_address Specific method(s) 0..n class_id = 23, version = 0 (static) (static) (static) Data type octet-string enum unsigned Min. Max. Def 0 1 9 7 5 1 (static) unsigned 1 7 1 (static) unsigned 32 128 128 (static) unsigned 32 128 128 (static) long-unsigned 20 1000 30 (static) long-unsigned 0 (static) long-unsigned 16 m/o 6 120 0x3FFD 0 DLMS User Association Attribute Description comm_speed The communication speed supported by the corresponding port A.5.1.1.1.1 Enum: (0) 300 baud (1) 600 baud (2) 1 200 baud (3) 2 400 baud (4) 4 800 baud (5) 9 600 baud (6) 19 200 baud (7) 38 400 baud (8) 57 600 baud (9) 115 200 baud This communication speed can be overridden if the HDLC mode of a device is entered through a special mode of another protocol. window_size_transmit The maximum number of frames that a device or system can transmit before it needs to receive an acknowledgeme nt from corresponding station. During logon a smaller value can be negotiated. window_size_receive The maximum number of frames that a device or system can receive before it needs to transmit an acknowledgement to the corresponding station. During logon a smaller value can be negotiated. The maximum information field length that a device can transmit. During logon a smaller value can be negotiated. max_info_length_transmit max_info_length_receive Inter_octet_time_out inactivity_time_out device_address The maximum information field length that a device can receive. During logon a smaller value can be negotiated. Defines the time, expressed in ms, over which, when any character is received from the primary station, the device will treat the already received data as a complete frame. Defines the time, expressed in seconds over which, when any frame is received from the primary station, the device will process a disconnection. When this value is set to 0, this means that the inactivity_time_out is not operational. Contains the physical device address of a device: In case of single byte addressing: 0x00 NO_STATION Address 0x01…0x0F Reserved for future use 0x10...0x7D Usable address space 0x7E ‘CALLING’ device address 0x7F Broadcast address In case of double byte addressing: 0x0000 NO_STATION Address 0x0001..0x000F Reserved for future use 0x0010..0x3FFD Usable address space 0x3FFE ‘CALLING’ Physical Device address 0x3FFF Broadcast address 4.3 Change in conformance testing See Clause 6 of this document. 7 DLMS User Association 5 Maximum value of inter_octet_time out 5.1 The problem Version 0 of IC 23 specifies the maximum value of the parameter inter_octet_time_out as 1000 ms. It has been found that in some cases this is not suf ficient, as there are communication media when long delays may occur. For example, with GSM delays of 3 s have been found in one direction. 5.2 The solution To accommodate these requirements, it is proposed to increase the maximum value of this parameter to 6000 ms in the new version of the interface class. 5.2.1 Amendment to IEC 62056-46 and the Green Book No changes are necessary. 5.2.2 Amendment to IEC 62056-62 and the Blue Book The changes are shown already in 4.2.2 of this document. 5.2.3 Modification to conformance testing The test is defined in Clause 3.1.2 of the Data link layer test plan: test HDLC_6. No change is necessary. 8 DLMS User Association 6 Change in the conformance test specification and test plans 6.1 Support of IC 23 version 0 and 1 The CTT should support both version 0 and 1 of the interface class 23 IEC HDLC setup. The manufacturer has to declare the version of the IC 23 used: 0 or 1 and the values of the HDLC parameters used by the server. 6.2 On the data link layer level: Secondary stations using version 0 o f the interface class send back the max_information_field_length parameter values on one byte. Secondary stations using version 1 send the parameter on two bytes. The CTT shall be able to handle both. On the COSEM objects test level, the CTT should accept both version 0 and version 1 of IC 23. Length of the information field in the SNRM frame The CTT shall test that the server refuses an SNRM frame in which the length of the information field is more than 2030. The test is described in Clause 3.1.5.13 of [6]: Test HDLC_1 subtest 12, and it has to be modified. In Pack 3 (V0.17) of the test tool the test is done with an information field length of 7*256-1. This is not correct, as it is still a valid value. Test HDLC_1 Subtest 12: Too long information field Test Case Reference Classification Precondition Preamble Do Check Postamble Incorrect frame field values – Too long information field [1] 6.4.3.10 Negative test case. Send an SNRM frame with an information field with the length 2031. If the result is not NoResponse, the verdict is FAILED H1.12.1 Make sure that the device is still there by sending a correct SNRM frame. If there is no response, the result is FAILED H1.12.2. Remark 6.3 Parameter negotiation - max_info_field_length If version 0 is used, the CTT shall test the max_info_field_length parameter negotiation with sending a value of 32 D (the minimum value specified in the interface class). The secondary station shall accept it, or if the value is too small for the server, it may refuse it by sending a DM frame. If the proposed value is refused, the CTT shall propose a value of 128. The server shall accept it and send back an UA with the correctly negotiated HDLC parameters. If version 1 is used, the CTT shall test the parameter negotiation with sending different values between 32 and 2030 and checking the negotiated parameters against the values declared in the PICS. If the proposed value is larger than 2030 D , the server shall refuse the connection. This test is defined in Clause 3.2.2.3 of the Data link layer test plan as HDLC_2 Subtest 3. and shall be modified as follows: 9 DLMS User Association Test Case Reference Classification Precondition Preamble Do Mode change to NRM - SNRM with information field ClientMaxInfoFieldLength parameter negotiation [1] 6.4.4.4.3.2 Positive test case. Set Client HDLC parameters to default values. Change the max_info_field_length transmit and receive parameters to 32 D . Expect a UA frame with a max_info_field_length receive and transmit parameters with a value of 32 D . If a DM frame is received go to the second pass: Send a DISC and expect a DM. Check Set the max_info_field_length transmit and receive parameters to 12 8. Send an SNRM frame. If there is no response, or if after the second pass the response is not an UA frame, or the negotiated HDLC parameters are not correct (values between 32 and 128) then the Verdict is FAILED. Postamble Remark HDLC_2 SubTest 4 The purpose of this test is to check that the server refuses a proposed value of the max_info_field_length parameter above 2030. Test Case Reference Classification Precondition Preamble Do Check Postamble Mode change to NRM – SNRM with information field ClientMaxInfoFieldLength parameter negotiation [1] 6.4.4.4.3.2 Positive test case. Set Client HDLC parameters to default values. Change the ClientMaxInfoLengthReceive to 2031. Send an SNRM frame. If the response is not a DM, the result is FAILED. Check that the server is still there by sending a correct SNRM frame and expect an UA frame. Send a DISC and expect a DM. Remark 6.4 Parameter negotiation: window_size The test is already described in Clause 3.2.2.4 of [6] as Test HDLC_2 Subtest 4 and it has to be modified to test also that the server sends back the window size parameters on four bytes. Test Case Reference Classification Precondition Preamble Do Check Postamble Mode change to NRM – SNRM with information field window size parameter negotiation [1] 6.4.4.4.3.2 Positive test case. Set Client HDLC parameters to default values. Chamge the client window_size (receive) parameter to 2 and sen d an SNRM frame. If there is no response, or the response is not an UA frame, or the negotiated parameter is not sent back as a four byte value, or the negotiated parameter is not correct, then the Verdict is FAILED H2.XXX Disconnect the data link layer. 10 DLMS User Association Remark 6.5 Length of information field in an I or UI frame This is a new test. The CTT shall test that if an I or UI frame has an information field which is longer than 2030 D , the server answers with an FRMR frame. According to Clause 6.4.3.10 of IEC 62056-46, if the length of the information field in an I frame exceeds the max_info_field_length which can be accommodated by the secondary station, the secondary station shall respond with an FRMR frame. Test Case Reference Classification Precondition Preamble Do Check Postamble I frame exchange – too long information field [1] 6.4.3.10 Negative test case. The data link layers are connected, the HDLC parameters have been correctly negotiated, the secondary station is NRM mode. Send an I frame with an information field which is longer than the negotiated server_max_info_field_length_receive parameter. The server shall send back an FRMR frame. Check that the data link layer is still connected by sending a good I frame and check the response. Remark 11
© Copyright 2026 Paperzz