From 5ffd9dba4d9427b4a0072b8bf24604c67facceb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Ma=C5=82ecki?= Date: Sun, 7 Jun 2026 21:07:52 +0200 Subject: [PATCH 1/2] Split companion radio Internet OTA into separate opt-in _cloud_ota envs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 9 base companion_radio envs (heltec_v4/Heltec_v3/Xiao_S3_WIO × usb/ble/wifi) had Internet OTA support baked in directly, which created permanent drift from upstream MeshCore. Move the OTA-related build flags (esp32_internet_ota.build_flags, poli_build.build_flags, OTA_BASE_URL, OTA_VARIANT) into new derived *_cloud_ota envs that extend the base envs, restoring the base envs to be byte-identical to their upstream originals. This mirrors the existing heltec_v4_repeater / heltec_v4_repeater_cloud_ota convention. build_firmware.sh now builds the *_cloud_ota variants. --- build_firmware.sh | 18 ++++++------ poli_version.txt | 2 +- variants/heltec_v3/platformio.ini | 44 +++++++++++++++++++++-------- variants/heltec_v4/platformio.ini | 44 +++++++++++++++++++++-------- variants/xiao_s3_wio/platformio.ini | 44 +++++++++++++++++++++-------- 5 files changed, 106 insertions(+), 46 deletions(-) diff --git a/build_firmware.sh b/build_firmware.sh index a31ab33de2..daeeca905d 100755 --- a/build_firmware.sh +++ b/build_firmware.sh @@ -75,15 +75,15 @@ declare -a BUILD_DEFS=( "repeater|heltec_v4||heltec_v4_repeater_cloud_ota" "repeater|heltec_v3||Heltec_v3_repeater_cloud_ota" "repeater|xiao_s3_wio||Xiao_S3_WIO_repeater_cloud_ota" - "companion|heltec_v4|usb|heltec_v4_companion_radio_usb" - "companion|heltec_v4|ble|heltec_v4_companion_radio_ble" - "companion|heltec_v4|wifi|heltec_v4_companion_radio_wifi" - "companion|heltec_v3|usb|Heltec_v3_companion_radio_usb" - "companion|heltec_v3|ble|Heltec_v3_companion_radio_ble" - "companion|heltec_v3|wifi|Heltec_v3_companion_radio_wifi" - "companion|xiao_s3_wio|usb|Xiao_S3_WIO_companion_radio_usb" - "companion|xiao_s3_wio|ble|Xiao_S3_WIO_companion_radio_ble" - "companion|xiao_s3_wio|wifi|Xiao_S3_WIO_companion_radio_wifi" + "companion|heltec_v4|usb|heltec_v4_companion_radio_usb_cloud_ota" + "companion|heltec_v4|ble|heltec_v4_companion_radio_ble_cloud_ota" + "companion|heltec_v4|wifi|heltec_v4_companion_radio_wifi_cloud_ota" + "companion|heltec_v3|usb|Heltec_v3_companion_radio_usb_cloud_ota" + "companion|heltec_v3|ble|Heltec_v3_companion_radio_ble_cloud_ota" + "companion|heltec_v3|wifi|Heltec_v3_companion_radio_wifi_cloud_ota" + "companion|xiao_s3_wio|usb|Xiao_S3_WIO_companion_radio_usb_cloud_ota" + "companion|xiao_s3_wio|ble|Xiao_S3_WIO_companion_radio_ble_cloud_ota" + "companion|xiao_s3_wio|wifi|Xiao_S3_WIO_companion_radio_wifi_cloud_ota" ) # ─── Argument parsing ───────────────────────────────────────────────────────── diff --git a/poli_version.txt b/poli_version.txt index 46a918f38a..7960a3cf51 100644 --- a/poli_version.txt +++ b/poli_version.txt @@ -1 +1 @@ -v1.16.0.2 +v1.16.0.3 diff --git a/variants/heltec_v3/platformio.ini b/variants/heltec_v3/platformio.ini index 1f4e48a608..cbb1a7f5b0 100644 --- a/variants/heltec_v3/platformio.ini +++ b/variants/heltec_v3/platformio.ini @@ -168,14 +168,10 @@ lib_deps = extends = Heltec_lora32_v3 build_flags = ${Heltec_lora32_v3.build_flags} - ${esp32_internet_ota.build_flags} - ${poli_build.build_flags} -I examples/companion_radio/ui-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=SSD1306Display - -D OTA_BASE_URL='"https://meshcore.epila.pl/firmware/companion"' - -D OTA_VARIANT='"usb"' ; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1 ; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1 build_src_filter = ${Heltec_lora32_v3.build_src_filter} @@ -187,18 +183,24 @@ lib_deps = ${Heltec_lora32_v3.lib_deps} densaugeo/base64 @ ~1.4.0 +; Companion (USB) with internet OTA support — opt-in variant, see esp32_internet_ota. +[env:Heltec_v3_companion_radio_usb_cloud_ota] +extends = env:Heltec_v3_companion_radio_usb +build_flags = + ${env:Heltec_v3_companion_radio_usb.build_flags} + ${esp32_internet_ota.build_flags} + ${poli_build.build_flags} + -D OTA_BASE_URL='"https://meshcore.epila.pl/firmware/companion"' + -D OTA_VARIANT='"usb"' + [env:Heltec_v3_companion_radio_ble] extends = Heltec_lora32_v3 build_flags = ${Heltec_lora32_v3.build_flags} - ${esp32_internet_ota.build_flags} - ${poli_build.build_flags} -I examples/companion_radio/ui-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=SSD1306Display - -D OTA_BASE_URL='"https://meshcore.epila.pl/firmware/companion"' - -D OTA_VARIANT='"ble"' -D BLE_PIN_CODE=123456 ; dynamic, random PIN -D AUTO_SHUTDOWN_MILLIVOLTS=3400 -D BLE_DEBUG_LOGGING=1 @@ -215,12 +217,20 @@ lib_deps = ${Heltec_lora32_v3.lib_deps} densaugeo/base64 @ ~1.4.0 +; Companion (BLE) with internet OTA support — opt-in variant, see esp32_internet_ota. +[env:Heltec_v3_companion_radio_ble_cloud_ota] +extends = env:Heltec_v3_companion_radio_ble +build_flags = + ${env:Heltec_v3_companion_radio_ble.build_flags} + ${esp32_internet_ota.build_flags} + ${poli_build.build_flags} + -D OTA_BASE_URL='"https://meshcore.epila.pl/firmware/companion"' + -D OTA_VARIANT='"ble"' + [env:Heltec_v3_companion_radio_wifi] extends = Heltec_lora32_v3 build_flags = ${Heltec_lora32_v3.build_flags} - ${esp32_internet_ota.build_flags} - ${poli_build.build_flags} -I examples/companion_radio/ui-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -228,8 +238,6 @@ build_flags = -D WIFI_DEBUG_LOGGING=1 -D WIFI_SSID='"myssid"' -D WIFI_PWD='"mypwd"' - -D OTA_BASE_URL='"https://meshcore.epila.pl/firmware/companion"' - -D OTA_VARIANT='"wifi"' -D OFFLINE_QUEUE_SIZE=256 -D MESH_PACKET_LOGGING=1 -D MESH_DEBUG=1 @@ -243,6 +251,18 @@ lib_deps = ${Heltec_lora32_v3.lib_deps} densaugeo/base64 @ ~1.4.0 +; Companion (WiFi) with internet OTA support — opt-in variant. Reuses the +; existing WIFI_SSID/WIFI_PWD link for the OTA check (see companion_radio/main.cpp) +; instead of a second WiFiConnect, which would disconnect the always-on app TCP bridge. +[env:Heltec_v3_companion_radio_wifi_cloud_ota] +extends = env:Heltec_v3_companion_radio_wifi +build_flags = + ${env:Heltec_v3_companion_radio_wifi.build_flags} + ${esp32_internet_ota.build_flags} + ${poli_build.build_flags} + -D OTA_BASE_URL='"https://meshcore.epila.pl/firmware/companion"' + -D OTA_VARIANT='"wifi"' + [env:Heltec_v3_sensor] extends = Heltec_lora32_v3 build_flags = diff --git a/variants/heltec_v4/platformio.ini b/variants/heltec_v4/platformio.ini index c9b3350633..0b3263149b 100644 --- a/variants/heltec_v4/platformio.ini +++ b/variants/heltec_v4/platformio.ini @@ -211,14 +211,10 @@ lib_deps = extends = heltec_v4_oled build_flags = ${heltec_v4_oled.build_flags} - ${esp32_internet_ota.build_flags} - ${poli_build.build_flags} -I examples/companion_radio/ui-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=SSD1306Display - -D OTA_BASE_URL='"https://meshcore.epila.pl/firmware/companion"' - -D OTA_VARIANT='"usb"' ; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1 ; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1 build_src_filter = ${heltec_v4_oled.build_src_filter} @@ -230,18 +226,24 @@ lib_deps = ${heltec_v4_oled.lib_deps} densaugeo/base64 @ ~1.4.0 +; Companion (USB) with internet OTA support — opt-in variant, see esp32_internet_ota. +[env:heltec_v4_companion_radio_usb_cloud_ota] +extends = env:heltec_v4_companion_radio_usb +build_flags = + ${env:heltec_v4_companion_radio_usb.build_flags} + ${esp32_internet_ota.build_flags} + ${poli_build.build_flags} + -D OTA_BASE_URL='"https://meshcore.epila.pl/firmware/companion"' + -D OTA_VARIANT='"usb"' + [env:heltec_v4_companion_radio_ble] extends = heltec_v4_oled build_flags = ${heltec_v4_oled.build_flags} - ${esp32_internet_ota.build_flags} - ${poli_build.build_flags} -I examples/companion_radio/ui-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=SSD1306Display - -D OTA_BASE_URL='"https://meshcore.epila.pl/firmware/companion"' - -D OTA_VARIANT='"ble"' -D BLE_PIN_CODE=123456 ; dynamic, random PIN -D AUTO_SHUTDOWN_MILLIVOLTS=3400 -D BLE_DEBUG_LOGGING=1 @@ -258,12 +260,20 @@ lib_deps = ${heltec_v4_oled.lib_deps} densaugeo/base64 @ ~1.4.0 +; Companion (BLE) with internet OTA support — opt-in variant, see esp32_internet_ota. +[env:heltec_v4_companion_radio_ble_cloud_ota] +extends = env:heltec_v4_companion_radio_ble +build_flags = + ${env:heltec_v4_companion_radio_ble.build_flags} + ${esp32_internet_ota.build_flags} + ${poli_build.build_flags} + -D OTA_BASE_URL='"https://meshcore.epila.pl/firmware/companion"' + -D OTA_VARIANT='"ble"' + [env:heltec_v4_companion_radio_wifi] extends = heltec_v4_oled build_flags = ${heltec_v4_oled.build_flags} - ${esp32_internet_ota.build_flags} - ${poli_build.build_flags} -I examples/companion_radio/ui-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -272,8 +282,6 @@ build_flags = -D WIFI_DEBUG_LOGGING=1 -D WIFI_SSID='"myssid"' -D WIFI_PWD='"mypwd"' - -D OTA_BASE_URL='"https://meshcore.epila.pl/firmware/companion"' - -D OTA_VARIANT='"wifi"' -D MESH_PACKET_LOGGING=1 -D MESH_DEBUG=1 build_src_filter = ${heltec_v4_oled.build_src_filter} @@ -286,6 +294,18 @@ lib_deps = ${heltec_v4_oled.lib_deps} densaugeo/base64 @ ~1.4.0 +; Companion (WiFi) with internet OTA support — opt-in variant. Reuses the +; existing WIFI_SSID/WIFI_PWD link for the OTA check (see companion_radio/main.cpp) +; instead of a second WiFiConnect, which would disconnect the always-on app TCP bridge. +[env:heltec_v4_companion_radio_wifi_cloud_ota] +extends = env:heltec_v4_companion_radio_wifi +build_flags = + ${env:heltec_v4_companion_radio_wifi.build_flags} + ${esp32_internet_ota.build_flags} + ${poli_build.build_flags} + -D OTA_BASE_URL='"https://meshcore.epila.pl/firmware/companion"' + -D OTA_VARIANT='"wifi"' + [env:heltec_v4_sensor] extends = heltec_v4_oled build_flags = diff --git a/variants/xiao_s3_wio/platformio.ini b/variants/xiao_s3_wio/platformio.ini index 895b4ae744..0b6e09a610 100644 --- a/variants/xiao_s3_wio/platformio.ini +++ b/variants/xiao_s3_wio/platformio.ini @@ -156,15 +156,11 @@ lib_deps = extends = Xiao_S3_WIO build_flags = ${Xiao_S3_WIO.build_flags} - ${esp32_internet_ota.build_flags} - ${poli_build.build_flags} -I examples/companion_radio/ui-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=SSD1306Display -D OFFLINE_QUEUE_SIZE=256 - -D OTA_BASE_URL='"https://meshcore.epila.pl/firmware/companion"' - -D OTA_VARIANT='"usb"' ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 build_src_filter = ${Xiao_S3_WIO.build_src_filter} @@ -178,20 +174,26 @@ lib_deps = densaugeo/base64 @ ~1.4.0 adafruit/Adafruit SSD1306 @ ^2.5.13 +; Companion (USB) with internet OTA support — opt-in variant, see esp32_internet_ota. +[env:Xiao_S3_WIO_companion_radio_usb_cloud_ota] +extends = env:Xiao_S3_WIO_companion_radio_usb +build_flags = + ${env:Xiao_S3_WIO_companion_radio_usb.build_flags} + ${esp32_internet_ota.build_flags} + ${poli_build.build_flags} + -D OTA_BASE_URL='"https://meshcore.epila.pl/firmware/companion"' + -D OTA_VARIANT='"usb"' + [env:Xiao_S3_WIO_companion_radio_ble] extends = Xiao_S3_WIO build_flags = ${Xiao_S3_WIO.build_flags} - ${esp32_internet_ota.build_flags} - ${poli_build.build_flags} -I examples/companion_radio/ui-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D BLE_PIN_CODE=123456 -D DISPLAY_CLASS=SSD1306Display -D OFFLINE_QUEUE_SIZE=256 - -D OTA_BASE_URL='"https://meshcore.epila.pl/firmware/companion"' - -D OTA_VARIANT='"ble"' ; -D BLE_DEBUG_LOGGING=1 ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 @@ -206,6 +208,16 @@ lib_deps = densaugeo/base64 @ ~1.4.0 adafruit/Adafruit SSD1306 @ ^2.5.13 +; Companion (BLE) with internet OTA support — opt-in variant, see esp32_internet_ota. +[env:Xiao_S3_WIO_companion_radio_ble_cloud_ota] +extends = env:Xiao_S3_WIO_companion_radio_ble +build_flags = + ${env:Xiao_S3_WIO_companion_radio_ble.build_flags} + ${esp32_internet_ota.build_flags} + ${poli_build.build_flags} + -D OTA_BASE_URL='"https://meshcore.epila.pl/firmware/companion"' + -D OTA_VARIANT='"ble"' + [env:Xiao_S3_WIO_companion_radio_serial] extends = Xiao_S3_WIO build_flags = @@ -238,8 +250,6 @@ build_src_filter = ${Xiao_S3_WIO.build_src_filter} +<../examples/companion_radio/*.cpp> build_flags = ${Xiao_S3_WIO.build_flags} - ${esp32_internet_ota.build_flags} - ${poli_build.build_flags} -I examples/companion_radio/ui-new -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 @@ -247,8 +257,6 @@ build_flags = -D WIFI_DEBUG_LOGGING=1 -D WIFI_SSID='"myssid"' -D WIFI_PWD='"password"' - -D OTA_BASE_URL='"https://meshcore.epila.pl/firmware/companion"' - -D OTA_VARIANT='"wifi"' ; -D BLE_DEBUG_LOGGING=1 ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 @@ -256,6 +264,18 @@ lib_deps = ${Xiao_S3_WIO.lib_deps} densaugeo/base64 @ ~1.4.0 +; Companion (WiFi) with internet OTA support — opt-in variant. Reuses the +; existing WIFI_SSID/WIFI_PWD link for the OTA check (see companion_radio/main.cpp) +; instead of a second WiFiConnect, which would disconnect the always-on app TCP bridge. +[env:Xiao_S3_WIO_companion_radio_wifi_cloud_ota] +extends = env:Xiao_S3_WIO_companion_radio_wifi +build_flags = + ${env:Xiao_S3_WIO_companion_radio_wifi.build_flags} + ${esp32_internet_ota.build_flags} + ${poli_build.build_flags} + -D OTA_BASE_URL='"https://meshcore.epila.pl/firmware/companion"' + -D OTA_VARIANT='"wifi"' + [env:Xiao_S3_WIO_sensor] extends = Xiao_S3_WIO build_src_filter = ${Xiao_S3_WIO.build_src_filter} From 31d8a1393814545b4eab535e4fc7e93d6a3bfdcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Ma=C5=82ecki?= Date: Sun, 7 Jun 2026 21:29:05 +0200 Subject: [PATCH 2/2] Bump version to v1.16.0.4 Co-Authored-By: Claude Sonnet 4.6 --- poli_version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poli_version.txt b/poli_version.txt index 7960a3cf51..2c2630008b 100644 --- a/poli_version.txt +++ b/poli_version.txt @@ -1 +1 @@ -v1.16.0.3 +v1.16.0.4