wmbus_decoder is a receive-only Flipper Zero Sub-GHz app for Wireless M-Bus at 868.95 MHz.
- WM-Bus receive pipeline with
Tand experimentalCmode capture paths - packet validation with plausibility, length, and CRC checks
- packet history on device with quality-based retention threshold and optional RSSI gate
- optional dated CSV logging with quality-based CSV threshold
- optional AES key loading from
keys.txt - generic DIF/VIF parsing for standard application records
- targeted device parsing for supported telegram families
- opt-in test builds write a startup selftest report to
/ext/apps_data/wmbus_decoder/selftest.txt
The mode-specific radio and capture contract is documented in Receive Pipeline.
- radio RX captures raw telegram data in
TorCmode - capture code reconstructs a candidate WM-Bus frame for the selected mode
- packet processing validates plausibility, length, and CRC
- packet metadata, identity fields, and the authoritative wire bytes are stored in
WmBusPacketRecord - normalized and optionally decrypted payload views remain transient during application parsing
- registered parsers inspect the packet and populate application-level fields
- the result is routed to live view, history storage, and optional CSV logging
- history and CSV retention apply optional RSSI and packet-quality gates
TandCmode Frame A processing is validated against real rx captures; the C radio profile with frame B handling still need live on-air validation- the app is receive-only; it does not transmit or pair
- device-specific parsing is limited; unsupported telegrams fall back to generic decode or remain undecoded
- decryption support is limited to what the shared packet path and registered parsers can validate
Currently registered application parsers:
Apator162: targeted device parser for supported Apator short-TPL telegramsDifVif: generic parser for standard DIF/VIF application records
Parser registration is order-dependent. The first parser whose probe() and parse() both succeed wins, so device-specific parsers must stay ahead of generic fallbacks such as DifVif.
New parsers live under applications_user/wmbus_decoder/protocol/parser/.
Minimum steps:
- add a new parser ID in
wmbus_parser_id.h - add a parser implementation with
probe(const WmBusParserPacketView*)andparse(const WmBusParserPacketView*, WmBusPacketApplicationData*) - add its display name to the indexed table in
wmbus_parser.c - include and register it in
wmbus_parser_registry.cwithparser_idand the correctvalidates_decryptflag - place it before any broader parser it should override
- add or update selftests in
src/test/
Parser inputs come through WmBusParserPacketView, which exposes DLL, TPL, payload, and identity data from the shared packet pipeline. New parser tests should exercise the full packet path through wmbus_packet_process_phy_frame(...) rather than calling parser internals directly.
OK: switch betweenLiveandHistoryUp/Down: browse saved packets inHistoryLeft: open configRight: open packet detail for the selected history entryLong Down: open application records for the selected history entryBack: exit immediately when no packet is in memory; otherwise confirm before discarding packets
Available settings:
- RX mode:
T/C - CSV logging:
Off/Basic/Full - memory quality threshold:
MEM gate >= - CSV quality threshold:
CSV gate >= - RSSI gate:
Offor a negative dBm threshold - keyring status and key entry
- About screen with author, repository, and build commit information
Files used by the app:
- settings:
/ext/apps_data/wmbus_decoder/settings.txt - keys:
/ext/apps_data/wmbus_decoder/keys.txt - selftest report:
/ext/apps_data/wmbus_decoder/selftest.txt - CSV basic:
/ext/apps_data/wmbus_decoder/packets_YYYYMMDD_basic.csv - CSV full:
/ext/apps_data/wmbus_decoder/packets_YYYYMMDD_full.csv
Optional AES keys are loaded from:
/ext/apps_data/wmbus_decoder/keys.txt
Format:
00112233445566778899AABBCCDDEEFF
- one AES-128 key per line as 32 hex characters
- lines starting with
#are ignored - only keys explicitly listed in this file are tested; no keys are derived or brute-forced
- up to 16 keys are tried in file order, stopping at the first standards-valid result
- EN 13757-3 and EN 13757-4 are normative for supported WM-Bus frame, transport, and security behavior.
- OMS documents are used only for extensions they define.
- The TI CC1101 errata is authoritative for RX FIFO handling.
- Proprietary Apator behavior is maintained from tested packet fixtures.
From this app directory:
ufbtOutput:
dist/wmbus_decoder.fap
Normal builds exclude the on-device test suite. Build, deploy, and run the test variant with:
WMBUS_SELFTESTS=1 ufbt launchThe test build writes its startup report to:
/ext/apps_data/wmbus_decoder/selftest.txt
After building and launching the app on a device, fetch the report with the Flipper CLI:
ufbt cliThen run:
storage read /ext/apps_data/wmbus_decoder/selftest.txt
Expected result ends with:
selftests done total=<N> passed=<N> failed=0
Rebuild production mode after testing so dist/wmbus_decoder.fap does not contain selftests:
ufbt- Inspired by wmbusmeters