TFTP and FTP Overview

Contents:

  • Overview of FTP and TFTP
  • Firmware Upgrade using FTP or TFTP

Orientation of FTP and TFTP

FTP (File Transfer Protocol) and TFTP (Trivial File Transfer Protocol) are two protocols for transferring files across a network.

FTP implements efficient file transfer based on the TCP protocol. It supports commands for browsing and modifying the directory structure on the server, as well as user authentication.

TFTP is very simple, it implements plain file transfer over UDP without any authentication. TFTP transmits one package at a time and waits for acknowledge before proceeding. This leads to reduced throughput compared to FTP. Due to the lower requirements, TFTP is often used in bootloaders where resources are limited.

Neither protocol implements data encryption - if there is a need to transfer sensitive data across a public network, encryption has to be provided by other means. For example by setting up a VPN tunnel. An alternative for some usecases may be to use SCP instead of (T)FTP.

Firmware Upgrade using FTP or TFTP

WeOS firmware upgrade can fetch the upgrade image from an external FTP or TFTP server. The protocol variant can be explicitly specified through the use of a URI, for example (from WeOS CLI):

upgrade sec tftp://192.168.122.1/new-firmware.pkg

Or it can be determined automatically. In this case WeOS first tries FTP and if it fails to connect, falls back to TFTP:

upgrade sec 192.168.122.1 new-firmware.pkg

If username and password are not supplied for an FTP connection, WeOS will use anonymous FTP. Username and password can be supplied using the syntax:

upgrade sec ftp://username:password@host/path/to/firmware.pkg

Firmware upgrade can also be initiated from the WeOS Web interface. In that case selecting the “FTP/TFTP” option will make WeOS try anonymous FTP first, then if that fails, TFTP.

Note: The WeOS CLI upgrade command also accepts URI prefixes http:// and usb://, but not scp://.