This guide is the on-site method to bring a wired M-Bus installation into service with the gateway: find the meters, check their readings, set the polling, and diagnose a bus that misbehaves. The parameters themselves are described in the M-Bus driver page; this article tells you in which order to use them.
Checked against: firmware r9347. Applies to: M-Bus gateways of type Serial or TCP, with Legacy driver unchecked (the default for new gateways). Licence: the M-Bus driver is a licensed feature (contact support@weble.ch).
Collect this information before going on site:
| Question | Why it matters |
|---|---|
| Bus speed of the meters (usually 2400 baud, sometimes 300 or 9600) | All meters of the bus must use the speed set in Serial Baudrate. The gateway does not change the speed programmed in a meter. |
| Primary or secondary addressing | Primary addresses (0–250) are faster to scan but must be unique. Secondary addresses (serial number + manufacturer + version + medium) are unique by construction: prefer them on a new or unknown bus. |
| Number of meters and length of the bus | The level converter (USB or Ethernet) must be able to power all meters. |
| Other masters | Only one master may use the bus at a time. Disconnect any other reading device or software (portable reader, another controller) during commissioning. |
Create the gateway as described in M-Bus — Getting started: Type Serial with the Serial Port of the converter (choose the unique ID proposed by the auto-complete), or Type TCP with the Host and Port of an M-Bus to Ethernet converter. Start the gateway.
Open the address table of the gateway, then the M-Bus Methods menu.
If the meters have unique primary addresses, use Scan primary addresses: set From and To to the range actually used (each empty address costs at least one request timeout), then click Scan.
Otherwise, use Scan secondary addresses. Leave the Mask at F everywhere to scan the whole bus, and choose the Profile:
| Profile | Timeout / idle | When to use it |
|---|---|---|
Medium (default) |
2000 / 500 ms | Most installations. Start with it. |
Fast (adaptive) |
1000 / 300 ms | Large buses with recent meters and a direct converter. It slows down by itself when answers arrive late. |
Slow (safe) |
3000 / 1000 ms | Slow converters (M-Bus to Ethernet gateways, radio links), old meters, or when the medium scan misses meters. |
Custom |
your values | Shows Timeout, Idle timeout and Retries. |
On a large bus, scan by groups with the mask: for example FFFFFFFFFFFFFF07 finds only water meters (medium 07), and the ID group 12FFFFFF the meters whose serial number starts with 12. The scan mask section lists the common masks.
During the scan, the window shows the counters (probes, devices, collisions, empty) and the meters found; each one is added as %mbus:<secondary address>. Stop a secondary scan with Cancel scan: closing the window does not stop it. While a scan runs, polling is paused.
Check the result. Compare the number of meters found with the meter list of the installation. If meters are missing:
Slow (safe) profile, or only the missing meters with their serial number in the mask.The records of each meter (%mbus:<meter>/0, /1…) appear at the first reading. Their description is taken from the meter (quantity, function, storage number).
0.001 to convert litres to m³.Reduce what is read. Many meters return dozens of records, often across several frames (historical values, tariffs). On the meter address (%mbus:<meter>):
Records that are no longer read get the status !missing: delete them if they are not needed.
Polling (ms/cron) on the gateway sets the default reading frequency; the same field on a meter address overrides it for that meter. It accepts milliseconds or a cron expression in standard syntax (five fields, minute first, or six fields, seconds first):
| Need | Polling |
|---|---|
| Heat and water meters for billing | 0 * * * * (every hour, on the hour) or 0 0 * * * (once a day at midnight) |
| Monitoring of flows and temperatures | */15 * * * * (every 15 minutes) |
| One meter read more often | set the field on that meter only, for example 60000 |
Rules of thumb:
only changes (default), each cycles, or a duration at which the last value is repeated. With a cron polling, each scheduled reading is reported even when the value has not changed.on update, always or a duration); see Logging & history.M-Bus Methods › Monitor lists every frame sent (TX) and received (RX): time, delay since the last transmission, frame type and function, address, CI field, secondary address, error and raw bytes. It also works during a scan and stops by itself after 30 minutes.
| What you see | Meaning | What to do |
|---|---|---|
| TX requests without any RX | The meter does not answer: wrong address, wrong speed, wiring, or converter not powering the bus. | Check Serial Baudrate, the address and the wiring. |
| RX after a delay longer than Request timeout (ms), then unexpected data | The converter or the meter answers too late: the gateway had already given up. | Raise Request timeout (ms) (default 5000). |
| Answers mixed up between meters, errors bad checksum or incomplete frame | Collisions or noise: two meters on the same primary address, another master, a long or badly wired bus. | Use secondary addressing; raise Idle timeout (ms) (default 1000) to leave more time between requests. |
| Frequent timeouts on a bus that otherwise works | Occasional losses. | Set Retries on timeout to 1 or 2. |
The status of an address tells you what happened at the last reading. The complete list is in M-Bus — Address statuses; the most frequent are:
| Status | What to do |
|---|---|
!timeout |
Check wiring, address and speed; raise Request timeout (ms) or Retries on timeout. |
!no response (bus busy) |
A reading has been running for more than 60 s: the bus or the converter is blocked. Check with the Monitor; look for another master. |
!missing |
The record is no longer in the answer of the meter (Max frames / Max records lowered, meter reconfigured). |
!mismatch (retrying) |
Another meter answered instead of the one addressed: duplicate primary address. Switch the meter to secondary addressing. |
!timeouts maxed |
The bus is severely degraded: check the converter, the cable length and the number of meters. |
The gateway recovers by itself from most problems: after 5 consecutive failed readings it sends a bus reset (at most once every 5 minutes), and after 10 it restarts the driver. A lost serial or TCP connection also restarts the driver.
When a meter must be configured with the manufacturer's tool, or when the problem cannot be solved remotely with the Monitor, the gateway can lend its M-Bus line to a PC:
8222). While a client is connected, the gateway stops its own polling and forwards the frames between the TCP client and the bus; polling resumes when the client disconnects.Enable TCP Server only for the duration of the intervention and disable it afterwards. Reach it through the VPN only, never expose the port to the Internet, and restrict access to it by firewall or network segmentation.
| Symptom | Cause and fix |
|---|---|
| The scan finds no meter at all | Wrong Serial Baudrate, wrong serial port, converter not powering the bus, or another master. Check with the Monitor whether anything is received. |
| The scan finds fewer meters than expected | Use the Slow (safe) profile, scan by groups with the mask, check for another master. |
A scan is refused with bus already busy |
A scan is still running in the background (its window was closed): wait for the end of the scan. |
| Values are 1000 times too large or too small | Check Apply unit factor, then adjust Scale on the record. |
| Readings take too long | Lower Max frames / Max records, spread the polling, check the Monitor for retries. |
The gateway log shows missing license |
The gateway has no M-Bus licence. |