Thinking about program name checking for web based OTA.

47 views
Skip to first unread message

Dan Harold

unread,
Jul 6, 2016, 2:04:48 PM7/6/16
to souliss
One thing that can really messes me up is loading the wrong code to a node.

I would like to modify the /upload web page "Select File" code to check against the stored name of the current program to ensure that the one it is about to load is a match.   

Although I am an experienced embedded developer I am new to the Arduino/Souliss/ESP8266.   

Any pointers or ideas ?

Dan




Juan Pinto

unread,
Jul 6, 2016, 2:17:20 PM7/6/16
to souliss
Hi Dan, good idea!, but I think you're talking about Webupdate not OTA :P
 
Im not experienced on this and I don't tried to add anything on /update page but here you can find the relevant variable who contains the HTML code:
 
I think you need to add on it the "Stored Name"
 
Good luck and let us know if you get this working :P
 
PD. Sorry about my english, say thanks to the Spanish schools xD

Di Maio, Dario

unread,
Jul 6, 2016, 2:17:32 PM7/6/16
to sou...@googlegroups.com

Hi Dan,

I've not divided in web based code load, but I guess that you can store in the emulated EEPROM the file name into a given location and check once the button has been press.

Or usining MDSN you can access the web OTA with a node name like Livingroom.local

The code for web OTA is included in the core of ESP, but the question is why you don't use the OTA from Arduino IDE?

Using 1.6.8 and 720_rc you can load directly from IDE and each node will have a custom name.

Dario.

From Mobile.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/258cb030-c12a-4220-92f4-6178cd66cfab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dan Harold

unread,
Jul 6, 2016, 5:21:35 PM7/6/16
to souliss
I guess I was lumping together any updates over the net as OTA.  I was specifically thinking of updating with WebUpdate.

Juan thanks for the pointer to the code I need to look at.  

Dario I have been using the .local/update names with webUpdate to reflash nodes.  But it does not prevent one from loading the wrong code.  I had been flashing code from 1.6.9 but dropped back to 1.6.5 which does have the feature.  I will give 1.6.7 a try.

In time if this works out I hope to automate builds and programming (maybe a pipe dream) and webUpdate is a more suitable starting point for making this happen.  But I am still getting up to speed so that is a ways off.


Fernando Mancebo

unread,
Jul 24, 2016, 2:36:04 PM7/24/16
to souliss
Hi,
This is the key: the C preprocessor __FILE__

Saludos

F

Reply all
Reply to author
Forward
0 new messages