Add UART console configurability to repeater 🤖🤖#2630
Open
disq wants to merge 4 commits into
Open
Conversation
Contributor
Author
|
Update: following commits fix this |
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_SERIALindirection 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_SERIALdefaults toSerial; override via build flag (e.g.-D MESH_CONSOLE_SERIAL=Serial1).MESH_DEBUG/BRIDGE_DEBUGmacros and all repeater/room-server console I/O print through it.USE_SERIAL1_CONSOLEwires up the Serial1 pins on nRF52.Changes
src/MeshCore.h— defineMESH_CONSOLE_SERIAL; route the debug macros through it.src/Dispatcher.cpp— redirect theMESH_PACKET_LOGGINGRX/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=Serial1and-UENV_INCLUDE_GPSflags (the latter to avoid GPS UART clash)Out of scope
WIFI_DEBUG/ESPNOW_DEBUG(esp32) still hardcodeSerial— left untouched.