On RAK19007 + RAK3401 the WisBlock base exposes TX1/RX1 on the header. With the RAK13302 1W add-on we’d like to power the node from an third-party 5V supply (not the Pi’s USB) and talk to a Raspberry Pi over GPIO UART. Today that isn’t possible without code edits, because all console/debug output in simple_repeater is hardcoded to Serial (USB CDC).
Proposal
Add a single macro that selects which serial the repeater console + debug logging uses, defaulting to Serial so behaviour is unchanged.
In src/MeshCore.h:
#ifndef MESH_CONSOLE_SERIAL
#define MESH_CONSOLE_SERIAL Serial
#endif
Use MESH_CONSOLE_SERIAL for:
MESH_DEBUG_PRINT / MESH_DEBUG_PRINTLN
BRIDGE_DEBUG_PRINTLN
examples/simple_repeater/main.cpp console I/O (boot ID, command loop, power-off msg)
examples/simple_repeater/MyMesh.cpp (logRxRaw, dumpLogFile, get acl)
Do:
MESH_CONSOLE_SERIAL.begin(115200);
Enable per-variant with:
-D MESH_CONSOLE_SERIAL=Serial1
Why not just use the bridge / USB
USB CDC requires powering the node from the Pi, which fights the 1W add-on's preferred third-party 5V supply path.
WITH_RS232_BRIDGE is a binary bridge protocol, not a debug/console.
Compile-time -D Serial=Serial1 collides with libraries that reference Serial.
Scope
Default behavior unchanged (MESH_CONSOLE_SERIAL falls back to Serial).
Only simple_repeater example touched in the first pass; other examples could follow the same pattern.
Happy to open a PR with the change.
On RAK19007 + RAK3401 the WisBlock base exposes TX1/RX1 on the header. With the RAK13302 1W add-on we’d like to power the node from an third-party 5V supply (not the Pi’s USB) and talk to a Raspberry Pi over GPIO UART. Today that isn’t possible without code edits, because all console/debug output in
simple_repeateris hardcoded toSerial(USB CDC).Proposal
Add a single macro that selects which serial the repeater console + debug logging uses, defaulting to
Serialso behaviour is unchanged.In src/MeshCore.h:
Use
MESH_CONSOLE_SERIALfor:MESH_DEBUG_PRINT/MESH_DEBUG_PRINTLNBRIDGE_DEBUG_PRINTLNexamples/simple_repeater/main.cppconsole I/O (boot ID, command loop, power-off msg)examples/simple_repeater/MyMesh.cpp(logRxRaw, dumpLogFile, get acl)Do:
Enable per-variant with:
Why not just use the bridge / USB
USB CDC requires powering the node from the Pi, which fights the 1W add-on's preferred third-party 5V supply path.
WITH_RS232_BRIDGEis a binary bridge protocol, not a debug/console.Compile-time
-D Serial=Serial1collides with libraries that referenceSerial.Scope
Default behavior unchanged (
MESH_CONSOLE_SERIALfalls back toSerial).Only
simple_repeaterexample touched in the first pass; other examples could follow the same pattern.Happy to open a PR with the change.