Yes, it is possible, but it takes some work on your part.
I recently had to implement OTA updates for the ESP32 over an RS-485 link, and it's actually pretty simple to manage. The hard part (for you) is the communication connection.
Performing an update (assuming the flash is already partitioned and set up right for OTA updates) is a case of "starting" the update, passing the update manager the flash data, then "ending" the update:
Update.begin(size) - This starts the upgrade process. You need to provide the expected size of the flash data at this point.
Update.write(*data, length) - Pass a block of flash data to the updater for writing. An alternative is to read directly from a
Stream class, which will try and read the number of bytes specified in the
size parameter to
Update.end() - This will finish it all off and switch the bootloader to load from the new flash. If it worked fine it will return
true, otherwise, it will return
Assuming the above worked, you can no reset the board with
For added security you can also pass an MD5 hash of the data to
Update.setMD5(md5) and the updater will check that the uploaded data matches that MD5 hash.
Of course, all this needs implementing in your program that is running on the target device before you try and do any OTA updates. And, of course, you need to arrange the actual upgrade channel to get the commands and data through to the target in the first place.
- Implement a method of getting the data to the target
- Implement the updater code
- Go to the device and upgrade the firmware
- From that point on you should be able to use OTA updates through your own chosen mechanism.