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 The problem 2
3.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
4 Maximum value of the maximum_information_field_length parameter 3
4.1 The problem 3
4.2 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
5 Maximum value of inter_octet_time out 8
5.1 The problem 8
5.2 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
6 Change in the conformance test specification and test plans 9
6.1 Support of IC 23 version 0 and 1 9
6.2 Length of the information field in the SNRM frame 9
6.3 Parameter negotiation - max_info_field_length 9
6.4 Parameter negotiation: window_size 10
6.5 Length of information field in an I or UI frame 11
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 HDLC parameter negotiation
3.1 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 smaller 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.
Name / PI / PL / PVmaximum_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 32D-128D in case of version 0 of IC 23. The length of parameters 7 and 8 is 4 bytes, the value is 1D – to 7D.
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 in [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 Maximum value of the maximum_information_field_length parameter
4.1 The problem
Version 0 of IC 23 defines the default and maximum values of the max_info_field_length_receive and _transmit parameters as 128D (type unsigned).
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 32D and the default value 128D.
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 connection 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 / 0..n / class_id=23, version=0Attribute(s) / Data type / Min. / Max. / Def
- logical_name
- comm_speed
- window_size_ transmit
- window_size_ receive
- max_info_field_ length_transmit
- max_info_field_ length_receive
- inter_octet_time_out
- inactivity_time_ out
- device_address
Specific method(s) / m / o
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.
· In order to ensure a minimal performance, the primary station should offer at least a 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.
Attribute Description
comm_speed / The communication speed supported by the corresponding portEnum: (0) 300 baud
(1) 600 baud
(2) 1200 baud
(3) 2400 baud
(4) 4800 baud
(5) 9600 baud
(6) 19200 baud
(7) 38400 baud
(8) 57600 baud
(9) 115200 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.
max_info_length_transmit / The maximum information field length that a device can transmit. During logon a higher or lower value can be negotiated.
max_info_length_receive / The maximum information field length that a device can receive. During logon a higher or lower value can be negotiated.
Inter_octet_time_out / 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.
inactivity_time_out / 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.
device_address / 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
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 / 0..n / class_id=23, version=0Attribute(s) / Data type / Min. / Max. / Def
- logical_name
- comm_speed
- window_size_ transmit
- window_size_ receive
- max_info_field_ length_transmit
- max_info_field_ length_receive
- inter_octet_time_out
- inactivity_time_ out
- device_address
Specific method(s) / m / o
Attribute Description
comm_speed / The communication speed supported by the corresponding portA.5.1.1.1.1 Enum: (0) 300 baud
(1) 600 baud
(2) 1200 baud
(3) 2400 baud
(4) 4800 baud
(5) 9600 baud
(6) 19200 baud
(7) 38400 baud
(8) 57600 baud
(9) 115200 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.
max_info_length_transmit / The maximum information field length that a device can transmit. During logon a smaller value can be negotiated.
max_info_length_receive / The maximum information field length that a device can receive. During logon a smaller value can be negotiated.
Inter_octet_time_out / 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.
inactivity_time_out / 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.
device_address / 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.
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 sufficient, as there are communication media when long delays may occur. For example, with GSM delays of 3 s have been found in one direction.