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.

SmartConfig

Other Parts Discussed in Thread: CC3200

Is there some way I can get the device name passed from my smartconfig phone app on my device main() ?

  • Hi Jinu,

    The WiFi Starter App source is doing this already. Please refer to the mobile app source code and smartconfig example in the SDK to do this.
  • Thank you Lin. But I need the device name passed from my smartconfig phone app on my cc3200 device main function. The data that is passed from the mobile app is received and processed at the simple link libraries it seem. I am just a beginner. So what I need is the device name that is passed from the mobile app on my main function of the cc3200 device.
  • Hi Jinu,

    If you are designing a mobile application using the smartconfig library, you can manually send tcp packets with device name right after the smartconfig process. On the CC3200 side, open a tcp server socket to read this data and then call

    sl_NetAppSet (SL_NET_APP_DEVICE_CONFIG_ID, NETAPP_SET_GET_DEV_CONF_OPT_DEVICE_URN, strlen(DEVICE_NAME), (unsigned char *)DEVICE_NAME);

    to set the device name.

  • There are many a times I don't get the smartconfig response in the mobile app from the device, but still the device gets connected to the network.  So I need the Device ID during the smartconfig procedure. Is there no way to get it during the smartconfig process?

    Also 1 more query. If I want some additional data to be sent to the mobile app along with the response the device sends. Is that possible? 

  • If you want to send more additional data, you can use tcp or udp via device IP address directly after the device linked to the router. Smart config just make the device link to the router.
  • Thank you HeKaifeng. But isn't the IP dynamic? So neither the device nor the mobile knows the IP of the other I think. So how can I communicate even after the device links to the router? I need to access the data that is transfered during the smartconfig process before responding. I need it in my main function. Is there a way to get it?
    I get the SSID, tokenname & status from the Async Event - SL_WLAN_SMART_CONFIG_COMPLETE_EVENT. How do I get the extra paramaters that is passed from the Android app, on my device main function?
  • Hi Jinu,

    I don't think it is matter if the IP is dynamic or not.
    When your CC3200 and the mobile phone link to the same router,normally, the IPs are in the same sub net.
    And you always know your CC3200's server port (you bind specific port to tcp or udp for "listening").
    So you can use TCP or UDP broadcast ip,e.g. 192.168.1.255:Port ,to find your device.
    As soon as you get specific respond from the CC3200, then you know it's IP,then you can do anything you want.