Skip to content

feat(rf): add passive Wireless M-Bus T1/C1 receiver - #3069

Open
E-Mixer wants to merge 3 commits into
BruceDevices:mainfrom
E-Mixer:contribute/wireless-mbus
Open

E-Mixer wants to merge 3 commits into
BruceDevices:mainfrom
E-Mixer:contribute/wireless-mbus

Conversation

@E-Mixer

@E-Mixer E-Mixer commented Nov 11, 2026

Copy link
Copy Markdown

Proposed Changes

Add a native, receive-only Wireless M-Bus app under Radio Frequency > Wireless M-Bus. It receives T1/C1 telegrams at 868.95 MHz using the CC1101, validates DLL CRCs and lists up to 96 devices with IDs, manufacturer/header details, RSSI/LQI, counts and hex data. Supported numeric DIF/VIF records are interpreted only when the application data is explicitly unencrypted. The latest valid telegram per device can be exported to SD as JSONL.

What Wireless M-Bus is for: Wireless M-Bus (wM-Bus, EN 13757-4) transmits consumption readings from water, gas, heat and electricity meters, as well as heat-cost allocators, to readers or gateways. It is particularly widespread in Europe. Regional profiles and frequency bands vary; this implementation specifically targets T1/C1 reception at 868.95 MHz. Background: M-Bus and Texas Instruments.

This allows Bruce users to inspect compatible meter telegrams and check reception on a supported CC1101 device. The current JavaScript interface does not expose the required packet receiver, so the implementation is native. No keys, decryption or transmit functionality are introduced by this app.

The contribution includes English and German documentation, host tests and a minimal RF-menu/README entry. Two local build compatibility fixes are isolated in a separate prerequisite commit: pinning FastLED 3.10.3 and using the installed Xtensa objcopy directly, with failure handling before SDK archive renames.

Types of Changes

New RF feature, documentation and host tests; separate build compatibility fix.

Verification

On a LilyGO T-Embed CC1101 Plus, select the CC1101 RF module and open Radio Frequency > Wireless M-Bus > Scan T1/C1 868.95. Receive a supported transmission and inspect the device list/details. Detail viewing pauses reception; return to resume. Stop scanning before using Export devices to SD.

See docs/wireless-mbus.md and docs/wireless-mbus.de.md for operation and remaining hardware checks. Reception uses Bruce's board-specific RF initialization and restores saved radio configuration on exit. The table is limited to 96 devices; the export is a device snapshot rather than continuous logging. Protected/unsupported data remains raw bytes, and a valid CRC is not sender authentication. The display/SD/radio shared SPI bus can cause reception gaps during screen updates.

Testing

  • The development firmware built for lilygo-t-embed-cc1101 using Python 3.13 and PlatformIO 6.2.0. It was installed with esptool write-hash verification and responded to info/uptime.
  • On 11 November 2026, the device owner confirmed very good real reception on a LilyGO T-Embed CC1101 Plus. Exact per-mode coverage and reference-meter comparison were not separately recorded.
  • The production Wireless M-Bus/menu files in this contribution match the hardware-tested implementation.
  • python tests/wmbus/run.py --zig passes on this PR branch. Coverage includes CRC/framing, corruption/truncation, encryption boundaries, 20,000 randomized inputs, and the actual Receiver implementation with a simulated CC1101: FIFO fragmentation, long frames, overflow/timeout recovery and register restoration.
  • Other boards, all SD error paths, detailed UI behavior and the full T1/C1-A/C1-B hardware matrix remain unconfirmed. Existing Bruce/dependency compiler warnings remain. Maintainer feedback and additional board testing are welcome.

Linked Issues

Community introduction and hardware feedback: #3068

User-Facing Change

Add experimental receive-only Wireless M-Bus T1/C1 reception at 868.95 MHz to the RF menu, with device details and SD device-overview export. Reception tested on LilyGO T-Embed CC1101 Plus; English and German instructions included.

Further Comments

The existing development release provides the hardware-tested full image and its corresponding source tag. This PR uses a separate contribution branch focused on the receiver, tests and documentation.

Protocol references and AGPL-3.0-or-later licensing are documented. Implementation developed with Codex assistance; real reception tested by the device owner.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant