Skip to end of metadata
Go to start of metadata

2N® SmartCom PRO can be equipped with M-Bus interface and can collect data from up to 5 M-Bus devices (with extender it can be up to 250 M-Bus devices). This website describe possible scenarios and some examples how to collect and use M-Bus messages with 2N® SmartCom PRO.

2N® SmartCom PRO can be configured via hyperterminal software or 2N® SmartCom Terminal Config software. The SmartCom terminal can be set to a Standalone mode unit or TCP Client mode unit connected to 2N® SmartCom Server (
In TCP client mode terminals are connected to the server and you can very easily manage them via 2N® SmartCom Control Panel software (

End device (water meter, electricity meter, heat meter etc…)

To be able connect the end device to 2N ®SmartCom PRO terminal you need to know at least M-Bus setting of the end device (can be in meter´s manual):

  • Primary address
  • Speed [bd/s]
  • Data bits
  • Stop bits
  • Parity

2N®SmartCom PRO M-Bus settings

You need to set all M-Bus parameters in 2N® SmartCom PRO. You can do the settings using  SmartCom Terminal Config Software or via at commands using serial / telnet terminal software.

 Settings M-Bus: speed 2400bd/s - data bits 8 – stop bits 1 – parity – none

 at^scport2="baudrate",2400                     Set Baudrate

at^scport2="DATA_BITS",8                       Set data bits

at^scport2="STOP_BITS",1                       Set stop bits

at^scport2="PARITY",0                             Set parity

at^scport2?                                              Check settings

at^scport2="save"                                     Save settings

M-Bus data readout from 2N®SmartCom PRO

Data can be read using 2N ® SmartCom PRO in two modes either Transparent mode or using Autonomous Metering System functionality:

  • Transparent mode:

2N® SmartCom PRO is used as communication data channel and data are not stored in 2N® SmartCom PRO internal memory. Application / script, reading M-Bus data from meter is running on remote server site and reading data using 2N® SmartCom PRO communication interface. Data are stored on server site in the application or file. There are no data available in case the 2N® SmartCom PRO is not available over IP network

With AMS functionality 2N® SmartCom PRO can read and store M-Bus data from meter autonomously in predefined interval.

Read data are stored to internal memory of 2N® SmartCom PRO. Data are stored in original M-Bus format. Data are presented in the 2n® SmartCom PRO internal memory even when the WAN connection is not available. So you can easily read them out from the memory when connected to the terminal (no matter whether it is local RS232 or telnet connection). It can prevent missing data in case the IP network is not available.

M-Bus messages and parsing

Original M-Bus format:

You can work with M-Bus messages in original format defined by M-Bus standard. All types of M-Bus messages are described for example on website, messages are in HEX format.

You can request the data from meter by sending commands to M-Bus meter directly through the SmartCom PRO terminal for example from hyperterminal or some software which support HEX strings.

In Standalone mode you need to use telnet for SmartCom PRO terminal communication (IP address of 2N ® SmartCom PRO and port 10002).
In TCP Client mode you can create and use virtual port (serial or TCP port), that virtual port can be mapped to 2N ® SmartCom PRO M-Bus interface (

  • Autonomous Metering System (AMS)

2N® SmartCOM PRO can be set to reads data from M-Bus end device autonomously and store data in internal memory. Format of stored M-Bus message in internal memory:


<type of record> - typ of record - AMS

<time_stamp> - time mark

<sequential_number> - sequential number of saved record

<protocol> - name of protocol

<index> - index of device from table of devices

<error_code> - number 0 = without error

<device_identification> - not used in M-Bus

<data> - raw data

Raw data:


^SCDATA: "AMS",1427985840,25036,"MBUS",1,0,"","685E5E6808007268170308653299068E0000000C13911800000B22730404046D3510E2



  • Script that runs on you Server / PC:

You can create your own script for parsing M-Bus messages. Examples of testing scripts are available on request from 2N support. Those scripts are based on linux library libmbus ( Data are processed and saved to TXT, CSV, and similar files format.


  • Data from water meter Siemens parsed by libmbus library







        <ProductName>Siemens WFH21</ProductName>

        <Medium>Hot water</Medium>






    <DataRecord id="0">

        <Function>Instantaneous value</Function>

        <Unit>Volume (m m^3)</Unit>





    <DataRecord id="1">

        <Function>Instantaneous value</Function>

        <Unit>On time (hours)</Unit>






    <DataRecord id="9">

        <Function>Instantaneous value</Function>

        <Unit>Time Point (date)</Unit>





    <DataRecord id="10">

        <Function>Manufacturer specific</Function>

        <Value>37 FD 17 00 00 00 00 00 00 00 00 02 7A 25 00 02 78 25 00</Value>






  • Processed data from electricity meter stored in CSV file:

  • Processed M-Bus data from meters can be imported to traffic grapher or other tool you are used to use. Traffic grapher is not included in 2N® SmartCOM PRO or 2N® SmartCOM Server. You can use you preferred tool.

  • M-Bus monitoring software

You can use M-Bus monitoring software which will analyze and display data from 2N® SmartCom PRO.


You can create your account in Energy monitoring cloud service Smart – me (

How this example works:

  • Via 2N® SmartCom PRO read M-Bus data.
  • 2N® SmartCom Server processed data using additional script which sends the final data format requested from Smart-me to your account at Cloud service Smart – me
  • You can display results online