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.

CC3220SF: Default role set via CLI

Part Number: CC3220SF
Other Parts Discussed in Thread: UNIFLASH

Hello TI!

I am able to change default device role of CC3220SF (Station or Access Point) using Uniflash GUI. 

Now I need to do the same on build server. 

I have found document swru469h (chapter 7.1.10 Reconfigure Project).
I have changed shell script running on the build server by adding "reconfig.json":

...
# change default role to AP
project reconfig --name "$IMAGE_NAME" --file reconfig.json
# create SLI file
"./$IMAGE_CREATOR_BIN" project create_image --name "$IMAGE_NAME" --sli_file "$DIST_SLI_IMG"

reconfig.json content:

{
  "SimpleLink":
  {
    "startRole": "Station"
  }
}

I have tried "Access Point" instead of "Station" but I have Access point role all in both cases.
What I am doing wrong?

Jiří

  • I will need to check with our tools team.

    Since I'm not an expert of the CLI and haven't tried this before I used the Uniflash GUI to switch between the initial roles (Advanced Mode - Role Settings > General Settingsand checked the auto-generated json file (under C:\Users\<username>\.SLImageCreator\projects\<projectname>\) and it looks different than the definitions in the document (e.g. "CONFIG_TYPE_MODE": { "START_ROLE": "0" } under  -> for station, or "2" -> for AP).

    Maybe you can try this while i'll check with the experts about the content of the uniflash/image-creator document. 

  • Hi Kobi,

    I have tried these two options in my reconfig.json file without any success (AP starts always):

    {
      "systemFiles":
      {
        "CONFIG_TYPE_MODE":
        {
          "START_ROLE": "0"
        }
      }
    }


    {
      "CONFIG_TYPE_MODE":
      {
        "START_ROLE": "0"
      }
    }

    Jiří

  • are you calling sl_WifiConfig() in your code? 

    This one changes the role setting according to "Simplelink WIFI->General->Start Role" definition in the syscfg.

    So if you call sl_Start() after sl_WifiConfig(), it will take the definition from the syscfg.

    I saw that at least the programming from the GUI uniflash works (when not using sl_WifiConfig). I will later try to program from the CLI using the json file generated by the GUI.

  • sl_WifiConfig() is not used within our code.

    I do not know what you are referring to with 

    "Simplelink WIFI->General->Start Role" definition in the syscfg but it seems to be irrelevant as soon as we are not using function sl_WifiConfig().

  • again, i'm not sure what exactly is your issue and I'm still waiting for response from our tools team about the "reconfig" command.

    However, i just tested the following and it worked so probably can work for you.

    Created an ImageCreator project (called "CC3235SF-1") with the GUI "Simple" interface (only updated the SP).

    Programmed it with: 

    C:\ti\uniflash_6.3.0>dslite.bat --mode cc32xx project program --name CC3235SF-1 --dev

    Ran a program and checked the sl_Start return code.

    It was AP (2).

    Opened to auto-generated json file and updated the following line (default value was "2"):

    "START_ROLE":"0",

    Reprogrammed it and ran the example again.

    Return code of sl_Start is now 0 (Station) as expected.

  • JSON in my case is generated on build server for every Git commit. I cannot change the value manually. (I am programming my device offline with SLI image from build server.)

    Also: I would prefer to wait for response from expert from tools team rather than being tester of some undocumented ideas.

  • Bottom line is that the json in the project that you program should have the "START_ROLE":"0" line and then the NWP will start as station.

    I guess the reconfig command doesn't do the work. I haven't tested this command yet (I may have time for it later today) but all it does is updating the json (text) file which can be done through other tools.

    I expect the tools team will response early next week.