M-Bus

Top  Previous  Next

M-Bus is a series of European standards for remote reading of water, gas, and electricity meters (EN 13757).

 

This API has support for two different types of M-Bus: Wired M-Bus and Wireless M-Bus.

 

Wired M-Bus uses two wires to communicate with a number of devices that might be powered by the master.

The master sends a request and the slave devices respond.

The slave devices can be addressed using either a short primary address which is an integer typically in the range 1-250, or the secondary address which is a unique 16-byte string. See mbusScan for details about the format of the secondary address.

 

Wireless M-Bus uses RF to transmit the messages.

The slaves send data periodically without the master needing to do anything.

Wireless M-Bus only uses secondary addresses.

Wireless M-Bus data is often encrypted, so the correct decryption key is needed to parse the data.

When a Wireless M-Bus frame is received, it is kept in an internal buffer until it is either read with mbusRecordSlaveInfo or mbusReceive or it is overwritten by a newer message when the buffer is full.

 

 

The following functions are used to access both types of M-Bus:


mbusClose

Closes an M-Bus connection.


mbusOpen

Opens a connection to an M-Bus interface,


mbusReceive

Receive a raw M-Bus frame.


mbusSend

Send a raw M-Bus frame.

 

To read the received records:


M-Bus Records

Functions for reading the records.

 

 

The following categories contains functions specific for one type of M-Bus:


Wired M-Bus

Functions for Wired M-Bus.


Wireless M-Bus

Functions for Wireless M-Bus.