Electricity metering - Data exchange for meter reading, tariff and load control - Part 42: Physical layer services and procedures for connection-oriented asynchronous data exchange

IEC 62056-42:2002 specifies the physical layer services and protocols within the Companion Specification for Energy Metering (COSEM) three-layer connection oriented profile for asynchronous data communication. In annex A, an example of how this physical layer can be used for data exchange through the Public Switched Telephone Network (PSTN) using intelligent Hayes modems is given. Annex B gives an explanation of the role of data models and protocols in electricity meter data exchange. This bilingual version (2013-05) corresponds to the monolingual English version, published in 2002-02.

Equipements de mesure de l'énergie électrique - Echange de données pour la lecture des compteurs, le contrôle de tarifs et de la charge - Partie 42: Services et procédures de la couche physique pour l'échange de données à l'aide de connexion asynchrone

La CEI 62056-42:2002 spécifie les services et protocoles de la couche physique à l'intérieur du modèle de connexion à trois couches de la spécification d'accompagnement pour la mesure de l'énergie (COSEM) (en anglais, Companion Specification for Energy Metering) pour la communication des données asynchrones. Un exemple est donné à l'Annexe A de la façon dont cette couche physique peut être utilisée pour l'échange des données en utilisant des modems Hayes intelligents à travers le Réseau Téléphonique Commuté Publique (RTCP). L'Annexe B donne une explication du rôle des modèles de données et des protocoles de données dans les échanges des compteurs d'électricité. La présente version bilingue (2013-05) correspond à la version anglaise monolingue publiée en 2002-02.

General Information

Status
Published
Publication Date
17-Feb-2002
Current Stage
PPUB - Publication issued
Start Date
15-Mar-2002
Completion Date
18-Feb-2002
Ref Project
Standard
IEC 62056-42:2002 - Electricity metering - Data exchange for meter reading, tariff and load control - Part 42: Physical layer services and procedures for connection-oriented asynchronous data exchange Released:2/18/2002 Isbn:2831861578
English language
27 pages
sale 15% off
Preview
sale 15% off
Preview
Standard
IEC 62056-42:2002 - Electricity metering - Data exchange for meter reading, tariff and load control - Part 42: Physical layer services and procedures for connection-oriented asynchronous data exchange
English and French language
62 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (Sample)


INTERNATIONAL IEC
STANDARD
62056-42
First edition
2002-02
Electricity metering –
Data exchange for meter reading,
tariff and load control –
Part 42:
Physical layer services and procedures
for connection-oriented asynchronous
data exchange
Reference number
Publication numbering
As from 1 January 1997 all IEC publications are issued with a designation in the
60000 series. For example, IEC 34-1 is now referred to as IEC 60034-1.
Consolidated editions
The IEC is now publishing consolidated versions of its publications. For example,
edition numbers 1.0, 1.1 and 1.2 refer, respectively, to the base publication, the
base publication incorporating amendment 1 and the base publication incorporating
amendments 1 and 2.
Further information on IEC publications
The technical content of IEC publications is kept under constant review by the IEC,
thus ensuring that the content reflects current technology. Information relating to
this publication, including its validity, is available in the IEC Catalogue of
publications (see below) in addition to new editions, amendments and corrigenda.
Information on the subjects under consideration and work in progress undertaken
by the technical committee which has prepared this publication, as well as the list
of publications issued, is also available from the following:
• IEC Web Site (www.iec.ch)
• Catalogue of IEC publications
The on-line catalogue on the IEC web site (www.iec.ch/catlg-e.htm) enables
you to search by a variety of criteria including text searches, technical
committees and date of publication. On-line information is also available on
recently issued publications, withdrawn and replaced publications, as well as
corrigenda.
• IEC Just Published
This summary of recently issued publications (www.iec.ch/JP.htm) is also
available by email. Please contact the Customer Service Centre (see below) for
further information.
• Customer Service Centre
If you have any questions regarding this publication or need further assistance,
please contact the Customer Service Centre:
Email: custserv@iec.ch
Tel: +41 22 919 02 11
Fax: +41 22 919 03 00
INTERNATIONAL IEC
STANDARD
62056-42
First edition
2002-02
Electricity metering –
Data exchange for meter reading,
tariff and load control –
Part 42:
Physical layer services and procedures
for connection-oriented asynchronous
data exchange
 IEC 2002  Copyright - all rights reserved
No part of this publication may be reproduced or utilized in any form or by any means, electronic or
mechanical, including photocopying and microfilm, without permission in writing from the publisher.
International Electrotechnical Commission 3, rue de Varembé Geneva, Switzerland
Telefax: +41 22 919 0300 e-mail: inmail@iec.ch IEC web site http://www.iec.ch
Commission Electrotechnique Internationale
PRICE CODE
U
International Electrotechnical Commission
For price, see current catalogue

– 2 – 62056-42  IEC:2002(E)
CONTENTS
FOREWORD .4
1 Scope.5
2 Normative references .5
3 Terms, definitions and abbreviations .6
4 Overview .7
5 Service specification.8
5.1 List of services .8
5.1.1 Connection establishment/release related services.8
5.1.2 Data communication services .8
5.1.3 Layer management services .8
5.2 Use of the physical layer services .9
5.3 Service definitions .9
5.3.1 PH-CONNECT.request .9
5.3.2 PH-CONNECT.indication .10
5.3.3 PH-CONNECT.confirm .10
5.3.4 PH-ABORT.request .11
5.3.5 PH-ABORT.confirm .11
5.3.6 PH-ABORT.indication .11
5.3.7 PH-DATA.request .12
5.3.8 PH-DATA.indication.12
6 Protocol specification .13
6.1 Physical layer protocol data unit.13
6.2 Transmission order and characteristics .13
6.3 Physical layer operation – description of the procedures .13
6.3.1 General .13
6.3.2 Setting up a physical connection .14
6.3.3 The identification service .15
6.3.4 Data communications .19
6.3.5 Disconnection of an existing physical connection.19
Annex A (informative) An example: PH service primitives and Hayes commands .20
Annex B (informative) Data model and protocol .25
Bibliography.26
Figure 1 – Typical PSTN configuration .7
Figure 2 – The location of the physical layer .8
Figure 3 – Protocol layer services of the COSEM 3-layer connection oriented profile.9
Figure 4 – MSC for physical connection establishment.15
Figure 5 – MSC for IDENTIFY.request/.response message exchange .17
Figure 6 – Handling the identification service at the COSEM server side.17
Figure 7 – Partial state machine for the client side physical layer.18
Figure A.1 – MSC for physical connection request .20
Figure A.2 – Physical connection establishment at the CALLING station.21
Figure A.3 – MSC for physical connection establishment .22
Figure A.4 – Data exchange between the calling and called stations.23
Figure A.5 – MSC for a physical disconnection .24
Figure B.1 – The three-step approach of COSEM .25

62056-42  IEC:2002(E) – 3 –
INTERNATIONAL ELECTROTECHNICAL COMMISSION
___________
ELECTRICITY METERING – DATA EXCHANGE
FOR METER READING, TARIFF AND LOAD CONTROL –
Part 42: Physical layer services and procedures for
connection-oriented asynchronous data exchange
FOREWORD
1) The IEC (International Electrotechnical Commission) is a worldwide organization for standardization comprising
all national electrotechnical committees (IEC National Committees). The object of the IEC is to promote
international co-operation on all questions concerning standardization in the electrical and electronic fields. To
this end and in addition to other activities, the IEC publishes International Standards. Their preparation is
entrusted to technical committees; any IEC National Committee interested in the subject dealt with may
participate in this preparatory work. International, governmental and non-governmental organizations liaising
with the IEC also participate in this preparation. The IEC collaborates closely with the International
Organization for Standardization (ISO) in accordance with conditions determined by agreement between the
two organizations.
2) The formal decisions or agreements of the IEC on technical matters express, as nearly as possible, an
international consensus of opinion on the relevant subjects since each technical committee has representation
from all interested National Committees.
3) The documents produced have the form of recommendations for international use and are published in the form
of standards, technical specifications, technical reports or guides and they are accepted by the National
Committees in that sense.
4) In order to promote international unification, IEC National Committees undertake to apply IEC International
Standards transparently to the maximum extent possible in their national and regional standards. Any
divergence between the IEC Standard and the corresponding national or regional standard shall be clearly
indicated in the latter.
5) The IEC provides no marking procedure to indicate its approval and cannot be rendered responsible for any
equipment declared to be in conformity with one of its standards.
The International Electrotechnical Commission (IEC) draws attention to the fact that it is claimed that compliance
with this International Standard may involve the use of a maintenance service concerning the stack of protocols on
which the present standard IEC 62056-42 is based.
The IEC takes no position concerning the evidence, validity and scope of this maintenance service.
The provider of the maintenance service has assured the IEC that he is willing to provide services under
reasonable and non-discriminatory terms and conditions for applicants throughout the world. In this respect, the
statement of the provider of the maintenance service is registered with the IEC. Information (see also 6.3.3) may
be obtained from:
DLMS User Association
Geneva / Switzerland
www.dlms.ch
International Standard IEC 62056-42 has been prepared by IEC technical committee 13:
Equipment for electrical energy measurement and load control.
The text of this standard is based on the following documents:
FDIS Report on voting
13/1266/FDIS 13/1272/RVD
Full information on the voting for the approval of this standard can be found in the report on
voting indicated in the above table.
_________
Device Language Message Specification.

– 4 – 62056-42  IEC:2002(E)
This publication has been drafted in accordance with the ISO/IEC Directives, Part 3.
Annexes A and B are for information only.
The committee has decided that the contents of this publication will remain unchanged until
2006. At this date, the publication will be
• reconfirmed;
• withdrawn;
• replaced by a revised edition, or
• amended.
A bilingual version of this publication may be issued at a later date.

62056-42  IEC:2002(E) – 5 –
ELECTRICITY METERING – DATA EXCHANGE
FOR METER READING, TARIFF AND LOAD CONTROL –
Part 42: Physical layer services and procedures for
connection-oriented asynchronous data exchange
1 Scope
This part of IEC 62056 specifies the physical layer services and protocols within the
Companion Specification for Energy Metering (COSEM) three-layer connection oriented
profile for asynchronous data communication. The document does not specify physical layer
signals and mechanical aspects. Local, implementation-specific issues are also not specified.
In annex A, an example of how this physical layer can be used for data exchange through the
Public Switched Telephone Network (PSTN) using intelligent Hayes modems is given.
The use of the physical layer for the purposes of direct local data exchange using an optical
port or a current loop physical interface is specified in IEC 62056-21.
Annex B gives an explanation of the role of data models and protocols in electricity meter
data exchange.
2 Normative references
The following referenced documents are indispensable for the application of this document.
For dated references, only the edition cited applies. For undated references, the latest edition
of the referenced document (including any amendments) applies.
IEC 60050-300:2001, International Electrotechnical Vocabulary –Electrical and electronic
measurements and measuring instruments – Part 311: General terms relating to
measurements – Part 312: General terms relating to electrical measurements – Part 313:
Types of electrical measuring instruments – Part 314: Specific terms according to the type of
instrument
IEC/TR 62051:1999, Electricity metering – Glossary of terms
IEC 62056-21, Electricity metering – Data exchange for meter reading, tariff and load control –
Part 21: Direct local data exchange
IEC 62056-46, Electricity metering – Data exchange for meter reading, tariff and load control –
Part 46: Data link layer using HDLC protocol
IEC 62056-53, Electricity metering – Data exchange for meter reading, tariff and load control –
Part 53: COSEM application layer
IEC 62056-61, Electricity metering – Data exchange for meter reading, tariff and load control
– Part 61: OBIS Object identification system
IEC 62056-62, Electricity metering – Data exchange for meter reading, tariff and load control –
Part 62: Interface objects
NEMA C12.21:1999, Protocol Specification for Telephone Modem Communication
_________
To be published.
– 6 – 62056-42  IEC:2002(E)
3 Terms, definitions and abbreviations
3.1 Terms and definitions
For the purpose of this part of IEC 62056, the definitions in IEC 60050-300 and IEC/TR 62051
as well as the following definitions apply:
3.1.1
client
a station asking for services, normally the master station
3.1.2
master
central station – station which takes the initiative and controls the data flow
3.1.3
server
a station delivering services. The tariff device (meter) is normally the server, delivering the
requested values or executing the requested tasks
3.1.4
slave
station responding to requests of a master station. The tariff device (meter) is normally a
slave station
3.2 Abbreviations
COSEM COmpanion Specification for Energy Metering
DCE Data Communication Equipment (communications interface or modem)
DTE Data Terminal Equipment (computers, terminals or printers)
MSC Message Sequence Chart
PDU Protocol Data Unit
PH PHysical layer
PHPDU PHysical layer Protocol Data Unit
PHSDU PHysical layer Service Data Unit
SDU Service Data Unit
62056-42  IEC:2002(E) – 7 –
4 Overview
From the external point of view, the physical layer provides the interface between the
DTE and the DCE, see
Figure 2. Figure 1 shows a typical configuration for data exchange through a wide area
network, for example the PSTN.
COSEM server
COSEM client
DTE DTE
DCE
DCE
Schlumberger
kWh
Transit network 00001,6
(o)  N° 00012356
10 (40)A 230V 50Hz
DTE to DCE DCE to DTE
ITU-T V series ITU-T V series
EIA RS232, RS485 EIA RS232, RS485
Hayes, etc. Hayes, etc
IEC  235/02
Figure 1 – Typical PSTN configuration
From the physical connection point of view, all communications involve two sets of equipment
represented by the terms caller system and called system. The caller is the system that
decides to initiate a communication with a remote system known as the called party; these
denominations remain valid throughout the duration of the communication. A communication
is broken down into a certain number of transactions. Each transaction is represented by a
transmission from the transmitter to the receiver. During the sequence of transactions, the
caller and called systems take turns to act as transmitter and receiver.
From the data link point of view the central station normally acts as a master, taking the
initiative and controlling the data flow. The tariff device is the slave, responding to the master
station.
From the application point of view the central station normally acts as a client asking for
services, and the tariff device acts as a server delivering the requested services.
The situation involving a caller client and a called server is undoubtedly the most frequent
case, but a communication based on a caller server and a called client is also possible, in
particular to report the occurrence of an urgent alarm.
For the purpose of local data exchange, two DTEs can be directly connected using
appropriate connections.
To allow using a wide variety of media, this standard does not specify the physical layer
signals and their characteristics. However, the following assumptions are made:
• the communication is point to point or point to multipoint;
• both half-duplex and duplex connections are possible;
• asynchronous transmission with 1 start bit, 8 data bits, no parity and 1 stop bit (8N1).

– 8 – 62056-42  IEC:2002(E)
From the internal point of view, the physical layer is the lowest layer in the protocol stack.
COSEM client COSEM server
DTE
DTE
Server
Client
application
application
Application
Application
Transit network layer
layer
Data
Data
Data Link
Data Link
comm.
comm.
layer
layer
equipment
equipment
Physical
(DCE)
Physical
(DCE)
layer
layer
IEC  236/02
Figure 2 – The location of the physical layer
This standard defines the services of the physical layer towards its peer layer(s) and the
upper layers, and the protocol of the physical layer.
5 Service specification
5.1 List of services
ITU-T X.211 defines a set of capabilities to be made available by the physical layer over the
physical media. These capabilities are available via service primitives, as follows:
5.1.1 Connection establishment/release related services
PH-CONNECT.request / PH-CONNECT.indication / PH-CONNECT.confirm
PH-ABORT.request / PH-ABORT.confirm / PH-ABORT.indication
5.1.2 Data communication services
PH-DATA.request / PH-DATA.indication
5.1.3 Layer management services
In addition to the services above, some additional physical layer services may be necessary,
which are used by or provided for the layer management process, which is part of the
application process. Some examples are given below:
PH-INITIALIZE.request / PH-INITIALIZE.confirm
PH-GET_VALUE.request / PH-GET_VALUE.confirm
PH-SET_VALUE.request / PH-SET_VALUE.confirm
PH-LM_EVENT.indication
As these services are of local importance only, their definition is not within the scope of this
standard.
Protocol
Protocol
62056-42  IEC:2002(E) – 9 –
5.2 Use of the physical layer services
Figure 3 shows how different service users use the service primitives of the physical layer.
Physical
Layer management
connection
Application process
process manager
ASO services
AL management
services
Application layer
Connect/disconnect and
data related services
DL management
services
Data link layer
PH-DATA.req /.ind
PH-ABORT.ind
PH management
services
Physical layer
IEC  237/02
Figure 3 – Protocol layer services of the COSEM 3-layer connection oriented profile
As is shown in Figure 3, the connection establishment/release services are used by and
provided for the physical connection manager application process, and not the data link layer.
The reasons for this are explained in 6.3.1.
5.3 Service definitions
5.3.1 PH-CONNECT.request
Function
This primitive is invoked by the service user entity to request the setting up of a physical
connection to a remote device.
NOTE In the COSEM environment, it is the physical connection manager application process.
Service parameters
The semantics of the primitive is as follows:
PH-CONNECT.request
(
PhConnType,
PhConnReqParams
)
The PhConnType parameter specifies the type of connection requested, for example direct
connection, PSTN modem connection, etc. This standard does not specify data/type(s) and/or
value(s) for this parameter, because this is a local issue only.
Application
Protocol
PH-CONNECT.req /.cnf /.ind
PH-ABORT.req /.cnf /.ind
PH-DATA.req /.ind
– 10 – 62056-42  IEC:2002(E)
The structure and the contents of the PhConnReqParams parameter depend on the value of
the PhConnType parameter. For example, in the case of a PSTN connection it includes the
phone number of the remote station, etc. As – similarly to the PhConnType parameter – the
PhConnReqParams parameter contains implementation dependent data, data types/values for
this parameter are not specified in this standard.
Use
The PH-CONNECT.request primitive is used for the establishment of a physical connection.
The receipt of this primitive causes the PH-Layer entity to perform the required actions, for
example dial the specified phone number, to establish a physical connection with the peer
physical layer entity. An example of these actions in the case of an intelligent Hayes modem
is given in annex A.
5.3.2 PH-CONNECT.indication
Function
This primitive is generated by the physical layer entity to indicate to the service user entity
that a remote device requests that a physical connection to the local physical layer be
established.
Service parameters
The semantics of the primitive is as follows:
PH-CONNECT.indication ( )
Use
The PH-CONNECT.indication primitive is used by the PH entity to indicate to the service user
entity that a remote device requests that a physical connection be established.
5.3.3 PH-CONNECT.confirm
Function
This primitive is generated by the PH entity to convey the results of the associated PH-
CONNECT.request to the service user entity.
Service parameters
The semantics of the primitive is as follows:
PH-CONNECT.confirm
(
Result,
PhConnCnfParams
)
The result parameter indicates whether the attempt to set up a physical connection was
successful or not.
The structure and the value of the PhConnCnfParams parameter depend on the physical
connection type of the corresponding CONNECTION.request service, which is actually being
confirmed. For example, in the case of a PSTN connection it may include parameters of the
established connection (V22, baud-rate, etc.). Data types and values for either the Result or
the PhConnCnfParams parameter are not specified in this standard.
If the connection could not be established due to a local error – for example the phone line is
not available – the PH-CONNECT.confirm service is locally generated.

62056-42  IEC:2002(E) – 11 –
Use
The PH-CONNECT.confirm primitive is used by the PH entity to convey the results of the
associated PH-CONNECT.request.
5.3.4 PH-ABORT.request
Function
This primitive is invoked by the service user entity to request the disconnection of an existing
physical connection.
Service parameters
The semantics of the primitive is as follows:
PH-ABORT.request ( )
Use
The PH-ABORT.request primitive is used to request the physical layer entity to terminate an
existing physical connection.
5.3.5 PH-ABORT.confirm
Function
This primitive is generated by the physical layer entity to indicate to the service user entity
whether the request to terminate the physical connection was successful or not.
Service parameters
The semantics of the primitive is as follows:
PH-ABORT.confirm
(
Result
)
The Result parameter carries the result of the physical disconnection attempt.
Use
The PH-ABORT.confirm primitive is used by the PH entity to confirm to the service user entity
the result of a physical disconnection attempt.
5.3.6 PH-ABORT.indication
Function
This primitive is generated by the physical layer entity to indicate to the service user entity a
non-requested termination of a physical connection.
Service parameters
The semantics of the primitive is as follows:
PH-ABORT.indication( )
– 12 – 62056-42  IEC:2002(E)
Use
The PH-ABORT.indication primitive is used by the PH entity to inform the service user entity
that a physical connection has been unexpectedly terminated.
5.3.7 PH-DATA.request
Function
This primitive is invoked by the service user entity to request sending a data byte to one or
several remote PH entity or entities using the PH transmission procedures.
Service parameters
The semantics of this primitive is as follows:
PH-DATA.request
(
Data
)
The data parameter carries the byte to be transmitted by the PH layer entity.
Use
The PH-DATA.request primitive is used by the service user entity whenever data is to be
transmitted to its peer entity or entities.
The receipt of this primitive causes the PH entity to perform all PH specific actions and pass
the PH service data unit – the received byte – to the physical data interface for transfer to the
peer PH entity or entities.
5.3.8 PH-DATA.indication
Function
This primitive is used to transfer data from the PH entity to the service user entity.
Service parameters
The semantics of this primitive is as follows:
PH-DATA.indication
(
Data
)
The data parameter carries the received byte as received by the local PH entity.
Use
The PH-DATA.indication primitive is used by the PH entity to indicate to the service user
entity the arrival of a valid data byte.

62056-42  IEC:2002(E) – 13 –
6 Protocol specification
6.1 Physical layer protocol data unit (PHPDU)
The PHPDU is specified to be one byte. For transmission purposes however this data byte
may be extended (error detection / correction) or modified (bit-stuffing) by the modem device,
depending on the modulation scheme used. See also explanation to Figure A.4 – Data
exchange between the calling and called stations.
6.2 Transmission order and characteristics
The PHSDU byte – the data parameter of the PH-DATA services – shall be completed with
one start bit and one stop bit before transmission. The resulting frame shall be transmitted
starting with the start bit, followed by the least significant bit first, with the least significant bit
identified as bit 0 and the most significant bit as bit 7.
All characteristics of the physical medium and the signal(s) used on this medium are not in
the scope of this international standard.
6.3 Physical layer operation – description of the procedures
6.3.1 General
The physical layer – together with the physical media – is a shared resource for the higher
protocol layers. Multiple higher layer connections/associations can be modelled as different
instances of the protocol stack, which need to share the resources of the physical layer.
For this reason, the physical connection manager application process manages the physical
connection establishment and release – see 6.3.2 and 6.3.5. Any application process wishing
to use the COSEM protocol shall check the connection state of the physical layer before
requesting a connection. If the physical layer is in non-connected state, it shall request the
physical connection manager to establish the connection. If the application layer (see IEC
62056-53) invokes an COSEM-OPEN.request service and the corresponding physical
connection is not established, the COSEM-OPEN.request will be locally confirmed with error =
NO_PHYSICAL_CONNECTION (see in detail in IEC 62056-53).
Once the physical connection is established, the physical layer is ready to transmit data.

An optional identification service – as described in 6.3.3 – is available. This enables the client
to identify the pro
...


IEC 62056-42 ®
Edition 1.0 2002-02
INTERNATIONAL
STANDARD
NORME
INTERNATIONALE
colour
inside
Electricity metering – Data exchange for meter reading, tariff and load control –
Part 42: Physical layer services and procedures for connection-oriented
asynchronous data exchange
Equipements de mesure de l’énergie électrique – Echange des données pour
la lecture des compteurs, le contrôle des tarifs et de la charge –
Partie 42: Services et procédures de la couche physique pour l'échange de
données à l'aide de connexion asynchrone

All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form
or by any means, electronic or mechanical, including photocopying and microfilm, without permission in writing from
either IEC or IEC's member National Committee in the country of the requester.
If you have any questions about IEC copyright or have an enquiry about obtaining additional rights to this publication,
please contact the address below or your local IEC member National Committee for further information.

Droits de reproduction réservés. Sauf indication contraire, aucune partie de cette publication ne peut être reproduite ni
utilisée sous quelque forme que ce soit et par aucun procédé, électronique ou mécanique, y compris la photocopie et les
microfilms, sans l'accord écrit de la CEI ou du Comité national de la CEI du pays du demandeur.
Si vous avez des questions sur le copyright de la CEI ou si vous désirez obtenir des droits supplémentaires sur cette
publication, utilisez les coordonnées ci-après ou contactez le Comité national de la CEI de votre pays de résidence.

IEC Central Office Tel.: +41 22 919 02 11
3, rue de Varembé Fax: +41 22 919 03 00
CH-1211 Geneva 20 info@iec.ch
Switzerland www.iec.ch
About the IEC
The International Electrotechnical Commission (IEC) is the leading global organization that prepares and publishes
International Standards for all electrical, electronic and related technologies.

About IEC publications
The technical content of IEC publications is kept under constant review by the IEC. Please make sure that you have the
latest edition, a corrigenda or an amendment might have been published.

Useful links:
IEC publications search - www.iec.ch/searchpub Electropedia - www.electropedia.org
The advanced search enables you to find IEC publications The world's leading online dictionary of electronic and
by a variety of criteria (reference number, text, technical electrical terms containing more than 30 000 terms and
committee,…). definitions in English and French, with equivalent terms in
It also gives information on projects, replaced and additional languages. Also known as the International
withdrawn publications. Electrotechnical Vocabulary (IEV) on-line.

IEC Just Published - webstore.iec.ch/justpublished Customer Service Centre - webstore.iec.ch/csc
Stay up to date on all new IEC publications. Just Published If you wish to give us your feedback on this publication
details all new publications released. Available on-line and or need further assistance, please contact the
also once a month by email. Customer Service Centre: csc@iec.ch.

A propos de la CEI
La Commission Electrotechnique Internationale (CEI) est la première organisation mondiale qui élabore et publie des
Normes internationales pour tout ce qui a trait à l'électricité, à l'électronique et aux technologies apparentées.

A propos des publications CEI
Le contenu technique des publications de la CEI est constamment revu. Veuillez vous assurer que vous possédez
l’édition la plus récente, un corrigendum ou amendement peut avoir été publié.

Liens utiles:
Recherche de publications CEI - www.iec.ch/searchpub Electropedia - www.electropedia.org
La recherche avancée vous permet de trouver des Le premier dictionnaire en ligne au monde de termes
publications CEI en utilisant différents critères (numéro de électroniques et électriques. Il contient plus de 30 000
référence, texte, comité d’études,…). termes et définitions en anglais et en français, ainsi que
Elle donne aussi des informations sur les projets et les les termes équivalents dans les langues additionnelles.
publications remplacées ou retirées. Egalement appelé Vocabulaire Electrotechnique
International (VEI) en ligne.
Just Published CEI - webstore.iec.ch/justpublished
Service Clients - webstore.iec.ch/csc
Restez informé sur les nouvelles publications de la CEI.
Just Published détaille les nouvelles publications parues. Si vous désirez nous donner des commentaires sur
Disponible en ligne et aussi une fois par mois par email. cette publication ou si vous avez des questions
contactez-nous: csc@iec.ch.
IEC 62056-42 ®
Edition 1.0 2002-02
INTERNATIONAL
STANDARD
NORME
INTERNATIONALE
colour
inside
Electricity metering – Data exchange for meter reading, tariff and load control –

Part 42: Physical layer services and procedures for connection-oriented

asynchronous data exchange
Equipements de mesure de l’énergie électrique – Echange des données pour

la lecture des compteurs, le contrôle des tarifs et de la charge –

Partie 42: Services et procédures de la couche physique pour l'échange de

données à l'aide de connexion asynchrone

INTERNATIONAL
ELECTROTECHNICAL
COMMISSION
COMMISSION
ELECTROTECHNIQUE
PRICE CODE
INTERNATIONALE
CODE PRIX U
ICS 35.100.10; 91.140.50 ISBN 978-2-83220-724-6

– 2 – 62056-42  IEC:2002
CONTENTS
FOREWORD . 4

1 Scope . 5
2 Normative references . 5
3 Terms, definitions and abbreviations . 6
4 Overview . 7
5 Service specification. 8
5.1 List of services . 8
5.1.1 Connection establishment/release related services . 8
5.1.2 Data communication services . 8
5.1.3 Layer management services . 8
5.2 Use of the physical layer services . 10
5.3 Service definitions . 10
5.3.1 PH-CONNECT.request . 10
5.3.2 PH-CONNECT.indication . 11
5.3.3 PH-CONNECT.confirm . 11
5.3.4 PH-ABORT.request . 12
5.3.5 PH-ABORT.confirm. 12
5.3.6 PH-ABORT.indication . 12
5.3.7 PH-DATA.request . 13
5.3.8 PH-DATA.indication . 13
6 Protocol specification . 14
6.1 Physical layer protocol data unit . 14
6.2 Transmission order and characteristics . 14
6.3 Physical layer operation – description of the procedures . 14
6.3.1 General . 14
6.3.2 Setting up a physical connection . 15
6.3.3 The identification service . 16
6.3.4 Data communications . 20
6.3.5 Disconnection of an existing physical connection . 20

Annex A (informative) An example: PH service primitives and Hayes commands . 21
Annex B (informative) Data model and protocol . 26

Bibliography . 27

Figure 1 – Typical PSTN configuration . 7
Figure 2 – The location of the physical layer . 8
Figure 3 – Protocol layer services of the COSEM 3-layer connection oriented profile . 10
Figure 4 – MSC for physical connection establishment . 16
Figure 5 – MSC for IDENTIFY.request/.response message exchange . 18
Figure 6 – Handling the identification service at the COSEM server side. 18
Figure 7 – Partial state machine for the client side physical layer . 19
Figure A.1 – MSC for physical connection request . 21
Figure A.2 – Physical connection establishment at the CALLING station . 22
Figure A.3 – MSC for physical connection establishment . 23
Figure A.4 – Data exchange between the calling and called stations . 24
Figure A.5 – MSC for a physical disconnection . 25
Figure B.1 – The three-step approach of COSEM . 26

62056-42  IEC:2002 – 3 –
INTERNATIONAL ELECTROTECHNICAL COMMISSION
___________
ELECTRICITY METERING – DATA EXCHANGE
FOR METER READING, TARIFF AND LOAD CONTROL –

Part 42: Physical layer services and procedures for
connection-oriented asynchronous data exchange

FOREWORD
1) The IEC (International Electrotechnical Commission) is a worldwide organization for standardization comprising
all national electrotechnical committees (IEC National Committees). The object of the IEC is to promote
international co-operation on all questions concerning standardization in the electrical and electronic fields. To
this end and in addition to other activities, the IEC publishes International Standards. Their preparation is
entrusted to technical committees; any IEC National Committee interested in the subject dealt with may
participate in this preparatory work. International, governmental and non-governmental organizations liaising
with the IEC also participate in this preparation. The IEC collaborates closely with the International
Organization for Standardization (ISO) in accordance with conditions determined by agreement between the
two organizations.
2) The formal decisions or agreements of the IEC on technical matters express, as nearly as possible, an
international consensus of opinion on the relevant subjects since each technical committee has representation
from all interested National Committees.
3) The documents produced have the form of recommendations for international use and are published in the form
of standards, technical specifications, technical reports or guides and they are accepted by the National
Committees in that sense.
4) In order to promote international unification, IEC National Committees undertake to apply IEC International
Standards transparently to the maximum extent possible in their national and regional standards. Any
divergence between the IEC Standard and the corresponding national or regional standard shall be clearly
indicated in the latter.
5) The IEC provides no marking procedure to indicate its approval and cannot be rendered responsible for any
equipment declared to be in conformity with one of its standards.
The International Electrotechnical Commission (IEC) draws attention to the fact that it is claimed that compliance
with this International Standard may involve the use of a maintenance service concerning the stack of protocols on
which the present standard IEC 62056-42 is based.
The IEC takes no position concerning the evidence, validity and scope of this maintenance service.
The provider of the maintenance service has assured the IEC that he is willing to provide services under
reasonable and non-discriminatory terms and conditions for applicants throughout the world. In this respect, the
statement of the provider of the maintenance service is registered with the IEC. Information (see also 6.3.3) may
be obtained from:
DLMS User Association
Geneva / Switzerland
www.dlms.ch
International Standard IEC 62056-42 has been prepared by IEC technical committee 13:
Equipment for electrical energy measurement and load control.
This bilingual version (2013-05) corresponds to the monolingual English version, published in
2002-02.
_________
Device Language Message Specification.

– 4 – 62056-42  IEC:2002
The text of this standard is based on the following documents:
FDIS Report on voting
13/1266/FDIS 13/1272/RVD
Full information on the voting for the approval of this standard can be found in the report on
voting indicated in the above table.
The French version of this standard has not been voted upon.
This publication has been drafted in accordance with the ISO/IEC Directives, Part 3.
Annexes A and B are for information only.
The committee has decided that the contents of this publication will remain unchanged until
2006. At this date, the publication will be
• reconfirmed;
• withdrawn;
• replaced by a revised edition, or
• amended.
IMPORTANT – The 'colour inside' logo on the cover page of this publication indicates
that it contains colours which are considered to be useful for the correct
understanding of its contents. Users should therefore print this document using a
colour printer.
62056-42  IEC:2002 – 5 –
ELECTRICITY METERING – DATA EXCHANGE
FOR METER READING, TARIFF AND LOAD CONTROL –

Part 42: Physical layer services and procedures for
connection-oriented asynchronous data exchange

1 Scope
This part of IEC 62056 specifies the physical layer services and protocols within the
Companion Specification for Energy Metering (COSEM) three-layer connection oriented
profile for asynchronous data communication. The document does not specify physical layer
signals and mechanical aspects. Local, implementation-specific issues are also not specified.
In annex A, an example of how this physical layer can be used for data exchange through the
Public Switched Telephone Network (PSTN) using intelligent Hayes modems is given.
The use of the physical layer for the purposes of direct local data exchange using an optical
port or a current loop physical interface is specified in IEC 62056-21.
Annex B gives an explanation of the role of data models and protocols in electricity meter
data exchange.
2 Normative references
The following referenced documents are indispensable for the application of this document.
For dated references, only the edition cited applies. For undated references, the latest edition
of the referenced document (including any amendments) applies.
IEC 60050-300:2001, International Electrotechnical Vocabulary – Electrical and electronic
measurements and measuring instruments – Part 311: General terms relating to
measurements – Part 312: General terms relating to electrical measurements – Part 313:
Types of electrical measuring instruments – Part 314: Specific terms according to the type of
instrument
IEC/TR 62051:1999, Electricity metering – Glossary of terms
IEC 62056-21, Electricity metering – Data exchange for meter reading, tariff and load control –
Part 21: Direct local data exchange
IEC 62056-46, Electricity metering – Data exchange for meter reading, tariff and load control –
Part 46: Data link layer using HDLC protocol
IEC 62056-53, Electricity metering – Data exchange for meter reading, tariff and load control –
Part 53: COSEM application layer
IEC 62056-61, Electricity metering – Data exchange for meter reading, tariff and load control
– Part 61: OBIS Object identification system
IEC 62056-62, Electricity metering – Data exchange for meter reading, tariff and load control –
Part 62: Interface objects
NEMA C12.21:1999, Protocol Specification for Telephone Modem Communication
_________
To be published.
– 6 – 62056-42  IEC:2002
3 Terms, definitions and abbreviations
3.1 Terms and definitions
For the purpose of this part of IEC 62056, the definitions in IEC 60050-300 and IEC/TR 62051
as well as the following definitions apply:
3.1.1
client
a station asking for services, normally the master station
3.1.2
master
central station – station which takes the initiative and controls the data flow
3.1.3
server
a station delivering services. The tariff device (meter) is normally the server, delivering the
requested values or executing the requested tasks
3.1.4
slave
station responding to requests of a master station. The tariff device (meter) is normally a
slave station
3.2 Abbreviations
COSEM COmpanion Specification for Energy Metering
DCE Data Communication Equipment (communications interface or modem)
DTE Data Terminal Equipment (computers, terminals or printers)
MSC Message Sequence Chart
PDU Protocol Data Unit
PH  PHysical layer
PHPDU PHysical layer Protocol Data Unit
PHSDU PHysical layer Service Data Unit
SDU Service Data Unit
62056-42  IEC:2002 – 7 –
4 Overview
From the external point of view, the physical layer provides the interface between the DTE
and the DCE, see
COSEM client COSEM server
DTE
DTE
Server
Client
application
application
Application
Application
Transit network
layer
layer
Data
Data
Data Link
Data Link
comm.
comm.
layer
layer
equipment
equipment
Physical
(DCE)
Physical
(DCE)
layer
layer
Figure 2. Figure 1 shows a typical configuration for data exchange through a wide area
network, for example the PSTN.

COSEM server
COSEM client
DTE
DTE
DCE
DCE
Schlumb erg er
kWh
Transit network 00001,6
(o)  N° 00012356
10 (40)A 230V 50Hz
DTE to DCE DCE to DTE
ITU-T V series ITU-T V series
EIA RS232, RS485 EIA RS232, RS485
Hayes, etc. Hayes, etc…
IEC  235/02
Figure 1 – Typical PSTN configuration
From the physical connection point of view, all communications involve two sets of equipment
represented by the terms caller system and called system. The caller is the system that
decides to initiate a communication with a remote system known as the called party; these
denominations remain valid throughout the duration of the communication. A communication
is broken down into a certain number of transactions. Each transaction is represented by a
transmission from the transmitter to the receiver. During the sequence of transactions, the
caller and called systems take turns to act as transmitter and receiver.
From the data link point of view the central station normally acts as a master, taking the
initiative and controlling the data flow. The tariff device is the slave, responding to the master
station.
From the application point of view the central station normally acts as a client asking for
services, and the tariff device acts as a server delivering the requested services.
The situation involving a caller client and a called server is undoubtedly the most frequent
case, but a communication based on a caller server and a called client is also possible, in
particular to report the occurrence of an urgent alarm.
Protocol
Protocol
– 8 – 62056-42  IEC:2002
For the purpose of local data exchange, two DTEs can be directly connected using
appropriate connections.
To allow using a wide variety of media, this standard does not specify the physical layer
signals and their characteristics. However, the following assumptions are made:
• the communication is point to point or point to multipoint;
• both half-duplex and duplex connections are possible;
• asynchronous transmission with 1 start bit, 8 data bits, no parity and 1 stop bit (8N1).

From the internal point of view, the physical layer is the lowest layer in the protocol stack.

COSEM client COSEM server
DTE
DTE
Server
Client
application
application
Application
Application
Transit network layer
layer
Data
Data
Data Link
Data Link
comm.
comm.
layer
layer
equipment
equipment
Physical
Physical (DCE)
(DCE)
layer
layer
IEC  236/02
Figure 2 – The location of the physical layer
This standard defines the services of the physical layer towards its peer layer(s) and the
upper layers, and the protocol of the physical layer.
5 Service specification
5.1 List of services
ITU-T X.211 defines a set of capabilities to be made available by the physical layer over the
physical media. These capabilities are available via service primitives, as follows:
5.1.1 Connection establishment/release related services
PH-CONNECT.request / PH-CONNECT.indication / PH-CONNECT.confirm
PH-ABORT.request / PH-ABORT.confirm / PH-ABORT.indication
5.1.2 Data communication services
PH-DATA.request / PH-DATA.indication
5.1.3 Layer management services
In addition to the services above, some additional physical layer services may be necessary,
which are used by or provided for the layer management process, which is part of the
application process. Some examples are given below:
PH-INITIALIZE.request / PH-INITIALIZE.confirm
Protocol
Protocol
62056-42  IEC:2002 – 9 –
PH-GET_VALUE.request / PH-GET_VALUE.confirm
PH-SET_VALUE.request / PH-SET_VALUE.confirm
PH-LM_EVENT.indication
As these services are of local importance only, their definition is not within the scope of this
standard.
– 10 – 62056-42  IEC:2002
5.2 Use of the physical layer services
Figure 3 shows how different service users use the service primitives of the physical layer.
Physical
Layer management
connection
Application process
process manager
ASO services
AL management
services
Application layer
Connect/disconnect and
data related services
DL management
services
Data link layer
PH-DATA.req /.ind
PH-ABORT.ind
PH management
services
Physical layer
IEC  237/02
Figure 3 – Protocol layer services of the COSEM 3-layer connection oriented profile
As is shown in Figure 3, the connection establishment/release services are used by and
provided for the physical connection manager application process, and not the data link layer.
The reasons for this are explained in 6.3.1.
5.3 Service definitions
5.3.1 PH-CONNECT.request
Function
This primitive is invoked by the service user entity to request the setting up of a physical
connection to a remote device.
NOTE In the COSEM environment, it is the physical connection manager application process.
Service parameters
The semantics of the primitive is as follows:
PH-CONNECT.request
(
PhConnType,
PhConnReqParams
)
The PhConnType parameter specifies the type of connection requested, for example direct
connection, PSTN modem connection, etc. This standard does not specify data/type(s) and/or
value(s) for this parameter, because this is a local issue only.
Application
Protocol
PH-CONNECT.req /.cnf /.ind
PH-ABORT.req /.cnf /.ind
PH-DATA.req /.ind
62056-42  IEC:2002 – 11 –
The structure and the contents of the PhConnReqParams parameter depend on the value of
the PhConnType parameter. For example, in the case of a PSTN connection it includes the
phone number of the remote station, etc. As – similarly to the PhConnType parameter – the
PhConnReqParams parameter contains implementation dependent data, data types/values for
this parameter are not specified in this standard.
Use
The PH-CONNECT.request primitive is used for the establishment of a physical connection.
The receipt of this primitive causes the PH-Layer entity to perform the required actions, for
example dial the specified phone number, to establish a physical connection with the peer
physical layer entity. An example of these actions in the case of an intelligent Hayes modem
is given in annex A.
5.3.2 PH-CONNECT.indication
Function
This primitive is generated by the physical layer entity to indicate to the service user entity
that a remote device requests that a physical connection to the local physical layer be
established.
Service parameters
The semantics of the primitive is as follows:
PH-CONNECT.indication ( )
Use
The PH-CONNECT.indication primitive is used by the PH entity to indicate to the service user
entity that a remote device requests that a physical connection be established.
5.3.3 PH-CONNECT.confirm
Function
This primitive is generated by the PH entity to convey the results of the associated PH-
CONNECT.request to the service user entity.
Service parameters
The semantics of the primitive is as follows:
PH-CONNECT.confirm
(
Result,
PhConnCnfParams
)
The result parameter indicates whether the attempt to set up a physical connection was
successful or not.
The structure and the value of the PhConnCnfParams parameter depend on the physical
connection type of the corresponding CONNECTION.request service, which is actually being
confirmed. For example, in the case of a PSTN connection it may include parameters of the
established connection (V22, baud-rate, etc.). Data types and values for either the Result or
the PhConnCnfParams parameter are not specified in this standard.
If the connection could not be established due to a local error – for example the phone line is
not available – the PH-CONNECT.confirm service is locally generated.

– 12 – 62056-42  IEC:2002
Use
The PH-CONNECT.confirm primitive is used by the PH entity to convey the results of the
associated PH-CONNECT.request.
5.3.4 PH-ABORT.request
Function
This primitive is invoked by the service user entity to request the disconnection of an existing
physical connection.
Service parameters
The semantics of the primitive is as follows:
PH-ABORT.request ( )
Use
The PH-ABORT.request primitive is used to request the physical layer entity to terminate an
existing physical connection.
5.3.5 PH-ABORT.confirm
Function
This primitive is generated by the physical layer entity to indicate to the service user entity
whether the request to terminate the physical connection was successful or not.
Service parameters
The semantics of the primitive is as follows:
PH-ABORT.confirm
(
Result
)
The Result parameter carries the result of the physical disconnection attempt.
Use
The PH-ABORT.confirm primitive is used by the PH entity to confirm to the service user entity
the result of a physical disconnection attempt.
5.3.6 PH-ABORT.indication
Function
This primitive is generated by the physical layer entity to indicate to the service user entity a
non-requested termination of a physical connection.
Service parameters
The semantics of the primitive is as follows:
PH-ABORT.indication( )
62056-42  IEC:2002 – 13 –
Use
The PH-ABORT.indication primitive is used by the PH entity to inform the service user entity
that a physical connection has been unexpectedly terminated.
5.3.7 PH-DATA.request
Function
This primitive is invoked by the service user entity to request sending a data byte to one or
several remote PH entity or entities using the PH transmission procedures.
Service parameters
The semantics of this primitive is as follows:
PH-DATA.request
(
Data
)
The data parameter carries the byte to be transmitted by the PH layer entity.
Use
The PH-DATA.request primitive is used by the service user entity whenever data is to be
transmitted to its peer entity or entities.
The receipt of this primitive causes the PH entity to perform all PH specific actions and pass
the PH service data unit – the received byte – to the physical data interface for transfer to the
peer PH entity or entities.
5.3.8 PH-DATA.indication
Function
This primitive is used to transfer data from the PH entity to the service user entity.
Service parameters
The semantics of this primitive is as follows:
PH-DATA.indication
(
Data
)
The data parameter carries the received byte as received by the local PH entity.
Use
The PH-DATA.indication primitive is used by the PH entity to indicate to the service user
entity the arrival of a valid data byte.

– 14 – 62056-42  IEC:2002
6 Protocol specification
6.1 Physical layer protocol data unit (PHPDU)
The PHPDU is specified to be one byte. For transmission purposes however this data byte
may be extended (error detection / correction) or modified (bit-stuffing) by the modem device,
depending on the modulation scheme used. See also explanation to Figure A.4 – Data
exchange between the calling and called stations.
6.2 Transmission order and characteristics
The PHSDU byte – the data parameter of the PH-DATA services – shall be completed with
one start bit and one stop bit before transmission. The resulting frame shall be transmitted
starting with the start bit, followed by the least significant bit first, with the least significant bit
identified as bit 0 and the most significant bit as bit 7.
All characteristics of the physical medium and the signal(s) used on this medium are not in
the scope of this international standard.
6.3 Physical layer operation – description of the procedures
6.3.1 General
The physical layer – together with the physical media – is a shared resource for the higher
protocol layers. Multiple higher layer connections/associations can be modelled as different
instances of the protocol stack, which need to share the resources of the physical layer.
For this reason, the physical connection manager application process manages the physical
connection establishment and release – see 6.3.2 and 6.3.5. Any application process wishing
to use the COSEM protocol shall check the connection state of the physical layer before
requesting a connection. If the physical layer is in non-connected state, it shall request the
physical connection manager to establish the connection. If the application layer (see IEC
62056-53) invokes an COSEM-OPEN.request service and the corresponding physical
connection is not established, the COSEM-OPEN.request will be locally confirmed with error =
NO_PHYSICAL_CONNECTION (see in detail in IEC 62056-53).
Once the physical connection is established, the physical layer is ready to transmit data.

An optional identification service – as described in 6.3.3 – is available. This enables the client
to identify the protocol stack implemented in the server.
After the identification procedure is completed – or if it is not used – the upper protocol layers
and the applications can exchange data – see 6.3.4. The user of the PH-DATA services is the
next protocol layer above the physical layer.
A physical disconnection may be requested by the physical connection manager (either on
the server or the client side), or may occur in an unsolicited manner (e.g. the phone
exchange cuts the line). While physical disconnection management is the exclusive
responsibility of the physical connection manager, indication of an unsolicited disconnection
(PH-ABORT.indication) is sent both to the next protocol layer and to the physical connection
manager. See 6.3.5.
62056-42  IEC:2002 – 15 –
6.3.2 Setting up a physical connection
Both the client and the server device can act as a calling device, initiating a physical
connection to a remote device, which is the called device.
The execution of the PH-CONNECT.request service depends on the physical connection type
and on the modem used.
In Annex A, an example is given as to how this is performed in the case when intelligent
Hayes modems are used through the PSTN.
In other cases, all the operations required – dialling, handling eventual error messages (busy,
etc… ), negotiating the line modulation/baud-rate parameters, etc. – might be executed by the
physical layer itself.
In order to allow using a wide variety of physical connection types, this international standard
does not specify how the execution of the PH-CONNECT.request should be done.
At the called device side, when the physical connection initiation is detected, the connection
needs to be managed: negotiated and accepted or refused. These actions – similarly for the
execution of the PH-CONNECT.request service – depend on the physical connection type and
on the modem used, and might be done in an autonomous manner or by the physical layer
itself. The specification of these actions is not within the scope of this standard.
When the physical layers of the Calling and Called device complete establishing (or not
establishing) the required physical connection, they inform the service user entity about the
result, using the PH-CONNECT.confirm (calling side) and the PH-CONNECT.indication (called
side) service primitives. In this COSEM profile, the service user of these service primitives is
exclusively the physical connection manager process.

– 16 – 62056-42  IEC:2002
Calling device Called device
Optional Optional Physical
Physical
connection Physical external external Physical connection
layer device device layer manager
manager
(MODEM) (MODEM) process
process
The physical layers of the calling and called devices are physically disconnected
PH-CONNECT.request
A
B
C
D
E
F
G
I
H
PH-CONNECT.indication
PH-CONNECT.confirm
The physical layers of the calling and called devices are physically connected

IEC  238/02
Figure 4 – MSC for physical connection establishment
As it is shown in Figure 4, this standard specifies only the PH-CONNECT.request/ .confirm/
.indication services: all other eventual message exchanges (A, B, C,….I) are out of the scope
of this standard.
6.3.3 The identification service
6.3.3.1 General
The optional identification service is an application level service. Its purpose is to allow the
client to obtain information about the protocol stack implemented in the server. Consequently,
the identification service does not use the whole protocol stack; identification messages are
exchanged directly between the application processes of the client and the server, using
the data services of the physical layer. If more than one server is used in a multidrop
configuration, the client is able to identify the protocol stack in each.
The identification service shall be the first service after establishing the physical connection.
Although the connection can be initiated either by the client or the server, the identification
request is always issued by the client.
NOTE As the identification service is the first service after establishing a physical connection, the physical
connection manager application process could also provide this service.
6.3.3.2 Identification service message specification
IDENTIFY.request
The IDENTIFY.request message is issued by the application process of the client.

62056-42  IEC:2002 – 17 –
IDENTIFY.request ::= SEQUENCE
{
1)
IDENTIFY-Request-ID Unsigned8 = 0x20 ,
Multidrop-Device-ID OCTET STRING( SIZE (2) ) OPTIONAL
}
When the multidrop-device-ID parameter is present, it addresses one physical device on a
multi-drop configuration. Only the addressed device shall respond.
NOTE In multidrop configurations, the client has to send the I-command with an address field.
If the server side physical layer accepts this message as an identification message, it will be
indicated to the identification service user application process as an IDENTIFY.indication
message.
IDENTIFY.response
The IDENTIFY.response message is issued by the application process of the server and
carries the result of the identification request: the protocol standard, version and revision
information or an error message. On the client side, this is an IDENTIFY.confirm message.
IDENTIFY.response ::= SEQUENCE
{
2)
success-code Unsigned8 = --
2)
std-protocol-id Unsigned8, --
2)
std-protocol-ver Unsigned8, --
2)
std-protocol-rev Unsigned8 --
}
NOTE The response – in case of success – shall be sent with a delay of 1 500 ms maximum.
The following codes shall be used, in conformance with NEMA C12.21:
success-code  – 0x00
std-protocol-id – 0x04
std-protocol-ver – 0x01
std-protocol-rev – 0x00
If there was a problem with the identification message received, the received message shall
be discarded and no response shall be sent. Otherwise, the response contains the success
code and the identifier, version and revision of the protocol stack implemented. These
identifiers are administrated by the DLMS User Association.
Important note: The IDENTIFY.request/.response messages are not encoded in A-XDR, like
other PDUs: they are encoded simply as a sequence of bytes. This means that the
IDENTIFY.request/indication message contains one byte or three bytes when the optional
multidrop-device-id is present. The IDENTIFY.response/.confirm message contains four bytes
in case of success.
_________
1)
In order to ensure compliance to existing implementations, the ASCII code of the ‘I’ character (0x49) may also
be used as Identify-Request-ID.

2)
As specified in NEMA C12.21.
– 18 – 62056-42  IEC:2002
6.3.3.3 Identification service protocol specification

Figure 5 shows the message sequence chart of the identification service in the case of
success.
Client side Client side Server side
Server side
identification identification identification
Client physical Server physical identification service
service service service
layer layer provider
user provider user
application process
application process application process application process
Physical connection is established
IDENTIFY.request
PH-DATA.req
(0x20)
PH-DATA.ind
(0x20)
IDENTIFY.indication
IDENTIFY.resonse (
PH-DATA.req ()
,
,
,
PH-DATA.ind ()
PH-DATA.req ()
)
PH-DATA.ind () PH-DATA.req ()
IDENTIFY.confirm (
PH-DATA.req ()
PH-DATA.ind ()
,
,
,
PH-DATA.ind ()
)
IEC  239/02
Figure 5 – MSC for IDENTIFY.request/.response message exchange
Figure 6 shows the partial state-machine of the identification service of the server side
physical layer.
DISCONNECTED
Physical disconnection
IDLE
demanded/detected
Physical connection
Physical disconnection
established demanded/detected
PH-DATA.req
Wait
reception Send byte
Byte received
Byte received
End of message
Identification is
in progress
PH-DATA.ind(Byte1),
Put byte into buffer;
Nb_of_received_char++ ; [PH-DATA.ind(Byte2),
PH-DATA.req
PH-DATA.ind(Byte3)]
Send byte
No
Yes
Nb_of_received_char>3
Data communications
CONNECTED
(identification is over)
IEC  240/02
Figure 6 – Handling the identification service at the COSEM server side

62056-42  IEC:2002 – 19 –
The COSEM server physical layer enters the CONNECTED macro-state following the
establishment of the physical connection and waits for the first byte of the IDENTIFY.request
message in the ‘wait reception’ state.
The IDENTIFY.request message contains one or three bytes. For coherency, it shall be sent
with the timing constraints of the data link layer (inter-character- and response time-outs).
When this first character is received, the physical layer enters the ‘identification is in
progress’ state, waiting for more bytes or an inter-frame time-out, meaning the end of the
message.
If the end of message condition is detected before receiving more than three bytes the
physical layer considers the message received as an IDENTIFY.request message. It sends
the bytes received to the (physical connection manager) application process using the PH-
DATA.indication service and returns to the ‘wait reception’ state, allowing resolution of
eventual errors.
On the other hand, if no end of message condition is detected before receiving the fourth
incoming byte, the physical layer considers that the identification process is over, and enters
into ‘data communications’ state. The incoming bytes shall be sent, using the PH-
DATA.indication service, to the service user upper protocol layer. In the 3-layer, connection-
oriented, HDLC based COSEM profile this is the MAC sub-layer. Within this connection, the
physical layer can not return to the identification stage.
NOTE 1 The basic assumption of this state machine is that any upper layer PDU (here it is the MPDU) is longer
than three characters.
NOTE 2 The state machine shown in Figure 6 is not complete, for example it is not indicated where the
Nb_of_received_char layer parameter is set to its initial value; exit conditions and transitions from the ‘data
communications’ state are not shown.
NOTE 3 This identification service definition ensures backward compatibility with client systems, which are not
using the optional identification service. If the first message of the client is not an IDENTIFY.request – but longer
than three characters – it shall be given to the data link layer and the identification stage is over, too.
The partial state machine for the client side physical layer is shown in Figure 7.
DISCONNECTED
Physical disconnection
demanded/detected
IDLE
PH-CONNECT.ind
PH-CONNECT.req PH-CONNECT.cnf (ERROR)
Wait
PH-ABORT.ind
PH-connection
PH-CONNECT.cnf(OK)
CONNECTED
Byte received
PH-DATA.req
PH-DATA.ind
(
Send byte
Byte
)
CONNECTED
IEC  241/02
Figure 7 – Partial state machine for the client side physical layer

– 20 – 62056-42  IEC:2002
The client side physical layer uses a layer parameter, ‘Destination_process’, to decide where
to send the data received. The layer parameter shall be managed by the layer management
application process. When this parameter is not set (NULL), the physical layer shall send PH-
DATA.indications to the (physical connection manager) application process. When the
identification phase is over, the client application shall set the ‘destination_process’
parameter to point to the next upper layer of the protocol stack (the MAC sub-layer). From this
moment PH-DATA.indications (and,
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.

Loading comments...