diff --git a/FLASHING.md b/FLASHING.md new file mode 100644 index 0000000000..1cb0776e0e --- /dev/null +++ b/FLASHING.md @@ -0,0 +1,35 @@ +# Flashing RAK13800 Ethernet Companion Targets + +Use the canonical PlatformIO target names: + +- `RAK_RAK13800_companion_radio_eth` +- `RAK_RAK13800_companion_radio_eth_static_diag` + +These are RAK13800 Ethernet Companion board-support targets built on the RAK4631 MCU platform. The MCU, bootloader, SoftDevice, and board package remain RAK4631 / nRF52840, but the hardware stack being supported is `RAK 4631 / RAK13800 + W5100S`. + +## Production Target + +- Target: `RAK_RAK13800_companion_radio_eth` +- Networking: DHCP first, or DHCP with static fallback +- TCP port: `4403` +- `ETH_DEBUG_LOGGING=0` +- `FORCE_CLIENT_REPEAT=0` +- `MAX_CONTACTS=128` unless RAM testing proves a higher value is safe + +## Static Diagnostic Target + +- Target: `RAK_RAK13800_companion_radio_eth_static_diag` +- IP: `10.245.94.47` +- Gateway: `10.245.94.33` +- DNS: `10.245.94.33` +- Subnet: `255.255.255.224` +- TCP port: `4403` +- `ETH_STATIC_ONLY=1` +- `ETH_DEBUG_LOGGING=1` + +## Compatibility Aliases + +The following names may remain temporarily for compatibility: + +- `RAK_4631_companion_radio_eth_clean` -> `RAK_RAK13800_companion_radio_eth` +- `RAK_4631_companion_radio_eth_static_diag` -> `RAK_RAK13800_companion_radio_eth_static_diag` diff --git a/README.md b/README.md index af56aaf33b..255b2b281e 100644 --- a/README.md +++ b/README.md @@ -34,10 +34,32 @@ MeshCore provides the ability to create wireless mesh networks, similar to Mesht - Flash the MeshCore firmware on a supported device. - Connect with a supported client. +### RAK13800 Ethernet Companion Targets + +- `RAK_RAK13800_companion_radio_eth` is the production board-support target. +- `RAK_RAK13800_companion_radio_eth_static_diag` is the static diagnostic target. +- The old `RAK_4631_companion_radio_eth_clean` and `RAK_4631_companion_radio_eth_static_diag` names remain compatibility aliases only. +- Static diagnostic settings: + - IP `10.245.94.47` + - Gateway `10.245.94.33` + - DNS `10.245.94.33` + - Subnet `255.255.255.224` + - TCP port `4403` + - `ETH_STATIC_ONLY=1` + - `ETH_DEBUG_LOGGING=1` +- Production settings: + - DHCP first or DHCP with static fallback + - TCP port `4403` + - `ETH_DEBUG_LOGGING=0` + - `FORCE_CLIENT_REPEAT=0` + - `MAX_CONTACTS=128` unless RAM testing proves a higher value is safe + For developers: - Install [PlatformIO](https://docs.platformio.org) in [Visual Studio Code](https://code.visualstudio.com). - Clone and open the MeshCore repository in Visual Studio Code. +- The RAK13800 Ethernet Companion board-support targets use the canonical PlatformIO env names `RAK_RAK13800_companion_radio_eth` and `RAK_RAK13800_companion_radio_eth_static_diag`. +- These targets extend the RAK4631 MCU platform, but the supported hardware stack is `RAK 4631 / RAK13800 + W5100S`. - See the example applications you can modify and run: - [Companion Radio](./examples/companion_radio) - For use with an external chat app, over BLE, USB or Wi-Fi. - [KISS Modem](./examples/kiss_modem) - Serial KISS protocol bridge for host applications. ([protocol docs](./docs/kiss_modem_protocol.md)) diff --git a/VALIDATION.md b/VALIDATION.md new file mode 100644 index 0000000000..610079e9e4 --- /dev/null +++ b/VALIDATION.md @@ -0,0 +1,30 @@ +# Validation for RAK13800 Ethernet Companion Targets + +Validate the canonical targets: + +- `RAK_RAK13800_companion_radio_eth` +- `RAK_RAK13800_companion_radio_eth_static_diag` + +## What to Verify + +- The target name is the RAK13800 board-support name, not a generic RAK4631 label. +- The build still extends the RAK4631 PlatformIO environment. +- The static diagnostic target keeps: + - IP `10.245.94.47` + - Gateway `10.245.94.33` + - DNS `10.245.94.33` + - Subnet `255.255.255.224` + - TCP port `4403` + - `ETH_STATIC_ONLY=1` + - `ETH_DEBUG_LOGGING=1` +- The production target uses: + - DHCP first or DHCP with static fallback + - TCP port `4403` + - `ETH_DEBUG_LOGGING=0` + - `FORCE_CLIENT_REPEAT=0` + - `MAX_CONTACTS=128` unless RAM testing proves a higher value is safe + +## Compatibility Check + +- Keep `RAK_4631_companion_radio_eth_clean` as an alias to `RAK_RAK13800_companion_radio_eth` if older scripts still use it. +- Keep `RAK_4631_companion_radio_eth_static_diag` as an alias to `RAK_RAK13800_companion_radio_eth_static_diag` if older scripts still use it. diff --git a/build.sh b/build.sh index 41719a44ab..5402797149 100755 --- a/build.sh +++ b/build.sh @@ -14,15 +14,15 @@ Commands: build-firmware : Build the firmware for the given build target. build-firmwares: Build all firmwares for all targets. build-matching-firmwares : Build all firmwares for build targets containing the string given for . - build-companion-firmwares: Build all companion firmwares for all build targets. + build-companion-firmwares: Build all companion firmwares for all build targets, including RAK_RAK13800 board-support targets. build-repeater-firmwares: Build all repeater firmwares for all build targets. build-room-server-firmwares: Build all chat room server firmwares for all build targets. Examples: -Build firmware for the "RAK_4631_repeater" device target -$ sh build.sh build-firmware RAK_4631_repeater +Build firmware for the "RAK_RAK13800_companion_radio_eth" device target +$ sh build.sh build-firmware RAK_RAK13800_companion_radio_eth -Build all firmwares for device targets containing the string "RAK_4631" +Build all firmwares for device targets containing the string "RAK_RAK13800" $ sh build.sh build-matching-firmwares Build all companion firmwares @@ -42,11 +42,11 @@ Examples: Build without debug logging: $ export FIRMWARE_VERSION=v1.0.0 $ export DISABLE_DEBUG=1 -$ sh build.sh build-firmware RAK_4631_repeater +$ sh build.sh build-firmware RAK_RAK13800_companion_radio_eth Build with debug logging (default, uses flags from variant files): $ export FIRMWARE_VERSION=v1.0.0 -$ sh build.sh build-firmware RAK_4631_repeater +$ sh build.sh build-firmware RAK_RAK13800_companion_radio_eth_static_diag EOF } diff --git a/variants/rak4631/platformio.ini b/variants/rak4631/platformio.ini index 2bbba31463..b9076e1698 100644 --- a/variants/rak4631/platformio.ini +++ b/variants/rak4631/platformio.ini @@ -161,6 +161,63 @@ lib_deps = ${rak4631.lib_deps} densaugeo/base64 @ ~1.4.0 +[env:RAK_RAK13800_companion_radio_eth] +extends = rak4631 +board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld +board_upload.maximum_size = 712704 +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=128 + -D MAX_GROUP_CHANNELS=40 + -D ETH_DEBUG_LOGGING=0 + -D FORCE_CLIENT_REPEAT=0 + -D ADVERT_NAME='"RAK4631 RAK13800 Eth"' +; -D MESH_PACKET_LOGGING=1 +; -D MESH_DEBUG=1 +build_src_filter = ${rak4631.build_src_filter} + + + +<../examples/companion_radio/*.cpp> + +<../examples/companion_radio/ui-new/*.cpp> +lib_deps = + ${rak4631.lib_deps} + densaugeo/base64 @ ~1.4.0 + +[env:RAK_RAK13800_companion_radio_eth_static_diag] +extends = rak4631 +board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld +board_upload.maximum_size = 712704 +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=128 + -D MAX_GROUP_CHANNELS=40 + -D ETH_STATIC_ONLY=1 + -D ETH_DEBUG_LOGGING=1 + -D FORCE_CLIENT_REPEAT=0 + -D ADVERT_NAME='"RAK4631 RAK13800 Eth Diag"' +; -D MESH_PACKET_LOGGING=1 +; -D MESH_DEBUG=1 +build_src_filter = ${rak4631.build_src_filter} + + + +<../examples/companion_radio/*.cpp> + +<../examples/companion_radio/ui-new/*.cpp> +lib_deps = + ${rak4631.lib_deps} + densaugeo/base64 @ ~1.4.0 + +[env:RAK_4631_companion_radio_eth_clean] +extends = RAK_RAK13800_companion_radio_eth + +[env:RAK_4631_companion_radio_eth_static_diag] +extends = RAK_RAK13800_companion_radio_eth_static_diag + [env:RAK_4631_terminal_chat] extends = rak4631 build_flags = @@ -199,4 +256,4 @@ build_flags = build_src_filter = ${rak4631.build_src_filter} +<../examples/kiss_modem/> lib_deps = - ${rak4631.lib_deps} \ No newline at end of file + ${rak4631.lib_deps}