Trivial File Transfer Protocol (TFTP) is a simple protocol to transfer files over the IP network. It operates on the UDP layer and delivers basic functionalities like flow control, parameters negotiation, or error notification.
TFTP currently only operates on Nordic's IPv6 stack, and two examples have been prepared to show Nordic's TFTP Client capabilities. The configuration of the TFTP server has been described in the following section.
Setup of a TFTP server on Linux
There are many free TFTP servers, but we have tested with the tftp-hpa server (tftpd-hpa) and recommend you use that one.
Installing on Ubuntu/RPi
Install the tftpd-hpa package and its dependencies by typing:
If that operation ends successfully, you can go directly to the configuration section - Configuring the TFTP server service .
Installing from sources
If there is no official package for your distribution, you can install it from an official Linux kernel repository:
- Install the Git content tracker.
-
Download files from the repository:
By default it will create the directory tftp-hpa and download all source files.git clone git: //git.kernel.org/pub/scm/network/tftp/tftp-hpa.git
- Follow the instructions for building and installing.
Configuring the TFTP server service
By default, the tftp-hpa server listens only on IPv4 addresses, so it is necessary to change its configuration file. Replace the contents with the following configuration:
Create the TFTP serving folder:
Restart the service by typing:
- Note
- The root path for TFTP transmission is /srv/tftp
-
Remember to set the correct owner of the files placed in this folder.
// inside /srv/tftpsudo chown tftp:tftp FILE