OTA TFTP Pull instead of Push

Has anyone tried to setup a system whereby you pull from a TFTP instead of Push?

 

Application: Systems are dispersed over some area, and you'd like to be able to update them without using the USB or being in the local area

 

Goal:

1. Host a file on a TFTP (Cloud)

2. Have the Industruino check periodically for an update in firmware version

3. If detected "Pull" from a TFTP server (cloud)

4. Issue a reset

I'm thinking something similar to:

http://www.lucadentella.it/en/2018/10/27/esp32-37-ota-via-https/

There are also very vague resources that suggest there is a TFTP pull option 

This may require a different bootloader? and it is at least, so far opaque to me 

 

https://docs.google.com/document/d/1jTNCDg3SSHOK5SxMuyfqvvk8WsKiQeGGSPJbzsl2-xg/edit#heading=h.hpl2kyard5d3

Thanks in advance to anyone with some thoughts and insights

 

Colin Ragush
Colin Ragush
27
| 0 0 0
Asked on 6/26/19, 9:09 PM
0
vote
150 Views

Thanks Tom,

That may be workable but it seems less than ideal

My concern is that the TFTP and industruino are not on a local network and so I thought a tftp 'get' was more practical so that I can point to a web address using DNS

So i saw it very similar to yours

1. Http get to check version and get tftp address

2. If version is newer issue a tftp get

 

And as one small modification to your suggestion in 1 would it not be a HTTP PUT ?

 

Colin Ragush
Colin Ragush
27
| 0 0 0
Answered on 6/27/19, 11:35 AM
0
vote

hi Colin, i'm not exactly sure about the differences between GET/POST/PUT for the HTTP request; i mostly use GET because it's easy to see/test the URL. i think you're right that my suggestion would not work if the Industruino does not have an IP address visible from the server. it might be possible with port forwarding but i wouldn't know how to do that.

Tom
on 6/29/19, 6:46 AM

Hi, i think this can be implemented using the existing TFTP functionality, i.e. the server will still initiate the TFTP session, but will do so based on an 'instruction' from the Industruino:

  1. the Industruino sends a periodic HTTP GET request to a PHP script on your server, with the currently running firmware version as parameter (e.g. every minute, or every hour, or every day) 
  2. the PHP file compares the running version with the latest available on the server
  3. if the Industruino is still running the latest version, the PHP script does nothing
  4. if the server firmware is newer, have the PHP script initiate the TFTP upload

I don't see any benefit of pulling the latest version info to the Industruino to compare it there, it can just say 'this is what i'm running, update me if you have something newer'. Does this qualify as a pull for you?

Tom
Tom
5415
| 0 0 1
Answered on 6/27/19, 9:27 AM
0
vote

Your answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

Ask a Question

Keep Informed

About This Forum

This community is for professionals and enthusiasts of our products and services.

Read Guidelines

Question tools

56 follower(s)

Stats

Asked: 6/26/19, 9:09 PM
Seen: 150 times
Last updated: 6/27/19, 11:35 AM