I’m doing some test with a bluetooth module, all is perfect.
But I want to update ota, but without a wifi connection. My question is: if I’m connected via bluetooth, the esp can get http update (download a bin from my ftp server) using internet connection of the phone via bluetooth?
Use a variable store in eeprom, that if is changed by app, restart the esp with a wifi connection, download and install the new fw, and then restart in bt mode
void setup() {
EEPROM.begin(512);
readEpromValue();
updateProcess = EEPROM.read(500); // 500 is one slot unused in my sketch
if (updateProcess == 1) {
Serial.begin(115200);
Serial.println("Wifi mode");
EEPROM.write(500, 0); EEPROM.commit(); // for restart in BT mode in any case
WiFi.begin(ssid, pass); // i use a hotspot of my phone at need
while (WiFi.status() != WL_CONNECTED) { }
checkUpdate(); // void with upgrade from http
} else {
SerialBLE.begin(9600);
Blynk.config(SerialBLE, auth); // connect in BT mode
}
and the code for start the update process in wifi mode from app