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.

CC3220: Block smartconfig feature of changing device name

Part Number: CC3220

Hello,

I'm testing smartconfig and I found that even if I don't want, it's always possible to change the device name through Texas SmartConfig app (Simplelink Starter Pro)

So, I would like to ask:

1 - It’s possible to lock this option?

2 - Which data can be changed by smartconfig?

3 - As smartconfig, there is any other way to communicate with coprocessor that we don’t know but that can cause a security breach?

Thanks

  • Igor,

    Are you mentioning that the name can be changed after provisioning? or before? While the device is AP? or Station?

    Smartconfig allows you provision the device, and after provisioning you can disable this in your C code to not allow anyone to edit your configurations.

    Regards,

    VR
  • Hi Vincent,

    During the provisioning. It's possible to change de device name in the provisioning. I want to avoid that.

    Thanks

    Regards.

  • Igor,

    You are using the Smart Config app? I believe this is just a local name for the app to understand what device its connected to. If you connect with a different device, i don't think that name stays. I could be wrong.

    VR
  • Hi Vincent,

    Yes, I'm using the SmartConfig app (Simplelink Starter Pro) and it really changes the name of the device. Basically it does the same as the function:

    sl_NetAppSet(SL_NETAPP_DEVICE_ID, SL_NETAPP_DEVICE_URN, NAME_LENGHT, &name[0]);

    Do you see any solution for this?

    Thanks

    Best regards,

    Igor

  • Okay, i think i see what you are saying.

    Unfortunately no, the app was designed to allow you to change the device name while provisioning. If you wanted to change that, you could take the source code and modify it to not allow for this.

    www.ti.com/.../wifistarterpro

    VR
  • Hi Vicent,

    My problem is not with the App.

    I want to have a device that allow an user to use my App to pair it with a router using smartconfig.
    My App uses smartconfig API provided by texas and just allow user to send router ssid and password.

    The problem is that everybody can pick Texas app to change my device configurations (like the device name).
    I would like to set an option on my device to only accept ssid, password and nothing more from smartconfig.

    Is this possible?
    Thanks

    BR,
    Igor
  • Hi Igor,

    You can disable the entire HTTP RESTfull support (setting the device URN is one of the supported APIs), by using the following:

    _u8 value =0;
    sl_NetAppSet (SL_NETAPP_HTTP_SERVER_ID, SL_NETAPP_HTTP_ROM_PAGES_ACCESS, sizeof(value), (_u8 *)value);

    Note that this will disable all the RESTfull APIs, so it must be enabled if you want to use the embedded provisioning mechanism.

    It can be disabled immediately as  the device gets connected to the network.

    For more details - see chapter 8 of the NWP Programmer Guide

    Br,

    Kobi

  • Hi Kobi,

    Thanks for the reply.

    I think my problem is before provisioning starts using Rest Api.

    I can also change the name of my device even if my device fails to connect to router.

    Example:

    I give the name "Portugal" to my device by software. I also give a key to be used in smartconfig. The key is "ComputerComputer".

    In Simplelink Start Pro App, I set device name as "Spain" and key has "BrasilBrasilBras".

    As result, the pairing failed (because key is different) but device name changed. Changed from Portugal to Spain.

    Thanks

    BR,

    Igor

  • Hi Igor,

    The RESTful API is a feature of the Simplelink internal HTTP server.

    This works both when the CC32xx device is in AP role or when it serves as a station connected to an access point (which is its default role).

    As long as you can create a HTTP connection to it (e.g. when you phone connects to the CC32xx AP and uses the Starter PRO to send HTTP requests), you will be able to use the RESTful  API (unless they are disabled with the API shown before).

    The RESTful API is used for the AP Provisioning. If you don't need this and are ok with SmartConfig you can set the device to station mode to begin with (so HTTP will not be possible).

    Anyway, the current application is just a demo, so it uses a a known pair of keys (the Playground certificate from the SDK). If you use your own TLS certificates for the HTTPS server, only your application will be able to connect and use the RESTful API. 

    Anyway, why are you concerned about the URN?

    Br,

    Kobi 

  • Hi Kobi,

    Thanks for the reply.

    I'm setting up two provisioning methods on my device. First is smartconfig and, if this fails, I stablish my own AP (I don't use AP provisioning from simplelink). I don't want to use HTTP server provided by simplelink.

    When device starts, it sets a defined device URN. URN information is used as the "device unique name". It's also used to give the name to our AP.

    Of course it can reset the URN after smartconfig be used but we need to be sure that this renaming is secure (don't allow to harm the chip). It's also important for me to know if there is something more that smartconfig allows to change.

    Br,

    Igor
  • Hi Igor,

    The best solution we can offer is that you disable the internal RESTful API support (i.e. disable them all as explained above), and implement you own RESTful APIs based on the NetAppReq handler.

    Br,

    Kobi

  • Hi Kobi,
    Thanks for the reply.

    We tried but didn't works. Even with the solution that you provided:

    _u8 value =0;
    sl_NetAppSet (SL_NETAPP_HTTP_SERVER_ID, SL_NETAPP_HTTP_ROM_PAGES_ACCESS, sizeof(value), (_u8 *)value);

    It's possible to change the name anyway.

    BR,
    Igor
  • This is interesting - did you restart the the HTTP service after this?

    br,
    Kobi
  • No, I didn't restart it. I just checked the returned value that was success.
  • Hi Igor,

    I assume you have already found a solution for this one so I'm closing this thread.
    If the issue is still relevant, please open a new thread.

    br,
    Kobi