mirror of
https://github.com/mikecarper/MeshCore.git
synced 2026-10-24 03:22:23 +00:00
feat(thinknode-m7): make the MQTT observer envs Ethernet-preferred
Fold the CH390 overlay and NETWORK_PREFER_ETHERNET into
ThinkNode_M7_{repeater,room_server}_observer_mqtt and drop the separate
*_observer_mqtt_ethernet twins. The env names (and so the OTA manifests)
are unchanged, so existing M7 observers OTA into the Ethernet-preferred
image; without a cable they select stored Wi-Fi after a brief boot probe.
This commit is contained in:
1 parent
a129420804
commit
854d4e2ec3
2 files changed
+17
-31
No files matched your search
@@ -225,11 +225,14 @@ pio run -e ThinkNode_M7_repeater_observer_mqtt
|
||||
pio run -e ThinkNode_M7_room_server_observer_mqtt
|
||||
```
|
||||
|
||||
**ThinkNode M7 — WiFi only:** the M7 has an onboard CH390 Ethernet controller, and
|
||||
`ThinkNode_M7_companion_radio_ethernet` uses it, but the MQTT bridge's link
|
||||
management is bound to the WiFi station API, so the observer envs uplink over WiFi.
|
||||
See `UPSTREAM_BUGS.md` for the Ethernet gap. The board has PSRAM, so these builds
|
||||
get neighbors publication (`WITH_MQTT_NEIGHBORS`) automatically.
|
||||
**ThinkNode M7 — Ethernet preferred, WiFi fallback:** the observer envs use the onboard
|
||||
CH390 Ethernet when it has a DHCP lease at boot, otherwise the stored WiFi network, and
|
||||
switch between the two at runtime (`get link.status`, `get link.diag`). Nodes without a
|
||||
cable behave like WiFi observers after a brief (about 1 s) Ethernet probe at boot. The DHCP hostname is
|
||||
`meshcore-<node name>` on either medium. A first boot on Ethernet with no WiFi configured
|
||||
opens WebConfig on the LAN with a one-time login code printed on serial (and shown on
|
||||
the display), and requires replacing the admin password. The board has PSRAM, so these
|
||||
builds get neighbors publication (`WITH_MQTT_NEIGHBORS`) automatically.
|
||||
|
||||
**TLora naming:** The env prefix `LilyGo_TLora_V2_1_1_6` is LilyGo’s **T-LoRa V2.1–1.6** board (SX1276); PlatformIO selects **`ttgo-lora32-v1`** (TTGO LoRa32 V1.0). **MQTT observer** envs extend a slim base **without** `sensor_base` so the image fits `min_spiffs`; **all other** `LilyGo_TLora_V2_1_1_6_*` targets still use optional I2C environmental sensors as before. The **`lilygo_tlora_c6`** variant is separate hardware (ESP32-C6).
|
||||
|
||||
|
||||
@@ -191,10 +191,9 @@ extends = ThinkNode_M7
|
||||
build_src_filter = ${ThinkNode_M7.build_src_filter}
|
||||
+<../examples/kiss_modem/>
|
||||
|
||||
; Wi-Fi remains the default observer transport. Ethernet twins below select the
|
||||
; onboard CH390 through the Ethernet-preferred network manager without enabling the legacy CLI
|
||||
; transport. The board has PSRAM, so MAX_NEIGHBOURS enables
|
||||
; WITH_MQTT_NEIGHBORS (see MQTTBridge.h).
|
||||
; MQTT observers prefer the onboard CH390 Ethernet and fall back to Wi-Fi, without
|
||||
; enabling the legacy Ethernet CLI transport (no ETHERNET_ENABLED). The board has
|
||||
; PSRAM, so MAX_NEIGHBOURS enables WITH_MQTT_NEIGHBORS (see MQTTBridge.h).
|
||||
[env:ThinkNode_M7_repeater_observer_mqtt]
|
||||
extends = ThinkNode_M7
|
||||
extra_scripts =
|
||||
@@ -204,6 +203,8 @@ board_ssl_cert_source = adafruit-full
|
||||
board_build.embed_files = src/certs/x509_crt_bundle.bin
|
||||
build_flags =
|
||||
${ThinkNode_M7.build_flags}
|
||||
${ThinkNode_M7_ch390.build_flags}
|
||||
-D NETWORK_PREFER_ETHERNET=1
|
||||
-D ADVERT_NAME='"MQTT Observer"'
|
||||
-D ADVERT_LAT=0.0
|
||||
-D ADVERT_LON=0.0
|
||||
@@ -231,6 +232,7 @@ build_src_filter = ${ThinkNode_M7.build_src_filter}
|
||||
+<../examples/simple_repeater>
|
||||
lib_deps =
|
||||
${ThinkNode_M7.lib_deps}
|
||||
${ThinkNode_M7_ch390.lib_deps}
|
||||
${esp32_ota.lib_deps}
|
||||
elims/PsychicMqttClient@^0.2.4
|
||||
bblanchon/ArduinoJson @ 7.4.3
|
||||
@@ -239,17 +241,6 @@ lib_deps =
|
||||
paulstoffregen/Time@1.6.1
|
||||
0neblock/SNMP_Agent
|
||||
|
||||
[env:ThinkNode_M7_repeater_observer_mqtt_ethernet]
|
||||
extends = env:ThinkNode_M7_repeater_observer_mqtt
|
||||
build_flags =
|
||||
${env:ThinkNode_M7_repeater_observer_mqtt.build_flags}
|
||||
${ThinkNode_M7_ch390.build_flags}
|
||||
-D NETWORK_PREFER_ETHERNET=1
|
||||
build_src_filter = ${env:ThinkNode_M7_repeater_observer_mqtt.build_src_filter}
|
||||
lib_deps =
|
||||
${env:ThinkNode_M7_repeater_observer_mqtt.lib_deps}
|
||||
${ThinkNode_M7_ch390.lib_deps}
|
||||
|
||||
[env:ThinkNode_M7_room_server_observer_mqtt]
|
||||
extends = ThinkNode_M7
|
||||
extra_scripts =
|
||||
@@ -259,6 +250,8 @@ board_ssl_cert_source = adafruit-full
|
||||
board_build.embed_files = src/certs/x509_crt_bundle.bin
|
||||
build_flags =
|
||||
${ThinkNode_M7.build_flags}
|
||||
${ThinkNode_M7_ch390.build_flags}
|
||||
-D NETWORK_PREFER_ETHERNET=1
|
||||
-D ADVERT_NAME='"ThinkNode M7 Room Observer"'
|
||||
-D ADVERT_LAT=0.0
|
||||
-D ADVERT_LON=0.0
|
||||
@@ -287,6 +280,7 @@ build_src_filter = ${ThinkNode_M7.build_src_filter}
|
||||
+<../examples/simple_room_server>
|
||||
lib_deps =
|
||||
${ThinkNode_M7.lib_deps}
|
||||
${ThinkNode_M7_ch390.lib_deps}
|
||||
${esp32_ota.lib_deps}
|
||||
elims/PsychicMqttClient@^0.2.4
|
||||
bblanchon/ArduinoJson @ 7.4.3
|
||||
@@ -294,14 +288,3 @@ lib_deps =
|
||||
JChristensen/Timezone
|
||||
paulstoffregen/Time@1.6.1
|
||||
0neblock/SNMP_Agent
|
||||
|
||||
[env:ThinkNode_M7_room_server_observer_mqtt_ethernet]
|
||||
extends = env:ThinkNode_M7_room_server_observer_mqtt
|
||||
build_flags =
|
||||
${env:ThinkNode_M7_room_server_observer_mqtt.build_flags}
|
||||
${ThinkNode_M7_ch390.build_flags}
|
||||
-D NETWORK_PREFER_ETHERNET=1
|
||||
build_src_filter = ${env:ThinkNode_M7_room_server_observer_mqtt.build_src_filter}
|
||||
lib_deps =
|
||||
${env:ThinkNode_M7_room_server_observer_mqtt.lib_deps}
|
||||
${ThinkNode_M7_ch390.lib_deps}
|
||||
Reference in new issue
Block a user