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.

CC3120MOD: How to read (retrieving a file from NWP)

Part Number: CC3120MOD
Other Parts Discussed in Thread: CC1352R, , UNIFLASH, CC3120

Hi,

CC3120MOD is connected with CC1352R.

With application running on CC1352R in file system of the NWP is created a file with user information.

How to read this  file with UniFlash image creator tool?

Online user file button is not active.

When press on User file (in advanced mode) the list is empty.

Best regards,

Ilian

  • Hi Ilian,

    The online user files feature will only work if the CC3120 is flashed in development mode. You can change this setting in Advanced -> General -> Settings, then flash the image.

    Best regards,

    Sarah

  • Hi Thanks,

    I change the mode and found the file.

    Now I have additional question.

    The file is created from CC1352R application with this code.

    unsigned char* DeviceFileName = "factory_params";

     FileHdl = sl_FsOpen((unsigned char*)DeviceFileName, SL_FS_CREATE | SL_FS_OVERWRITE | SL_FS_CREATE_FAILSAFE | SL_FS_CREATE_MAX_SIZE(512), &MasterToken);

    This file should be modified on PC and after that to be written in the NWP. (via UniFlash)

    Now in this format the file cannot modified with text editor for example.

    How the file should be created in the application for this reason?

    unsigned char* DeviceFileName = "factory_params.txt";  ?

    The file contain HEX numbers.

    Best regards,

    Ilian

  • Hi,

    I try with .txt , but it is the same, content of the file is not readable with text editor.

    Best regards,

    Ilian

  • Hi Ilian,

    If I understand correctly, right now you are creating a file from the CC1352R application, then connecting the CC3120 in UniFlash ImageCreator and using the online user files tool. Is that right? When you download the file from the tool, what does it look like when you try to open it?

    Best regards,

    Sarah

  • Hi,

    yes the file is created from the application and the data inside is writed from the application. The  data is array with HEX values.

    When I get this file via UniFlash I can not open it with text editor and for example change some values.

    1. Is it possible to create this file to be opened and modified with text editor?

    2. If I create this file like .txt (with flag FAILSAFE) and after that write it with an image, is the application will correct open and read this file?

    If needed I can send you the file, which I get.

    Best regards,

    Ilian 

  • Hi Ilian,

    If you want to open it as a text file, are you writing the hex values as a string? Are you closing the file after writing to it?

    Best regards,

    Sarah

  • Hi,

    I write it like HEX in array.

    The application open and close the file after read or write.

    If it is necessary I can send data and the file.

    Best regards,

    Ilian

  • Hi,

    may be I did not explain good the problem.

    The file is created it can be read/write in the NWP.

    The file is created from application and is binary.

    For this reason can not be read (change some values) by human.

    The file is loaded in production and it is good if some values can be changed.

    If you can point my for a converter which can convert this file to 8 bit HEX TI-Style? For example.

    And vice versa.

    For some reason I can not insert the file here.

    Best regards,

    Ilian

  • Hi Ilian,

    If you want edit file by human why you not use text file format (e.g. JSON). CC32xx SDK have available JSON parser.

    If you want to stay with binary file, you can edit your file by any HEX editor which you find on internet or you can easily create computer program (C#, Python, Java, etc.) which can create GUI above your file. Another option can be add into your host application capability change content of this file (e.g. via nwp http server).

    Jan

  • Hi Jan,

    thank you for your answer.

    Best regards,

    Ilian