Update MQTT implementation for T-Beam 1W observers and partition handling
Added support for `LilyGo_TBeam_1W_repeater_observer_mqtt` and `LilyGo_TBeam_1W_room_server_observer_mqtt` in the MQTT implementation documentation. Updated partition table references to `default_16MB.csv` for these observers, clarifying the requirements for flashing firmware and the implications for stored settings. Enhanced the platformio configuration for both observer types, including build flags and dependencies.
This commit is contained in:
1 parent
08847342c5
commit
fc99d6b388
3 files changed
+90
-1
No files matched your search
@@ -172,13 +172,15 @@ Some MQTT observer builds use a non-default partition table to accommodate the l
|
||||
| `LilyGo_TLora_V2_1_1_6_room_server_observer_mqtt` | `min_spiffs.csv` | 4 MB | 1.875 MB | same |
|
||||
| `Station_G2_repeater_observer_mqtt` | `default_16MB.csv` | 16 MB | 6.25 MB | 16 MB flash board |
|
||||
| `Station_G2_room_server_observer_mqtt` | `default_16MB.csv` | 16 MB | 6.25 MB | 16 MB flash board |
|
||||
| `LilyGo_TBeam_1W_repeater_observer_mqtt` | `default_16MB.csv` | 16 MB | 6.25 MB | Set in `boards/t_beam_1w.json`; required vs implicit `default.csv` |
|
||||
| `LilyGo_TBeam_1W_room_server_observer_mqtt` | `default_16MB.csv` | 16 MB | 6.25 MB | same |
|
||||
|
||||
**NVS / settings when the partition layout changes**
|
||||
|
||||
Flashing a **full merged image** (`*-merged.bin` at offset `0x0`) writes a new bootloader **and** partition table. If that layout **differs** from what is already on the device, **NVS is typically wiped or invalidated** — expect to lose stored configuration (admin preferences, WiFi, MQTT slots, name, etc.) and reconfigure from scratch.
|
||||
|
||||
- **`LilyGo_TLora_V2_1_1_6_*_observer_mqtt`:** These use the **same** `min_spiffs.csv` layout as other MeshCore TLora builds, so moving between repeater / room server / MQTT observer does **not** require a different partition table for normal upgrades. **If you previously installed an older TLora MQTT observer that used `huge_app.csv`,** flashing this firmware switches back to `min_spiffs` — treat that as a **partition layout change** (merged flash; NVS may be reset). **If you install MeshCore on a device that used a non-MeshCore partition map,** the first merged flash can still **wipe** settings.
|
||||
- **`Station_G2_*_observer_mqtt`:** These use `default_16MB.csv`. The same applies if you move **from** firmware that was built with a **different** partition table — the first merged flash that installs this layout can **wipe** stored settings.
|
||||
- **`Station_G2_*_observer_mqtt`** and **`LilyGo_TBeam_1W_*_observer_mqtt`**: These use `default_16MB.csv` to accomodate the larger size of the MQTT observer firmware. Installing MQTT observer firmware on these devices requires a **merged** flash the first time. The same applies if you move **from** firmware that was built with a **different** partition table—the first merged flash that installs this layout will **wipe** stored settings.
|
||||
|
||||
**How to flash the merged firmware:**
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"build": {
|
||||
"arduino": {
|
||||
"ldscript": "esp32s3_out.ld",
|
||||
"partitions": "default_16MB.csv",
|
||||
"memory_type": "qio_opi"
|
||||
},
|
||||
"core": "esp32",
|
||||
|
||||
@@ -193,6 +193,92 @@ lib_deps =
|
||||
${LilyGo_TBeam_1W.lib_deps}
|
||||
${esp32_ota.lib_deps}
|
||||
|
||||
; === LILYGO T-Beam 1W Repeater MQTT Observer ===
|
||||
[env:LilyGo_TBeam_1W_repeater_observer_mqtt]
|
||||
extends = LilyGo_TBeam_1W
|
||||
extra_scripts =
|
||||
${esp32_base.extra_scripts}
|
||||
pre:scripts/generate_cert_bundle.py
|
||||
board_ssl_cert_source = adafruit-full
|
||||
board_build.embed_files = src/certs/x509_crt_bundle.bin
|
||||
build_flags =
|
||||
${LilyGo_TBeam_1W.build_flags}
|
||||
-D ADVERT_NAME='"T-Beam 1W MQTT Observer"'
|
||||
-D ADVERT_LAT=0.0
|
||||
-D ADVERT_LON=0.0
|
||||
-D ADMIN_PASSWORD='"password"'
|
||||
-D MAX_NEIGHBOURS=50
|
||||
-D WITH_MQTT_BRIDGE=1
|
||||
-D MAX_MQTT_BROKERS=3
|
||||
-D MQTT_MAX_PACKET_SIZE=1024
|
||||
-D PERSISTANT_GPS=1
|
||||
-D ENV_SKIP_GPS_DETECT=1
|
||||
; -D MQTT_DEBUG=1
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
; -D MESH_DEBUG=1
|
||||
-D CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y
|
||||
-D ESP32_CPU_FREQ=160
|
||||
# -D WIFI_SSID='"ssid"'
|
||||
# -D WIFI_PWD='"password"'
|
||||
# -D MQTT_SERVER='"your-mqtt-broker.com"'
|
||||
# -D MQTT_PORT=1883
|
||||
# -D MQTT_USERNAME='"your-username"'
|
||||
# -D MQTT_PASSWORD='"your-password"'
|
||||
build_src_filter = ${LilyGo_TBeam_1W.build_src_filter}
|
||||
+<helpers/bridges/MQTTBridge.cpp>
|
||||
+<helpers/MQTTMessageBuilder.cpp>
|
||||
+<helpers/JWTHelper.cpp>
|
||||
+<helpers/ui/SH1106Display.cpp>
|
||||
+<../examples/simple_repeater>
|
||||
lib_deps =
|
||||
${LilyGo_TBeam_1W.lib_deps}
|
||||
${esp32_ota.lib_deps}
|
||||
elims/PsychicMqttClient@^0.2.4
|
||||
bblanchon/ArduinoJson
|
||||
arduino-libraries/NTPClient
|
||||
JChristensen/Timezone
|
||||
paulstoffregen/Time@1.6.1
|
||||
|
||||
; === LILYGO T-Beam 1W Room Server MQTT Observer ===
|
||||
[env:LilyGo_TBeam_1W_room_server_observer_mqtt]
|
||||
extends = LilyGo_TBeam_1W
|
||||
extra_scripts =
|
||||
${esp32_base.extra_scripts}
|
||||
pre:scripts/generate_cert_bundle.py
|
||||
board_ssl_cert_source = adafruit-full
|
||||
board_build.embed_files = src/certs/x509_crt_bundle.bin
|
||||
build_flags =
|
||||
${LilyGo_TBeam_1W.build_flags}
|
||||
-D ADVERT_NAME='"T-Beam 1W Room Observer"'
|
||||
-D ADVERT_LAT=0.0
|
||||
-D ADVERT_LON=0.0
|
||||
-D ADMIN_PASSWORD='"password"'
|
||||
-D ROOM_PASSWORD='"hello"'
|
||||
-D WITH_MQTT_BRIDGE=1
|
||||
-D MAX_MQTT_BROKERS=3
|
||||
-D MQTT_MAX_PACKET_SIZE=1024
|
||||
-D PERSISTANT_GPS=1
|
||||
-D ENV_SKIP_GPS_DETECT=1
|
||||
-D MQTT_DEBUG=1
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
; -D MESH_DEBUG=1
|
||||
-D CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y
|
||||
-D ESP32_CPU_FREQ=160
|
||||
build_src_filter = ${LilyGo_TBeam_1W.build_src_filter}
|
||||
+<helpers/bridges/MQTTBridge.cpp>
|
||||
+<helpers/MQTTMessageBuilder.cpp>
|
||||
+<helpers/JWTHelper.cpp>
|
||||
+<helpers/ui/SH1106Display.cpp>
|
||||
+<../examples/simple_room_server>
|
||||
lib_deps =
|
||||
${LilyGo_TBeam_1W.lib_deps}
|
||||
${esp32_ota.lib_deps}
|
||||
elims/PsychicMqttClient@^0.2.4
|
||||
bblanchon/ArduinoJson
|
||||
arduino-libraries/NTPClient
|
||||
JChristensen/Timezone
|
||||
paulstoffregen/Time@1.6.1
|
||||
|
||||
[env:LilyGo_TBeam_1W_kiss_modem]
|
||||
extends = LilyGo_TBeam_1W
|
||||
build_src_filter = ${LilyGo_TBeam_1W.build_src_filter}
|
||||
|
||||
Reference in new issue
Block a user