Add native Ethernet support for RAK4631 repeater, room server, and companion

Add W5100S Ethernet adapter support for RAK4631-based firmware, enabling
TCP CLI access on port 23 as an alternative to BLE/Serial connections.

- New SerialEthernetInterface for nRF52 with DHCP, reconnection handling,
  and shared WB_IO2 power pin management with GPS module
- Ethernet build targets for repeater, room server, and companion firmware
- Prevent GPS from toggling WB_IO2 when Ethernet module is active
- CI build check for all three ETH firmware targets

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ryan Gregg 2026-03-09 14:52:01 -07:00
parent a10476efd7
commit 70b51bd096
9 changed files with 842 additions and 11 deletions

View file

@ -36,6 +36,10 @@ void RAK4631Board::begin() {
pinMode(PIN_USER_BTN_ANA, INPUT_PULLUP);
#endif
#ifdef RAK_ETH_ENABLE
beginETH();
#endif
#if defined(PIN_BOARD_SDA) && defined(PIN_BOARD_SCL)
Wire.setPins(PIN_BOARD_SDA, PIN_BOARD_SCL);
#endif

View file

@ -46,6 +46,26 @@ build_src_filter = ${rak4631.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_repeater>
[env:RAK_4631_repeater_eth]
extends = rak4631
build_flags =
${rak4631.build_flags}
-D DISPLAY_CLASS=SSD1306Display
-D ADVERT_NAME='"RAK4631 Repeater ETH"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D MAX_NEIGHBOURS=50
-D ETH_ENABLED=1
-D MESH_DEBUG=1
build_src_filter = ${rak4631.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_repeater>
lib_deps =
${rak4631.lib_deps}
# renovate: datasource=github-tags depName=RAK13800-W5100S packageName=RAKWireless/RAK13800-W5100S
https://github.com/RAKWireless/RAK13800-W5100S/archive/1.0.2.zip
[env:RAK_4631_repeater_bridge_rs232_serial1]
extends = rak4631
build_flags =
@ -108,6 +128,26 @@ build_src_filter = ${rak4631.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_room_server>
[env:RAK_4631_room_server_eth]
extends = rak4631
build_flags =
${rak4631.build_flags}
-D DISPLAY_CLASS=SSD1306Display
-D ADVERT_NAME='"Test Room ETH"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D ROOM_PASSWORD='"hello"'
-D ETH_ENABLED=1
-D MESH_DEBUG=1
build_src_filter = ${rak4631.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_room_server>
lib_deps =
${rak4631.lib_deps}
# renovate: datasource=github-tags depName=RAK13800-W5100S packageName=RAKWireless/RAK13800-W5100S
https://github.com/RAKWireless/RAK13800-W5100S/archive/1.0.2.zip
[env:RAK_4631_companion_radio_usb]
extends = rak4631
board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
@ -129,6 +169,37 @@ lib_deps =
${rak4631.lib_deps}
densaugeo/base64 @ ~1.4.0
[env:RAK_4631_companion_radio_eth]
extends = rak4631
board_build.ldscript = boards/nrf52840_s140_v6.ld
board_upload.maximum_size = 712704
build_unflags =
-D EXTRAFS=1
build_flags =
${rak4631.build_flags}
-I examples/companion_radio/ui-new
-D PIN_USER_BTN=9
-D PIN_USER_BTN_ANA=31
-D DISPLAY_CLASS=SSD1306Display
-D MAX_CONTACTS=350
-D MAX_GROUP_CHANNELS=40
-D ETH_ENABLED=1
; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
-D MESH_DEBUG=1
-D ETH_DEBUG_LOGGING=1
build_src_filter = ${rak4631.build_src_filter}
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/nrf52/SerialEthernetInterface.cpp>
lib_deps =
${rak4631.lib_deps}
densaugeo/base64 @ ~1.4.0
# renovate: datasource=github-tags depName=RAK13800-W5100S packageName=RAKWireless/RAK13800-W5100S
https://github.com/RAKWireless/RAK13800-W5100S/archive/1.0.2.zip
[env:RAK_4631_companion_radio_ble]
extends = rak4631
board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
@ -192,4 +263,4 @@ build_flags =
build_src_filter = ${rak4631.build_src_filter}
+<../examples/kiss_modem/>
lib_deps =
${rak4631.lib_deps}
${rak4631.lib_deps}