Skip to content

Add M5Stack Cardputer Advanced (Cap LoRa-1262) companion firmware support#2496

Open
hdcasey wants to merge 1 commit intomeshcore-dev:mainfrom
hdcasey:cardputer-adv-support
Open

Add M5Stack Cardputer Advanced (Cap LoRa-1262) companion firmware support#2496
hdcasey wants to merge 1 commit intomeshcore-dev:mainfrom
hdcasey:cardputer-adv-support

Conversation

@hdcasey
Copy link
Copy Markdown

@hdcasey hdcasey commented May 7, 2026

Summary

This PR ports the M5Stack Cardputer Advanced + Cap LoRa-1262 variant originally created by @Stachugit (repo) to the v1.15.0 codebase.

All Cardputer-specific code — hardware variant, keyboard-driven UI, and LVGL display driver — is the work of Stachugit. This PR contributes it upstream so future MeshCore releases include official Cardputer ADV support without manual porting.

Hardware

Property Value
MCU ESP32-S3 (8MB Flash, 8MB PSRAM)
LoRa SX1262 via Cap LoRa-1262 (EU868, DIO2 RF switch, 3.3V TCXO)
Display M5Stack Cardputer LCD (LVGL)
Input Built-in keyboard (HEADLESS_UI=1)
GPS ATGM336H-6N on Serial1 (optional, G15/G13)
BLE Companion pairing via BLE

Files (all originally by Stachugit)

  • boards/m5stack_cardputer.json — PlatformIO board definition
  • variants/m5stack_cardputer/ — Hardware variant (SX1262 pinout, TCXO, GPS)
  • src/helpers/ui/M5CardputerDisplay.{h,cpp} — LVGL display driver
  • examples/companion_radio/ui-keyboard/ — Keyboard-driven companion UI
  • examples/companion_radio/UITask.h — Dispatcher (HEADLESS_UI=1ui-keyboard, else ui-new)

v1.15.0 API compatibility changes

Three small changes to bridge Stachugit's UI code to the updated v1.15.0 API:

  • NodePrefs: added screen_timeout_seconds field
  • MyMesh: moved saveContacts(), saveChannels(), added factoryReset() to public section
  • MyMesh: added queueOutgoingMessageForBLE() implementation

Build

pio run -e M5stack_cardputer_cap_lora1262_companion

RAM: 49.9% (163KB / 320KB) | Flash: 42.2% (1.34MB / 3.18MB)

Test plan

  • Firmware compiles cleanly against v1.15.0
  • Flashes successfully via USB to Cardputer Advanced
  • BLE pairing works with MeshCore iOS/Android app
  • LoRa radio receives packets (EU868, 869.525 MHz, SF11, BW250)
  • Channel sync over BLE (30 slots)
  • Telemetry reporting (battery voltage via ADC pin 10)

🤖 Generated with Claude Code

Ports the M5Stack Cardputer Advanced variant originally created by
Stachugit (https://github.com/Stachugit/MeshCore-Cardputer-ADV) to
the v1.15.0 codebase, making it buildable against the current upstream.

All Cardputer-specific code (hardware variant, keyboard UI, display
driver) is the work of Stachugit. This PR contributes it upstream so
future releases include official Cardputer support without manual porting.

New files (originally by Stachugit):
- boards/m5stack_cardputer.json
- variants/m5stack_cardputer/
- src/helpers/ui/M5CardputerDisplay.{h,cpp}
- examples/companion_radio/ui-keyboard/
- examples/companion_radio/UITask.h

v1.15.0 API compatibility changes:
- NodePrefs: add screen_timeout_seconds
- MyMesh: expose saveContacts(), saveChannels(), factoryReset() as public
- MyMesh: add queueOutgoingMessageForBLE()

Build target: env:M5stack_cardputer_cap_lora1262_companion
RAM: 49.9% | Flash: 42.2% of 8MB partition

Co-Authored-By: Stachugit <https://github.com/Stachugit>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@hdcasey hdcasey force-pushed the cardputer-adv-support branch from 7d8a7dd to 1a30cbb Compare May 7, 2026 12:57
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