Hello,
Is it possible to upload a file via web page (AP mode) to CC3120 memory?
For later access with sl_File API.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
Is it possible to upload a file via web page (AP mode) to CC3120 memory?
For later access with sl_File API.
Hi Joao,
The local OTA example allows you to load a TAR file from the internal HTTP server, save it to the serial flash, and complete an OTA update which can include the MCU image, service pack, and other user files: http://dev.ti.com/tirex/explore/node?node=ABcd3tIkTEyB-4cx9ZIVxA__s6qGmnm__LATEST
If do not want to complete an OTA update, you can take the pieces of this example to learn how to write a file to the file system. You will want to look at link_local_task.c for the local OTA example. otaPutCallback() reads the file from the internal HTTP server. You can see that we check the file name and length, sl_Memcpy the payload to gPayloadBuffer, and pass that to OtaArchive_Process(). OtaArchive_Process() does a lot to process a TAR file, but you can focus on the OtaArchiveState_SaveFile case where it is actually written to the file system.
For full details on these features, please see the HTTP Server and File System sections of the NWP Programmer's Guide: http://www.ti.com/lit/swru455
Best regards,
Sarah