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.

how to create a file in SFLAH while can be shown from web browser?

Other Parts Discussed in Thread: CC3200, CC3100, UNIFLASH

the objective is to create a log file in SFLAH while can be shown from web browser, so the users can view or save the log file easily.

Checked file operations & file downloads examples from CCS debug mode, executed ok; then restart the OOB in the SFLASH in AP mode, the AP web page is there, but can not show or find the file from the web browser like below:

mysimplelink.net              //ok

mysimplelink.net/fs_demo.txt           //file not found

Checked with a uniflashed txt file, can be shown from web browser.

the SFLASH is not secured. if the FS is flat, the file should be seen from web browser?

for fail safe mode, two files are created, then what's the file name of the 2nd file?

Appreciate any point .

  • Hi Jack,

         I am not entirely sure if .txt file at Serial Flash can be shown at your web browser.  But, based from CC3100\CC3200 SimpleLink™ Wi-Fi® Network Processor Subsystem doc. these below are the supported file types.

    Supported file types: .html, .htm, .css, .xml, .png, .gif

    - kel

  • Hi Jack,

    Actually, a txt file is supported.

    What do you mean by: "Checked with a uniflashed txt file, can be shown from web browser". Can you elaborate?

    Please let me know what is the exact name you used for the file while using Uniflash.

    Shlomi

  • Hi Shlomi,

    "Checked with a uniflashed txt file, can be shown from web browser": I created a log.txt file with a couple of lines in it using windows, then use Uniflash to program to the LP which was flashed with OOB; restart the OOB in AP mode, then type:

    mysimplelink.net/log.txt

    the web page shows the content of log.txt correctly.

    But if use CCS debug mode to execute the file operations or file download examples, the file ( such as fs_demo.txt) can not be found from web browser in OOB app (file not found); the fs_demo is there and can be checked from the C code (main.c). any special locations/paths? 

    "Actually, a txt file is supported.": how? can I use C code and FS API to do that like in file operation example, and can be shown by a web browser?

    cheers

    Jack

  • Hi Jack,

    So you do see it with Uniflash. It is just with CCS that you cannot see the txt file.

    Just to verify, I tested it myself. What you need to verify is that the text file resides under /www/ or www/.

    I.e. if the file name is text.txt, please use the target name: "/www/text.txt" when you open the file.

    Let me know how it goes.

    Shlomi

  • Hi Shlomi,

    Thank you for the point, it works.

    BTW, for fail-safe mode of FS, two files are created, then what's the file name of the 2nd file? When the 1st file is deleted, should the 2nd/mirror file also deleted simultaneously? any way to double check?

    Again thank you for the help.

    BR

    Jack

  • Hi Jack,

    The rollback option is for fale-safe purpose only, i.e. if power fails during update of a file, then automatic rollback takes place. Thus, the filename is the same and you do not have direct access to the shadow version. In same manner, if you delete the file, its shadow version is also deleted.

    Shlomi

  • Hi Shlomi,

    How can we see the txt file via Uniflash? It' s possible get the txt file created, in order to view / manipulate it in the pc?

    Thank you.

    Regards
  • Hi Oscar,

    No, reading a file via Uniflash is not possible.

    Regards,

    Shlomi

  • Thanks Shlomi,

    So, it will be possible to extract the file using another tool or method (excepting upload the file to a server)?

    Thanks again.

  • Hi,

    Reading a file is not possible via Uniflash or any other utility supplied by TI.

    You can read it from the application running on your MCU (using file system APIs) or as I explained with placing it under /www directory.

    Shlomi

  • Thanks Shlomi.

    I understand. Normally I read the file via MCU application and now, in order to test it, I just read file via web browser and it works perfectly.

    Thanks for your help.
    Regards.