Page tree
Skip to end of metadata
Go to start of metadata

Prerequisites

The IEC 60870-5-104 transport handler is located in the IEC60870 Wrapper Feature.

To use the IEC60870 Wrapper Feature, one has to install the j60870 Feature that is licensed under the GPLv3. The j60870 Feature contains the j60870 library that is originally developed by Stefan Feuerhahn (Frauenhofer ISE) and provided by openMUC under the GPLv3. It is modified by the University of Oldenburg. 

The protocol itself

The source of this section is Wikipedia.

IEC 60870 part 5 is one of the IEC 60870 set of standards which define systems used for telecontrol (supervisory control and data acquisition) in electrical engineering and power system automation applications. Part 5 provides a communication profile for sending basic telecontrol messages between two systems, which uses permanent directly connected data circuits between the systems. The IEC Technical Committee 57 (Working Group 03) have developed a protocol standard for telecontrol, teleprotection, and associated telecommunications for electric power systems. The result of this work is IEC 60870-5. Five documents specify the base IEC 60870-5:

  • IEC 60870-5-1 Transmission Frame Formats
  • IEC 60870-5-2 Data Link Transmission Services
  • IEC 60870-5-3 General Structure of Application Data
  • IEC 60870-5-4 Definition and Coding of Information Elements
  • IEC 60870-5-5 Basic Application Functions
  • IEC 60870-5-6 Guidelines for conformance testing for the IEC 60870-5 companion standards
  • IEC TS 60870-5-7 Security extensions to IEC 60870-5-101 and IEC 60870-5-104 protocols (applying IEC 62351)

The IEC Technical Committee 57 has also generated companion standards:

  • IEC 60870-5-101 Transmission Protocols - companion standards especially for basic telecontrol tasks
  • IEC 60870-5-102 Transmission Protocols - Companion standard for the transmission of integrated totals in electric power systems (this standard is not widely used)
  • IEC 60870-5-103 Transmission Protocols - Companion standard for the informative interface of protection equipment
  • IEC 60870-5-104 Transmission Protocols - Network access for IEC 60870-5-101 using standard transport profiles
  • IEC TS 60870-5-601 Transmission protocols - Conformance test cases for the IEC 60870-5-101 companion standard
  • IEC TS 60870-5-604 Conformance test cases for the IEC 60870-5-104 companion standard

IEC 60870-5-101/102/103/104 are companion standards generated for basic telecontrol tasks, transmission of integrated totals, data exchange from protection equipment & network access of IEC101 respectively. IEC 60870-5-101 is a standard for power system monitoring, control & associated communications for telecontrol, teleprotection, and associated telecommunications for electric power systems. This is completely compatible with IEC 60870-5-1 to IEC 60870-5-5 standards and uses standard asynchronous serial tele-control channel interface between DTE and DCE. The standard is suitable for multiple configurations like point-to-point, star, mutidropped etc.

Features

The source of this section is Wikipedia.

  • Supports unbalanced (only master initiated message) & balanced (can be master/slave initiated) modes of data transfer.
  • Link address and ASDU(Application Service Data Unit) addresses are provided for classifying the end station and different segments under the same.
  • Data is classified into different information objects and each information object is provided with a specific address.
  • Facility to classify the data into high priority (class-1) and low priority (class-2) and transfer the same using separate mechanisms.
  • Possibility of classifying the data into different groups (1-16) to get the data according to the group by issuing specific group interrogation commands from the master & obtaining data under all the groups by issuing a general interrogation.
  • Cyclic & Spontaneous data updating schemes are provided.
  • Facility for time synchronization
  • Schemes for transfer of files-Example:IED's will store disturbance recorder file in the memory, When electrical disturbance is occurred in the field. This file can be retrieved through IEC103 protocol for fault analysis

Frame format

The source of this section is Wikipedia.

Character format of IEC 101 uses 1 start bit, 1 stop bit, 1 parity bit & 8 data bits. FT1.2 (defined in IEC 60870-5-1) is used for frame format of IEC 101 which is suitable for asynchronous communication with hamming distance of 4. This uses 3 types of frame formats - Frame with variable length ASDUFrame with fixed length & single character. Single character is used for acknowledgments, fixed length frames are used for commands & variable lengths are used for sending data. The details of variable length frame is given below

IEC 101 Frame Format, Variable length

Data unitNameFunction
Start FrameStart CharacterIndicates start of Frame
Length Field (*2)Total length of Frame
Start Character (repeat)Repeat provided for reliability
Control FieldIndicates control functions like message direction
Link Address (0,1 or 2)Normally used as the device / station address
Data Unit IdentifierType IdentifierDefines the data type which contains specific format of information objects
Variable Structure QualifierIndicates whether type contains multiple information objects or not
COT (1 or 2)Indicates causes of data transmissions like spontaneous or cyclic
ASDU Address (1 or 2)Denotes separate segments and its address inside a device
Information ObjectInformation Object Address (1 or 2 or 3)Provides address of the information object element
Information Elements (n)Contains details of the information element depending on the type
Information Object-2-----
----------
Information Object-m

Stop FrameChecksumUsed for Error checks
Stop CharIndicates end of a frame

Types supported

The source of this section is Wikipedia.

  • Single indication without / with 24 / with 56 bit timestamps.
  • Double indication without / with 24 / with 56 bit timestamps.
  • Step position information without / with 24 / with 56 bit timestamps.
  • Measured value – normalized, scaled, short floating point without / with timestamps.
  • Bitstring of 32 bit without / with timestamps.
  • Integrated totals (counters) without / with timestamps.
  • Packed events (start & tripping ) of protection equipments
  • Single commands
  • Double commands
  • Regulating step command
  • Set point commands of various data formats
  • Bitstring commands
  • Interrogation commands
  • Clock synchronization & delay acquisition commands
  • Test & reset commands

IEC 60870-5-104 (IEC 104) protocol is an extension of IEC 101 protocol with the changes in transport, network, link & physical layer services to suit the complete network access. The standard uses an open TCP/IP interface to network to have connectivity to the LAN (Local Area Network) and routers with different facility (ISDNX.25Frame relay etc.) can be used to connect to the WAN (Wide Area Network). Application layer of IEC 104 is preserved same as that of IEC 101 with some of the data types and facilities not used. There are two separate link layers defined in the standard, which is suitable for data transfer over Ethernet & serial line (PPP - Point-to-Point Protocol). The control field data of IEC104 contains various types of mechanisms for effective handling of network data synchronization.

The security of IEC 104, by design has been proven to be problematic, as many of the other SCADA protocols developed around the same time. Though the IEC technical committee (TC) 57 have published a security standard IEC 62351, which implements end-to-end encryption which would prevent such attacks as replay, man-in-the-middle and packet injection. Unfortunately due to the increase in complexity vendors are reluctant to roll this out on their networks.


IEC 60870-5-104 transport handler

In Odysseus, both protocol stacks, client and server, are implemented as transport handler. A "104 server" represents a field station and a "104" client a grid control system. Important is that both transport handler do also the work of protocol handlers. Therefore, they must always be combined with the "None" protocol handler. See the examples below for the usage of the transport handler.

IEC 60870-5-104 client transport handler (access)
#PARSER PQL
#RUNQUERY
input := ACCESS({
          transport = 'iec60870-5-104_client',
          wrapper = 'GENERICPUSH',
          source = '104server',
          datahandler = 'tuple',
          options = [['host', '192.168.1.38'], ['port', '2404']],      
          schema = [
            ['typeId', 'object'],
            ['isSequenceOfElements', 'boolean'],
            ['causeOfTransmission', 'object'],
            ['test', 'boolean'],
            ['negativeConfirm', 'boolean'],
            ['originatorAddress', 'integer'],
            ['commonAddress', 'integer'],
            ['sequenceLength', 'integer'],
            ['informationObjects', 'list'],
            ['areInfosPrivate', 'boolean']
          ]                
        }            
      )
IEC 60870-5-104 client transport handler (sender)
#PARSER PQL
#RUNQUERY
out = SENDER({
          protocol = 'None',
          transport = 'iec60870-5-104_client',
          sink = '104server',
          wrapper = 'GenericPush',
          datahandler = 'tuple',
          options = [['host', '192.168.1.38'], ['port', '2404']]                
        },
        input
      )
IEC 60870-5-104 server transport handler (access)
#PARSER PQL
#RUNQUERY
input := ACCESS({
          transport = 'iec60870-5-104_server',
          wrapper = 'GENERICPUSH',
          source = '104client',
          datahandler = 'tuple',
          options = [['host', '192.168.1.38'], ['port', '2404']],      
          schema = [
            ['typeId', 'object'],
            ['isSequenceOfElements', 'boolean'],
            ['causeOfTransmission', 'object'],
            ['test', 'boolean'],
            ['negativeConfirm', 'boolean'],
            ['originatorAddress', 'integer'],
            ['commonAddress', 'integer'],
            ['sequenceLength', 'integer'],
            ['informationObjects', 'list'],
            ['areInfosPrivate', 'boolean']
          ]                
        }            
      )
IEC 60870-5-104 server transport handler (sender)
#PARSER PQL
#RUNQUERY
out = SENDER({
          protocol = 'None',
          transport = 'iec60870-5-104_server',
          sink = '104client',
          wrapper = 'GenericPush',
          datahandler = 'tuple',
          options = [['host', '192.168.1.38'], ['port', '2404']]                
        },
        input
      )
  • No labels