OTA update without internet/WiFi network
Posted: Wed Jan 30, 2019 1:43 pm
Had a question about doing ESP32 OTA firmware updates without internet access and without an existing WiFi network.
What I would like to do is have the ESP32 setup as a WiFi access point, and then you can connect to it with a laptop or phone and choose/upload a firmware .bin directly from the laptop or phone.
Im using ESP-IDF.
So the ESP32 configured as an access point will have to setup an http server to host a simple web interface with file-upload. Then you can connect directly to the ESP32 WiFi access point, point your browser to 192.168.1.1 (or whatever the ESP32's IP is), and be greeted with a simple html page that has "choose file" and "upload" buttons. Choose the firmware bin file, and click upload.
This way, ESP32's can be updated in the field where there is no existing WiFi network, and no internet access.
I recently moved to ESP-IDF, I originally wrote my large project using Arduino but I have ported it to ESP-IDF...so I would consider myself a beginner at ESP-IDF and 'real' C/cpp.
All of the OTA examples in ESP-IDF seem to be geared towards connecting to an existing WiFi network with internet access.
Im a bit confused at the difference between the "simple_ota_example" and "native_ota_example" in ESP-IDF. The main difference looks like the "simple_ota_example" incorporates security using https??
Eventually Ill just be encrypting/signing the binary files themselves so a secure WiFi connection is not that important. I would just like to get the basics working now, and I can work on the security aspects later.
In simple terms...I need to do a combination of WiFi-soft-access-point code, and http server code with file-upload capability that will accept a firmware bin. Im looking through the file server examples, but they all seem intimidating/overly complex for what Im trying to do...
Any ideas?
thanks
What I would like to do is have the ESP32 setup as a WiFi access point, and then you can connect to it with a laptop or phone and choose/upload a firmware .bin directly from the laptop or phone.
Im using ESP-IDF.
So the ESP32 configured as an access point will have to setup an http server to host a simple web interface with file-upload. Then you can connect directly to the ESP32 WiFi access point, point your browser to 192.168.1.1 (or whatever the ESP32's IP is), and be greeted with a simple html page that has "choose file" and "upload" buttons. Choose the firmware bin file, and click upload.
This way, ESP32's can be updated in the field where there is no existing WiFi network, and no internet access.
I recently moved to ESP-IDF, I originally wrote my large project using Arduino but I have ported it to ESP-IDF...so I would consider myself a beginner at ESP-IDF and 'real' C/cpp.
All of the OTA examples in ESP-IDF seem to be geared towards connecting to an existing WiFi network with internet access.
Im a bit confused at the difference between the "simple_ota_example" and "native_ota_example" in ESP-IDF. The main difference looks like the "simple_ota_example" incorporates security using https??
Eventually Ill just be encrypting/signing the binary files themselves so a secure WiFi connection is not that important. I would just like to get the basics working now, and I can work on the security aspects later.
In simple terms...I need to do a combination of WiFi-soft-access-point code, and http server code with file-upload capability that will accept a firmware bin. Im looking through the file server examples, but they all seem intimidating/overly complex for what Im trying to do...
Any ideas?
thanks