From 64cf1890f2808b2cb464cbe09a7a79c0e4beb9f3 Mon Sep 17 00:00:00 2001 From: geeksville Date: Mon, 22 Jun 2020 17:10:18 -0700 Subject: [PATCH 1/2] prebump to 0.7.9 build number, though not doing a release yet... Because I want to pick a min build number for 'BLE OTA update allowed' --- bin/version.sh | 2 +- docs/software/TODO.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/version.sh b/bin/version.sh index 7cc716c1..58db3c51 100644 --- a/bin/version.sh +++ b/bin/version.sh @@ -1,3 +1,3 @@ -export VERSION=0.7.8 \ No newline at end of file +export VERSION=0.7.9 \ No newline at end of file diff --git a/docs/software/TODO.md b/docs/software/TODO.md index 1e42fa30..7ff5c5b7 100644 --- a/docs/software/TODO.md +++ b/docs/software/TODO.md @@ -2,6 +2,7 @@ You probably don't care about this section - skip to the next one. +- check BLE handle stability across sleep - stress test sleep/wake - test BLE software update again - @feh123 Sony Xperia Z1 C6903 running Android 5.1.1 - first message sent is still doubled for some people From 4e958c92300e28923a2cd749a07fb17b86d62339 Mon Sep 17 00:00:00 2001 From: geeksville Date: Mon, 22 Jun 2020 17:10:41 -0700 Subject: [PATCH 2/2] make software update keep device from sleeping --- docs/software/TODO.md | 2 +- src/esp32/BluetoothSoftwareUpdate.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/software/TODO.md b/docs/software/TODO.md index 7ff5c5b7..2c29b000 100644 --- a/docs/software/TODO.md +++ b/docs/software/TODO.md @@ -2,7 +2,7 @@ You probably don't care about this section - skip to the next one. -- check BLE handle stability across sleep - stress test sleep/wake +- check BLE handle stability across sleep - stress test sleep/wake - btu_init_core calls gatt_init - which assigns handles global - test BLE software update again - @feh123 Sony Xperia Z1 C6903 running Android 5.1.1 - first message sent is still doubled for some people diff --git a/src/esp32/BluetoothSoftwareUpdate.cpp b/src/esp32/BluetoothSoftwareUpdate.cpp index f5f98a47..fd4c0615 100644 --- a/src/esp32/BluetoothSoftwareUpdate.cpp +++ b/src/esp32/BluetoothSoftwareUpdate.cpp @@ -76,6 +76,7 @@ class DataCharacteristic : public CallbackCharacteristic crc.update(data, len); Update.write(data, len); updateActualSize += len; + powerFSM.trigger(EVENT_RECEIVED_TEXT_MSG); // Not exactly correct, but we want to force the device to not sleep now } }; @@ -123,8 +124,10 @@ class CRC32Characteristic : public CallbackCharacteristic void bluetoothRebootCheck() { - if (rebootAtMsec && millis() > rebootAtMsec) + if (rebootAtMsec && millis() > rebootAtMsec) { + DEBUG_MSG("Rebooting for update\n"); ESP.restart(); + } } /*