-
-
Notifications
You must be signed in to change notification settings - Fork 218
Description
I use PlatformIO to develop hobby projects with the espressive8266 platform / huzzah board. There are situations where the ArduinoOTA upload method is unusable*, so i'd like PlatformIO to support http as a hex upload port.
Currently I have a shell script which contains:
platformio run
curl -v -F "[email protected]/huzzah/firmware.bin" http://doorbell-11a251.local/update
echo
and I use this to do uploads, instead of the cmd+u shortcut in these projects. The extra_script method was too confusing to add support with the weird way the form argument is specified to curl.
I think this would be generally useful for other platforms. I could imagine it being really useful for people modifying firmwares on network routers and things like that, which usually use a http form for firmware upgrades. It could also be useful for upgrading devices on different subnets or even over cellular link. I propose the following:
the standard uploader should be modified so when upload_port begins with http:// or https://, it invokes curl in verbose mode and does a http post as above. A platformio.ini
config file working in this mode would look like:
[env:huzzah]
platform=espressif8266
framework=arduino
board=huzzah
upload_port=http://192.168.1.20/update
* ArduinoOTA can become unusable if you're using UDP for other stuff. The Arduino UDP library isn't great at supporting multiple concurrent services on different ports.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/41040733-support-http-upload-in-a-simple-way?utm_campaign=plugin&utm_content=tracker%2F38211776&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F38211776&utm_medium=issues&utm_source=github).