These are chat archives for esp8266/Arduino

6th
Aug 2018
hillct
@hillct
Aug 06 2018 19:11
Good afternoon all. I’m looking at the various Node.js implementations of Arduino OTA, and finding most lacking but I wonder if someone could provide some clarification as to the state of the OTA libraries on the arduino side of that process. My understanding is the OTA library is now well established and is part of the core libraries. As such, I’m confused as to why things like this https://bitbucket.org/maleficarum/esp8266-firmware-update/src/master/library/ESP8266Autoupdate.cpp exist. Can someone provide some clarification for me?
I guess it’s just someone’s wrapper around the core library. If I’ve missed something, please let me know
Develo
@devyte
Aug 06 2018 19:26
There are several incarnations of OTA or different use cases. It depends of what you need: update from the IDE, update via http client, update via httpserver, etc. I think I even saw an ftp wrapper somewhere. I think you need to start with readthedocs, do some additional research on top, and look at the examples.
hillct
@hillct
Aug 06 2018 19:33
yes, already done. Presumably I need to be using the ESPhttpUpdate. My question was more about whether this is the current and preferred method of HTTP firmware update retrieval at this point
as there seems to be http wrappers around it that to my eye, don’t add any meaningful functionality on top of that core library
hillct
@hillct
Aug 06 2018 19:52
I guess I should explain, that I started looking for node.js based server side code that implemented what’s described here with the PHP example http://esp8266.github.io/Arduino/versions/2.0.0/doc/ota_updates/ota_updates.html#http-server but what I found instead were several scripts that all depended upon wrappers around ESPhttpUpdate and failed to complete the basic tasks of validating the update request headers. It also appears that not all the update request headers are documented (anywhere that I can find anyway). I guess we can rely on the code itself, for the needed documentation https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266httpUpdate/src/ESP8266httpUpdate.cpp#L203
Develo
@devyte
Aug 06 2018 21:30
you're correct, they're not. PRs are welcome.
about httpUpdate, you should probably be aware that there are proposed PRs that change the api a bit. The idea is to allow either normal or secure sockets. It's still under discussion, but I mention it because there have been several questions about it, including allowing to ignore cert verification, use of fingerprint, etc.
hillct
@hillct
Aug 06 2018 22:25
thanks. I’ll keep it in mind
I did notice the differences between the method signatures in the current released vs guthub HEAD library
hillct
@hillct
Aug 06 2018 22:44
I see it’s only the example files that are out of date with respect to the calling arguments… fun...
Develo
@devyte
Aug 06 2018 23:43
Current release is 2.4.2, only a few days old
hillct
@hillct
Aug 06 2018 23:45
@devyte yeah. The package manager lists 1.10.0 and the examples themseles haven’t neen updated in line with the library. All things that an be worked around, one way and another
er Library manager