Staging:CC3220 TFTP Client Demo (Texas Instruments NDA restrictions applicable)

Overview
Trivial File Transfer Protocol (TFTP) is a simple, lock-step, file transfer protocol which allows a client to get or put a file onto a remote host.

Application details
This application illustrates how a client application can read/write a file from/to the TFTP server running on the other end of network. This application reads an existing file from the server and write it to device's sFlash memory and on the second step application tries to write same file to server but with different file name. Default setting is defined as in following MACROs, which can be changed either in source code or at runtime.

'
 * 1) define SSID          "cc3220demo"
 * 2) define TFTP_IP       0xc0a80164  /* TFTP server IP */
 * 3) define FILE_SIZE_MAX	(20*1024)	/* Max File Size set to 20KB */ '

Source Files briefly explained

 * 1) main - main file calls simplelink APIs to connect to the network and read/write file from/to the server by calling TFTP library APIs
 * 2) cc_launchpad - contains Initialization and configuration for peripherals used.

Supporting Files
 * 1) pinmux - pinmux file to mux the device to configure UART peripheral

Common Files
 * 1) common - contains NotifyreturnToFactoryImage function
 * 2) uart_if - Common UART interface APIs
 * 3) timer_if - interface file for general purpose timers
 * 4) startup_* - IDE specific interrupt vector table implementation and startup functions(not required when working with TI-RTOS)

TFPT client library is available under '\netapps\tftp\client' folder.

Usage

 * Setup a serial communication application (HyperTerminal/TeraTerm). For detail info visit Terminal setup

On the host PC. The settings are:   - Port: Enumerated COM port (XDS110 Class Application/User UART)    - Baud rate: 115200    - Data: 8 bit    - Parity: None    - Stop: 1 bit    - Flow control: None
 * Connect a PC to same AP over which device has connected.
 * Get the ip address of the PC and fill this value for TFTP_IP macro and build the application from IAR/CCS
 * Run a TFTP server on the PC (make sure that the file read, file write and file overwrite privileges are permitted for this server)


 * Make sure file with name 'readFromServer.txt' must be present at server root path and server has enable the write access to it's own file-system.
 * Disable PC anti-virus while running TFTP server.


 * Run this application (tftp_client) from IAR/CCS or Flash the bin file to device.
 * Upon successful execution, a new file named "writeToServer.txt"will be created in the server's root directory. The content of this file and "readFromServer.txt" file should be identical.