NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
CC3100 File Download Application
Overview and Application Details[edit]
This sample application demonstrates how to connect w/ a server, download a file and save it on the serial-flash. The application developers can use this scheme to update files over the network
This application:
- connects to www.ti.com and downloads a 40KB file
- saves the file on the serial-flash as a temporary-file
- verifies if the file is downloaded completely
- replaces the existing version of the file on the serial-flash and deletes the temporary-file.
If the application developer intends to download a file from the servers that don't support Chuncked Format for sending the data to their clients, he/she should modify the application for handling the responses from these servers.
The application developers can change the server and the requested file by modifying the values of HOST_NAME and PREFIX_BUFFER & POST_BUFFER respectively. Size of the saved file can be changed by modifying the value of SIZE_45K but the existing file at FILE_NAME has to be deleted first.
Note: This wiki page is only applicable for CC3100-SDK v1.0.0 and upward releases. For documentation on older SDKs' examples, refer corresponding file in <cc3100-sdk-installation-location>\cc3100-sdk\docs\examples\
Usage[edit]
Prerequisite: This application requires an access-point with internet connectivity
- Connect the board to PC and configure the terminal program for seeing the logs - [| CC31xx_&_CC32xx_Terminal_Setting_Wiki] has detailed instructions for configuring the terminal-program
- Open sl_common.h and change SSID_NAME, SEC_TYPE and PASSKEY as per your access-point's properties. SimpleLink device will connect to this AP when the application is executed
- Build and run the application
- See the self explanatory logs on the terminal-program's console
The application connects to the www.ti.com and requests for /lit/er/swrz044b/swrz044b.pdf from the server. The file is saved on the serial flash as a temporary file whose name is defined by the macro TEMP_FILE_NAME It verifies if the file is downloaded completely and on a successful verification, replaces the original file FILE_NAME w/ the downloaded file.
- On success, below message will be displayed on the terminal
Limitations/Known Issues[edit]
- The files can only be download from the servers that supports Chuncked Format for sending the data to their clients. If the application developer intends to download a file from the servers that don't support Chuncked Format, he/she should modify the application for handling the responses from these servers.
Links[edit]
{{#invoke: Navbox | navbox }} {{#invoke: Navbox | navbox }}