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: Provisioning / connecting AWS IOT thing with Alexa

Part Number: CC3220

Hello, 

I'm trying to work out the scheme whereby we pair our device with a user's alexa account.  From what I can tell, this requires us to have our own app, unfortunately.  Ok, so the app needs to connect to the CC3220 to provision it to the local wifi SSID.  While this functionality is provided by TI, our app will need to read the serial number (or other UID) as well as ask the user to login, so that it can then pair the UID with the user account.  OK, the question is, is there an example or app note showing how we can use the simple link mobile app to read the UID?

I see in the SWRU472 app note, section 4.8.5, page 13, that there is this function

public static Boolean setIotUuid(String newName, String baseUrl)

Although it goes the opposite direction, I could make this work if I must -- if I can't read a UUID (or serial number) from the app.

Thoughts?

Chris

  • Hi Chris,

    I think you will have to handle the method that you use to actually retrieve the UDID from the device. This depends on how your app will interact with the device during provisioning. However, you should be able to use the following simplelink host driver call to read the device UDID for this purpose:

    int16_t     status;
    uint16_t    configLen;
    uint8_t     configOpt;
    uint8_t     udid[16];
    
    UART_PRINT("\r\n getDeviceUDID()\r\n");
    
    configLen = sizeof(udid);
    configOpt = SL_DEVICE_IOT_UDID;
    
    status = sl_DeviceGet(SL_DEVICE_IOT,&configOpt, &configLen,udid);

    Best,

    Ben M

  • Hi Ben, thanks for the reply. I see this in the L API documentation, but I have questions: I see that the sl_DeviceSet() function does not support SL_DEVICE_IOT_UDID, so how/where does it get set? Specifically, is it possible to program it during production? Ideally, I could upload a UDID in a text file via uniflash, then read/store it during init.

    Thanks,
    Chris
  • Hi Chris,

    Good question! The UDID is a unique 128-bit value built into the device by default. You still have the option to do what you are describing with creating your own file on the file system that contains a programmed identifier, but this might be more convenient because it eliminates the need to program each device individually and the built-in value can't be modified.

    Plus, you can use the UDID in conjunction with the built-in device-unique key pair to verify the ownership of the UDID. See section 6.1 in the Security App Note.
    http://www.ti.com/lit/swra509

    Best,
    Ben M
  • Ben, thanks for the info. If the UDID is uniquely programmed at the TI facility, then that meets my requirements, and is indeed easier than me trying to do it during our production process.

    So what I need to determine is how to get it over to the simplelink-based mobile app during provisioning. My guess is that in the callback from UDP_Listener in the mobile app, to attach to the device and request the UDID. It would be great if I could just use the HTTP Host Token mechanism that is described in SWRU455G; but I don't see any reference to the UDID in section 9.5.3, unless I'm missing something.

    Thoughts?

    Chris
  • Hi Chris,

    You are correct that there is not a built-in API to retrieve the UDID through the internal HTTP server. However, you could implement it as a custom resource and still send it to the mobile app with the internal HTTP server. Refer to section 9.7 of the Network Processor Programmer's guide:
    http://www.ti.com/lit/swru455

    Best Regards,
    Ben M