IEC 60870-5-101/104 C Source Code Library

MZ Automation / Products / IEC 60870-5-101/104 C Source Code Library

IEC 60870-5-101/104 C Source Code Library

Source Code Library

This library provides support for the Companion Standard 101 (CS101) and 104 (CS104) of the IEC standard series for telecontrol applications (IEC 60870-5) and is commonly used in communication between a central station (controlling station) and an outstation (controlled station) in electrical power systems.

The C source code library allows a fast and cost efficient implementation of the IEC 60870-5-101 and IEC 60870-5-104 protocols into embedded devices and applications. The APIs are designed to be very easy to use and flexible. The library is written in C (C99 compliant to provide maximum portability). Due to its hardware and platform independent design it can be easily deployed on most platforms.


Manual/User Guide

API Documentation

Master/Slave (CS 101 - serial communication)

Client/Server (CS 104 - TCP/IP)

Usage examples code

Compatible with latest versions of IEC 60870-5-101 and IEC 60870-5-104

Support for all standard message types

TLS support for CS 104

Overview all versions

Open Source

IEC 60870-5-101/104 C Source Code Library

– for non-commerial use –

Most parts of the library are available as open-source. You can use the open source version to get started, learn about the protocols and applications, and as a base for your own GPLv3 compliant open source applications.

Download latest release Download changelog

Commercial License

IEC 60870-5-101/104 C Source Code Library

– for commerial use –

For integration in commercial products a commercial license is required. With the commercial license you can develop and distribute your own closed source applications. In addition to the open-source version the commercial version also includes an implementation for the IEC 60870-5-103 slave protocol and a high-level IEC 60870-5-101/104 slave/server component. For the commercial license there are also professional support and maintenance services available.

request a quote


  • Master/Slave (CS 101) and Client/Server (CS 104) implementation
  • Implements all command, monitoring, parameter, file message types
  • Available as portable C99 compliant source code
  • object oriented design in standard C
  • Comes with a lot of examples to simplify learning
  • Drivers for Linux/ucLinux, Windows, MacOS/BSD, FreeRTOS, VxWorks, lwIP, FNET, …
  • Tested on x86/x64, Coldfire, ARM9, ARM Cortex-A, ARM Cortex-M, PowerPC, MIPS
  • Field proven
  • Easy to use API
  • Compatible with the latest version of IEC 60870-5-101 and IEC 60870-5-104
  • CS 101 master/slave (RS 232/485 serial communication)
  • CS 101 balanced and unbalanced mode
  • CS 104 client/server (TCP/IP)
  • CS 104 redundancy group supported
  • Support for all standard message types (M_XX, C_XX, P_XX, F_XX) for messages in monitoring direction, commands, parameter loading, file transmission.
  • Send and receive messages in standard and reverse direction
  • spontaneous transmission of events
  • periodic transmission of measurements
  • command and set point transmission (direct and select/execute)
  • Support for interrogation and counter interrogation support
  • Clock synchronization command supported
  • Support for CP24Time2a and CP56Time2a time tags
  • TLS support (secure communication according to IEC 62351)

Request a quote

    If you submit inquiries to us via our contact form, the information provided in the contact form as well as any contact information provided therein will be stored by us in order to handle your inquiry and in the event that we have further questions. We will not share this information without your consent. »Privacy Policy