
HAN ESP TSS721
UtilitechAS/amsreader-firmware
ESP8266 and ESP32 compatible firmware to read, interpret and publish data to MQTT from smart electrical meters, both DLMS and DSMR is supported

RFM69 and MGM210L radio board
Ha pi hat is an open-source printed circuit board by agendek78, from the agendek78/radio_board repository on GitHub. It is a 2-layer board of 65 × 57 mm with 50 parts on 97 nets, routed with 753 tracks and 346 vias.
It is built around the RFM69HCW-433M, RFM69HCW-868S2 and LM1117-3.3. Its parts include 12 capacitors, 12 resistors, 8 connectors, 4 ICs and 4 diodes. It belongs with the radio and wireless boards and the STM32 and Silicon Labs (EFR32, EFM) boards of this library.
Firmware for an STM32L452-based radio receiver board that captures wireless M-Bus (wMBus) telegrams using an HopeRF RFM69HCW ISM transceiver and streams the decoded datagrams to a host PC over USB CDC (virtual COM port).
The receiver is intended as a low-cost, embedded alternative to an RTL-SDR based wMBus sniffer, and is wire-compatible with host-side tooling that consumes the RTL-SDR text packet format.
WMBUS_MODE_T), and the driver/RX layer also supports
WMBUS_MODE_C1, WMBUS_MODE_C2 and WMBUS_MODE_R — change the call to
wmbus_rx_init() in Core/Src/main.c to switch.main().WMBUS_PACKET_FORMAT_RAW (default) — raw bytes of the clean wMBus
datagram (CRC bytes removed).WMBUS_PACKET_FORMAT_HEXSTRING — uppercase hex of the clean datagram,
one packet per line.WMBUS_PACKET_FORMAT_RTLSDR — RTL-SDR compatible text frame
(MODE;1;1;TIMESTAMP;PACKET_RSSI;CURRENT_RSSI;LINK_LAYER_IDENT_NO;HEX…).USART1 (115 200 8N1).| Item | Detail |
|---|---|
| MCU | STM32L452XX (Cortex-M4F, 80 MHz) |
| Radio | HopeRF RFM69HCW (868 MHz, FSK/OOK) |
| Radio interface | SPI1 + DIO0/DIO2 GPIO + RESET |
| Host link | USB Full-Speed CDC (virtual COM port) |
| Debug UART | USART1 @ 115 200 baud |
| LEDs | LED0 (PB12), LED1 (PB13) |
The CubeMX project (radio_board.ioc) is the source of truth for pin mapping
and peripheral configuration. See Core/Inc/main.h for pin defines.
The board itself is designed in KiCad and lives under hardware/. The design
is a small Raspberry Pi HAT form-factor carrier ("ha_pi_hat" — Home
Automation Pi HAT) that combines a sub-GHz wMBus radio with a 2.4 GHz
Zigbee/Thread radio module on a single carrier.
hardware/
├── ha_pi_hat.kicad_pro KiCad 9 project file
├── ha_pi_hat.kicad_sch Top-level (root) schematic
├── ha_pi_hat.kicad_pcb PCB layout
├── ism_radio.kicad_sch Hierarchical sub-sheet: STM32L452 + RFM69HCW
├── ism_radio.sch Legacy (KiCad 5/6) schematic export
├── ha_pi_hat-cache.lib Project-cached symbol library
├── mgm210l.lib / .dcm / .bck Symbol library for the Silicon Labs MGM210L
├── footprints.pretty/ Custom footprints (see below)
├── fp-lib-table, sym-lib-table Library tables for this project
├── fp-info-cache KiCad's footprint info cache
└── bom/
└── ibom.html Interactive HTML BOM (open in a browser)The design is hierarchical; the root sheet (ha_pi_hat.kicad_sch) contains
the Pi HAT connector, power, and the MGM210L Zigbee/Thread module, and
instantiates the sub-sheet ism_radio.kicad_sch, which holds the
sub-GHz radio chain that this firmware drives:
Core/Inc/main.h).KiCad 9.x is required (the project files use the 20250114 schematic
format). Open hardware/ha_pi_hat.kicad_pro from the KiCad project manager.
For a quick read-only BOM view without KiCad installed, open
hardware/bom/ibom.html in any browser.
radio_board/
├── CMakeLists.txt Top-level build (STM32CubeMX/CMake)
├── radio_board.ioc STM32CubeMX project file
├── STM32L452XX_FLASH.ld Linker script
├── startup_stm32l452xx.s Cortex-M startup
├── cmake/ Toolchain files (gcc-arm-none-eabi, clang)
├── Core/
│ ├── Inc/ Application headers (main.h, wmbus_rx.h, …)
│ ├── Src/ Application sources
│ │ ├── main.c Entry point, CubeMX init, RX loop, USB output
│ │ ├── wmbus_rx.c wMBus reception state machine
│ │ ├── rfm69hcw_hal.c STM32 HAL glue for the RFM69 driver
│ │ └── debug_log.c Lightweight UART logger
│ └── doc/ wMBus and RTL-SDR format notes
├── Drivers/
│ ├── CMSIS/ ARM CMSIS headers
│ ├── STM32L4xx_HAL_Driver/ ST HAL
│ └── rfm69/ Portable RFM69HCW driver (inc/, src/, doc/)
├── Middlewares/
│ └── ST/STM32_USB_Device_Library/ ST USB device middleware
├── USB_DEVICE/
│ ├── App/ USB CDC application layer
│ └── Target/ USB device port (usbd_conf.*)
├── hardware/ KiCad 9 schematic, PCB, footprints, BOM
└── build/ CMake build output (Debug)The project uses STM32CubeMX-generated CMake with Ninja. The default preset
uses the STM32 ARM clang toolchain (cmake/starm-clang.cmake); a
gcc-arm-none-eabi toolchain file is also provided in cmake/.
Available presets (see CMakePresets.json): Debug, Release.
# Configure (Debug preset)
cmake --preset Debug
# Build
cmake --build build/DebugBuild output: build/Debug/radio_board.elf.
The active output packet format can be selected at configure time by passing a CMake cache variable, e.g.:
cmake --preset Debug \
-DCMAKE_C_FLAGS="-DWMBUS_PACKET_FORMAT=WMBUS_PACKET_FORMAT_RTLSDR"
cmake --build build/DebugAlternatively edit the WMBUS_PACKET_FORMAT macro in Core/Src/main.c.
Any ST-Link compatible tool works. For example, with st-flash:
arm-none-eabi-objcopy -O binary build/Debug/radio_board.elf radio_board.bin
st-flash write radio_board.bin 0x08000000Or use STM32CubeProgrammer / OpenOCD against the same ELF.
minicom, picocom, screen, …).
Baud rate is irrelevant for USB CDC.WMBUS_PACKET_FORMAT_RAW by default — pipe the bytes into your decoder).For host-side decoding, any tool that understands the wMBus link layer
(wmbusmeters, etc.) can be fed the hex or raw output.
The driver in Drivers/rfm69/ is intentionally MCU-agnostic. It interacts
with the radio exclusively through a rfm69hcw_hal_t struct of function
pointers (SPI transfer, chip-select, reset, delay, tick). The STM32 binding
lives in Core/Src/rfm69hcw_hal.c. To port the driver to another platform,
re-implement those callbacks and link against the driver sources.
Core/doc/wmbus.txt — wMBus mode parameters and 3-out-of-6 coding notes.Core/doc/rtlsdr.txt — RTL-SDR text packet format spec.Drivers/rfm69/doc/RFM69HCW-V1.txt — RFM69HCW datasheet notes.Significant parts of the firmware were generated with the help of LLM-based coding assistants and then reviewed and integrated by hand. In particular:
Drivers/rfm69/ — the platform-independent RFM69HCW driver
(rfm69hcw_drv.c / rfm69hcw_drv.h) was AI-generated from the RFM69HCW
datasheet (Drivers/rfm69/doc/RFM69HCW-V1.txt) and the function-pointer HAL
contract.Core/Src/wmbus_rx.c / Core/Inc/wmbus_rx.h — the wMBus reception
state machine (mode configuration, FIFO polling, frame A/B accumulation,
callback dispatch) was AI-generated from the wMBus specification notes in
Core/doc/wmbus.txt on top of the RFM69HCW driver API.| Qty | Value | Footprint | References |
|---|---|---|---|
| 9 | 100nF | Capacitor_SMD:C_0402_1005Metric | C4, C5, C8, C10, C11, C12, C13, C14, C15 |
| 4 | RPi_Hat:RPi_Hat_Mounting_Hole | , , , | |
| 4 | 220 | Resistor_SMD:R_0603_1608Metric | R3, R4, R7, R8 |
| 4 | 3.3k | Resistor_SMD:R_0402_1005Metric | R1, R2, R9, R11 |
| 4 | LED | LED_SMD:LED_0603_1608Metric | D1, D2, D3, D6 |
| 2 | 0 | Resistor_SMD:R_0402_1005Metric | R5, R6 |
| 2 | 12pF | Capacitor_SMD:C_0402_1005Metric | C2, C3 |
| 1 | 10k | Resistor_SMD:R_0402_1005Metric | R12 |
| 1 | 10nF | Capacitor_SMD:C_0402_1005Metric | C7 |
| 1 | 12MHz | Crystal:Crystal_SMD_2520-4Pin_2.5x2.0mm | Y1 |
| 1 | 1k | Resistor_SMD:R_0402_1005Metric | R10 |
| 1 | 433MHz | Connector_Pin:Pin_D0.9mm_L10.0mm_W2.4mm_FlatFork | AE1 |
| 1 | 868MHz | Connector_Pin:Pin_D0.9mm_L10.0mm_W2.4mm_FlatFork | AE2 |
| 1 | Conn_01x08 | Connector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_Vertical | J7 |
| 1 | Discovery dbg | Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_Vertical | J3 |
| 1 | I2C | Connector_JST:JST_PH_S4B-PH-SM4-TB_1x04-1MP_P2.00mm_Horizontal | J2 |
| 1 | LM1117-3.3 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U1 |
| 1 | LOGO | footprints:zigbee_logo | G*** |
| 1 | LOGO | footprints:hass | G*** |
| 1 | MGM210L | footprints:MGM210L | M2 |
| 1 | RFM69HCW-433 | RF_Module:HOPERF_RFM9XW_SMD | U3 |
| 1 | RFM69HCW-868 | RF_Module:HOPERF_RFM9XW_SMD | U5 |
| 1 | RPi_GPIO | Connector_Samtec_HLE_SMD:Samtec_HLE-120-02-xxx-DV-A_2x20_P2.54mm_Horizontal | J1 |
| 1 | STM debug | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J5 |
| 1 | STM32L452CEUx | Package_DFN_QFN:QFN-48-1EP_7x7mm_P0.5mm_EP5.6x5.6mm | U2 |
| 1 | Serial console | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical_SMD_Pin1Left | J8 |
| 1 | USB_B_Micro | footprints:USB-MICRO-B | J4 |
| 1 | ZB_JTAG/ISA3 | pi_ikea_hat:Modified_PinHeader_2x05_P1.27mm_Vertical_SMD | J6 |

UtilitechAS/amsreader-firmware
ESP8266 and ESP32 compatible firmware to read, interpret and publish data to MQTT from smart electrical meters, both DLMS and DSMR is supported

karawin/Ka-Radio
A wifi webradio with only low cost boards ESP8266 and VS1053 by Jp Cocatrix


doudar/SmartSpin2k
Transform your spin bike into a Smart Trainer!

plinkysynth/plinky_public
a public release of the plinky sw and hw

eddyem/stm32samples
Code samples and ready projects based on bare-metal STM32


It measures 65 × 57 mm and has 2 copper layers, 0.8 mm thick.
50 parts, built around the RFM69HCW-433M, RFM69HCW-868S2 and LM1117-3.3. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the agendek78/radio_board repository on GitHub, at the commit this page was made from: the board is hardware/ha_pi_hat.kicad_pcb and its schematic hardware/ha_pi_hat.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask agendek78 before reusing the design.