From 738238ee9196aec33a8b6f82b53fdc08abcd8cbe Mon Sep 17 00:00:00 2001
From: DTTerastar
Date: Wed, 16 Feb 2022 09:25:54 -0500
Subject: [PATCH] Use released NimBLE-Arduino
---
espotabatch.py | 25 +++++++++++++++++++++++++
platformio.ini | 2 +-
2 files changed, 26 insertions(+), 1 deletion(-)
create mode 100755 espotabatch.py
diff --git a/espotabatch.py b/espotabatch.py
new file mode 100755
index 0000000..4253d5b
--- /dev/null
+++ b/espotabatch.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+import subprocess
+import time
+
+#this list contains array of esp32 clients,
+# and each client contains mDNS name and the path to .bin file
+#I only have 1 ESP so I duplicate mDNS entry for testing
+esps = [
+ #mDNS name of ESP #path to ".bin" file
+ ['192.168.128.85', 'm5atom-matrix'],
+ ['192.168.128.172', 'm5atom-matrix'],
+ ['192.168.128.159', 'm5atom-matrix'],
+ ['192.168.128.64', 'm5atom-matrix'],
+ ['192.168.128.113', 'macchina-a0'],
+]
+esp_respond_sender_port = '3232'
+sender_to_esp_port = '3232'
+
+cmd = 'pio run -e m5atom-matrix -e macchina-a0'
+p = subprocess.call(cmd, shell=True)
+
+for esp in esps:
+ cmd = 'python3 ~/.platformio/packages/framework-arduinoespressif32/tools/espota.py -i '+esp[0]+' -p '+sender_to_esp_port+' -P '+esp_respond_sender_port+' -f .pio/build/'+esp[1]+'/firmware.bin'
+ print (cmd)
+ p = subprocess.call(cmd, shell=True)
diff --git a/platformio.ini b/platformio.ini
index 2db1b25..ebcc110 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -19,7 +19,7 @@ lib_deps_external =
marvinroger/AsyncMqttClient@^0.9.0
bblanchon/ArduinoJson@^6.17.3
https://github.com/ESPresense/ESP-WiFiSettings.git
- https://github.com/h2zero/NimBLE-Arduino#6dbb656
+ h2zero/NimBLE-Arduino@^1.3.7
bbx10/DNSServer@^1.1.0
build_flags =
-D CONFIG_BT_NIMBLE_ROLE_BROADCASTER_DISABLED