Working TFTP server based OTA updates
Tested with 16MBit flash configuration, two rboot update slots. Closes #10
This commit is contained in:
parent
6887a8119a
commit
19b8383069
8 changed files with 586 additions and 176 deletions
33
extras/rboot-ota/ota-tftp.h
Normal file
33
extras/rboot-ota/ota-tftp.h
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
#ifndef _OTA_TFTP_H
|
||||
#define _OTA_TFTP_H
|
||||
/* TFTP Server OTA Support
|
||||
*
|
||||
* To use, call ota_tftp_init_server() which will start the TFTP server task
|
||||
* and keep it running until a valid image is sent.
|
||||
*
|
||||
* The server expects to see a valid image sent with filename "filename.bin"
|
||||
* and will switch "slots" and reboot if a valid image is received.
|
||||
*
|
||||
* Note that the server will allow you to flash an "OTA" update that doesn't
|
||||
* support OTA itself, and possibly brick the esp requiring serial upload.
|
||||
*
|
||||
* Example client comment:
|
||||
* tftp -m octet ESP_IP -c put firmware/myprogram.bin firmware.bin
|
||||
*
|
||||
* TFTP protocol implemented as per RFC1350:
|
||||
* https://tools.ietf.org/html/rfc1350
|
||||
*
|
||||
* IMPORTANT: TFTP is not a secure protocol.
|
||||
* Only allow TFTP OTA updates on trusted networks.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Start a FreeRTOS task to wait to receive an OTA update from a TFTP client.
|
||||
*
|
||||
* listen_port is the UDP port number to receive TFTP connections on (default TFTP port is 69)
|
||||
*/
|
||||
void ota_tftp_init_server(int listen_port);
|
||||
|
||||
#define TFTP_PORT 69
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue