Skip to content

Add UART console configurability to repeater 🤖🤖#2630

Open
disq wants to merge 4 commits into
meshcore-dev:devfrom
disq:rak3401-uart-console
Open

Add UART console configurability to repeater 🤖🤖#2630
disq wants to merge 4 commits into
meshcore-dev:devfrom
disq:rak3401-uart-console

Conversation

@disq
Copy link
Copy Markdown
Contributor

@disq disq commented May 26, 2026

Implements #2513 (as it was summarized in #2628)

I had the code already (tested and seems to work) so why not submit it.

Configurable UART console

Adds a MESH_CONSOLE_SERIAL indirection so console/log output can be routed off USB (Serial) onto a spare UART (Serial1). On RAK3401 this lets USB stay power-only while serial dumps flow out the extra UART.

How it works

  • MESH_CONSOLE_SERIAL defaults to Serial; override via build flag (e.g. -D MESH_CONSOLE_SERIAL=Serial1).
  • MESH_DEBUG/BRIDGE_DEBUG macros and all repeater/room-server console I/O print through it.
  • Opt-in USE_SERIAL1_CONSOLE wires up the Serial1 pins on nRF52.

Changes

  • src/MeshCore.h — define MESH_CONSOLE_SERIAL; route the debug macros through it.
  • src/Dispatcher.cpp — redirect the MESH_PACKET_LOGGING RX/TX packet dumps.
  • examples/simple_repeater/ — console output + Serial1 setup.
  • examples/simple_room_server/ — same redirection for parity.
  • variants/rak3401/platformio.ini — commented -DMESH_CONSOLE_SERIAL=Serial1 and -UENV_INCLUDE_GPS flags (the latter to avoid GPS UART clash)

Out of scope

  • WIFI_DEBUG/ESPNOW_DEBUG (esp32) still hardcode Serial — left untouched.

@disq disq changed the title Add UART console configurability to repeater Add UART console configurability to repeater 🤖🤖 May 28, 2026
@disq
Copy link
Copy Markdown
Contributor Author

disq commented Jun 6, 2026

er, this currently won't help with serial packet logging (observers/mqtt) as the affected code sits in an upper level (Dispatcher). Checking if there's a better way to do it (with RS232/custom env/etc)

Update: following commits fix this

@disq disq marked this pull request as draft June 6, 2026 20:47
disq and others added 2 commits June 6, 2026 21:52
Catch the packet-logging dumps in Dispatcher and the simple_room_server
example that were missed when the UART console was made configurable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@disq disq marked this pull request as ready for review June 6, 2026 20:54
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