Virtual serial port communication

Common systems for M-Bus meter data collection over Ethernet networks use the IP protocol through which standard M-Bus messages are tunnelled. The program for data collection handles the communication using the M-Bus protocol and also provides the processing of the data. Communication is accomplished directly over the IP connection or via a virtual serial port.

Beside the traditional tunnelled mode of communication our Smart Ethernet converters can also gather data from M-Bus meters by them selves and provide it in processed and more accessible forms such as HTML tables, CSV, XML or XML REST exports. In this converter mode of operation M-Bus communication is also available. The converter answers the value readout requests with meter responses which it keeps stored in memory. This form of communication drastically speeds up the communication with the meters. The readout is instantaneous without any waiting. In comparison a typical readout of a single meter takes about 1.5 seconds.

Creating a virtual serial port


A lot of programs for working with M-Bus meters uses a standard serial port for communication with the meters and does not support communication through an IP connection. We offer a virtual serial port application for our Ethernet converters. This application allows older programs to communicate through a serial port.

The application that can create a virtual serial COM port for our Ethernet converters is
Lantronix COM Port Redirector.

Principle of communication through the virtual serial port.

Steps for creating the virtuálneho serial port:

1. Connect the converter to the Ethernet port of the computer or to a network to which the computer has access.
2. Make sure that the Firewall on the computer which will be running the virtual serial port has open UDP ports 30718, 43282 and 43283.
3. Install Lantronix Com Port Redirector and launch the CPR Manager application.
Warning:
It is necessary to restart the computer after installing the Lantronix Com Port Redirector.
The installation of the application does not require a restart, however testing has showed that starting the low level driver while the operating system is running results in unexpected behavior and proper operation will start only after system restart. This applies especially to Windows 7 and higher.
4. Add a virtual COM port in the CPR Manager.
Click on the Add/Remove button.
In the Com ports dialog choose a port number and click on the OK button.
Click on the Save button.
5. This virtual port in CPR Manager needs to have a converter assigned to it.
Using the Search for devices button search for the available converters. The attached converter should appear in the bottom list of CPR Manager.

Copy the IP address and port of the converter from Device List into the first line of the table under the titles Host and TCP port. It is possible to simply drag and drop this setting with the mouse form the Device List onto the given line of the table.

Click on the Save button. The virtual serial port will be created with this last operation and it can be immediately used for communication with the meters.

Communication with meters in the Smart M-Bus application mode


1. Connect the meter to the converter. The primary M-Bus address of the meter must be configured. There are numerous methods of configuring the address (through the M-Bus line, through a separate port, using physical buttons and meter display, etc.) and they depend on the meter manufacturer. It is necessary to be familiarized with the meter's method of configuration and proceed according to manufacturer's instructions.
2. Set the converter into the Smart M-Bus application mode. The configuration of the converter over the network is possible using the Webinterface or Telnet on its IP address. The configuration details can be found in the Webinterface and Telnet manuals available on our web pages in the Download sections of the product you are using.
3. Set the meter address in the converter configuration. It is possible to use the built in meter search function M-Bus meter search in order to test the communication or to verify the settings.

Readout software example


Example of a software using the virtual serial port for meter readout.