Repository navigation
Conversation
Author
hp197
force-pushed
the
feature/rak4631-ethernet-mqtt
branch
from
October 10, 2026 22:47
bd0688c to
62f91bd
Compare
New build target RAK_4631_repeater_observer_mqtt_eth: MQTT bridge over wired Ethernet for the nRF52-based RAK4631 with a RAK13800 in the IO slot (same pin mapping as Meshtastic's rak4631_eth_gw). - MQTTBridgeEthernet: same MQTTBridge class/API as the ESP32 WiFi bridge, so MyMesh, CommonCLI and AlertReporter work unchanged. Network I/O runs in its own FreeRTOS task; the W5100S is never touched from the mesh loop. - BearTLSClient: BearSSL TLS 1.2 client on any Arduino Client, full 16 KB input record buffer, trust anchors decoded at runtime from the preset CA PEMs. - WSClient: RFC 6455 client (subprotocol "mqtt") exposed as an Arduino Client. - Stack per slot: PubSubClient -> WSClient -> BearTLSClient -> EthernetClient, supporting mqtt://, mqtts://, ws:// and wss:// incl. Ed25519 JWT presets (dutchmeshcore-1/2 by default). Max 2 active slots. - CLI: 'get eth.status' (wifi.status maps to it); alerts say "Ethernet". - Uses upstream's ETHERNET_ENABLED flag (not a fork-specific WITH_ETHERNET), so RAK4631Board.cpp gets upstream's early WB_IO2 power-on constructor (PoE boot). The constructor is byte-identical to upstream so a future merge stays clean. Also fixes the plain nRF52 builds, which no longer compiled on this branch: - JWTHelper / MQTTMessageBuilder only compile with WITH_MQTT_BRIDGE - JWTHelper base64url no longer depends on mbedTLS - 'memory' CLI command is platform specific - nrf52_base ignores the ESP-IDF-only PsychicMqttClient library Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
hp197
force-pushed
the
feature/rak4631-ethernet-mqtt
branch
from
October 11, 2026 12:10
62f91bd to
7eff0fd
Compare
This branch has not been deployed
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.
Deze PR voegt een MQTT observer build toe voor de RAK4631 die via bekabeld Ethernet verbindt met de RAK13800 (W5100S) module. Zo kun je een observer draaien zonder WiFi.
Het doelapparaat is de RAK WisMesh Ethernet MQTT Gateway (RAK4631 + RAK13800): https://docs.rakwireless.com/product-categories/meshtastic/wismesh-eth-mqtt-gw/quickstart/
De build target is
RAK_4631_repeater_observer_mqtt_eth. De node krijgt een adres via DHCP en verbindt standaard met dutchmeshcore-1 en dutchmeshcore-2. Getest op een echte node en het werkt.Wat er veranderd is
De ESP32 observer gebruikt WiFi en de TLS-libraries van de ESP32, en die bestaan niet op de nRF52. Daarom heeft de Ethernet-versie een eigen bridge-implementatie, maar met dezelfde class-naam en functies als de WiFi-versie. De rest van de firmware (repeater, CLI, alerts, berichtformaat) is gedeeld en ongewijzigd.
Nieuwe bestanden:
MQTTBridgeEthernet: de bridge zelf. Al het netwerkverkeer draait in een eigen taak, zodat de mesh blijft werken terwijl er verbinding wordt gemaakt.BearTLSClient: TLS 1.2 met BearSSL. Vertrouwt dezelfde rootcertificaten die al in de presets staan.WSClient: een kleine WebSocket-client, nodig voor dewss://collectors.De pinindeling is gelijk aan de werkende
rak4631_eth_gwconfiguratie van Meshtastic.CLI
get eth.statustoont link, IP, MAC en uptime.get wifi.statusgeeft op deze build hetzelfde.get mqtt.statusenget mqttN.diagwerken zoals voorheen.Reparaties voor de gewone RAK4631 builds
De normale RAK4631 repeater builds compileerden niet meer op deze branch. Opgelost door:
memorycommando ook op nRF52 te laten werkenBeperkingen
mqtts://ofwss://brokers moeten een certificaat van Let's Encrypt of Google Trust Services hebben. Alle huidige presets voldoen daaraan.Getest
RAK_4631_repeater,RAK_4631_repeater_observer_mqtt_ethenRAK_3112_repeater_observer_mqtt