How pvvx/atc_mithermometer works
This repository provides custom BLE thermometer and hygrometer firmware for Telink devices, alongside Python tooling for advertising/configuration and firmware flashing. The device workflow is to acquire sensor readings, expose them over BLE in configurable beacon formats, and present them on supported displays; users can configure devices and perform OTA updates. The README also documents measurement history, security, extended BLE modes, and Zigbee-related OTA support. Some subsystem links below are documented capabilities or inferred from module names; unsampled implementation details are not asserted as inspected.
Main entry points: app.c Device Application · main.c Firmware Startup · atc_mi_config.py Python Config Tools · sensors.c Sensor Acquisition
Components 17
Device Firmware
- Firmware Startup
src/main.c - Device Application
src/app.c - Sensor Acquisition
src/sensors.c - Sensor Drivers
src/bme280.c - LCD and E-paper
src/lcd.c - Measurement History
src/logger.c
BLE and OTA
- Beacon Formats
src/mi_beacon.c - BLE Services
src/ble.c - Telink BLE Stack
SDK/components/stack/ble/ble.h - Extended OTA
src/ext_ota.h
User Interfaces
- Device Commands
src/cmd_parser.c - Python Config Tools
python-interface/atc_mi_interface/atc_mi_config.py - Advertising Tools
python-interface/atc_mi_interface/atc_mi_advertising.py - Browser Flasher
Runtime Platform
- Telink Drivers
SDK/components/drivers/8258/driver_8258.h - FreeRTOS Kernel
SDK/components/freertos/tasks.c
Other components
- Device User
Connections 16
- Device User → Firmware Startup: runs firmware
- Firmware Startup → Device Application: starts application
- Device Application → Sensor Acquisition: uses measurements
src/app.c - Sensor Acquisition → Sensor Drivers: reads sensors
- Device Application → LCD and E-paper: updates display
- Device Application → Measurement History: records measurements
- Device Application → Beacon Formats: publishes formats
- Beacon Formats → BLE Services: advertises data
- BLE Services → Telink BLE Stack: uses BLE stack
- Device Application → Device Commands: handles configuration
src/app.c - Device User → Python Config Tools: configures device
- Python Config Tools → Advertising Tools: formats advertisements
python-interface/atc_mi_interface/atc_mi_advertising.py - Python Config Tools → Device Commands: sets device options
- Browser Flasher → Extended OTA: performs OTA
- Firmware Startup → Telink Drivers: initializes hardware
src/main.c - Firmware Startup → FreeRTOS Kernel: uses runtime