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.

How to get IP of cellphone that starts smart config?

Hi, I'm working on a project that uses cc3000 as wifi module to send sensed data from sensors to a dedicated device.

Although, I know how the smart config work, I still have no idea how to obtain the IP address of the devices(cellphone, pad, or PC) that start the smart config process.

Does anyone could give me a hint about how to obtain IP of the device that start smart config?

Thank you very much.

  • Hi,

    You can refer to the basic sensor application here: http://processors.wiki.ti.com/index.php/CC3000_Wi-Fi_MSP430_FRAM_Getting_Started_Guide

    Programatically, there is no definite way to receive the IP address of the device initiating the SmartConfig as of now. But for now, if you know the IP address of this device, you can add it as part of your APs SSID and start the smart config. The drawback would be that you are left with a smaller SSID length.

    Thanks & Regards,
    Raghavendra

  • Dear Sir, 

    Thanks for you reply.

    But, I'm still not sure what did you mean.

    Are you suggest that I can add the IP address of my handheld device(such as cellphone or tablet) as part of data of smart config packets?

    Currently, I'm using Android cellphone to do smart config. I traced the example Android app code that I download from TI website, I found out that Smart Config process is triggered by transmitSettings() function of FirstTimeConfig.java.

    In this case, I don't see there is any section that I can add additional information to the smart config packet. 

    In addition, I would like to know if the packet is sent under mDNS protocol?

    Thank you very much, and have a nice day!

  • Hi,

    This is not the ideal method. What I meant is, you can append the IP address of the device to the SSID field in your smartConfig app. Also, please get the latest SmartConfig application.

    When you start the SmartConfig app, the application will send the SSID-with-IPaddress to the CC3000. And CC3000 has to parse this data and seperate out SSID and IP address.

    And yes, required information can be advertised using mDNS protocol.

    Thanks & Regards,
    Raghavendra

  • Hi ,

    Thanks for the reply.

    The Android SmartConfig App I'm currently using is the latest version which I downloaded from TI website.

    As I mentioned in the last post, the smart config process is triggered by the function "transmittings()" in FirstTimeConfig.java. I don't get to access the source code of the java code, then how do I get to append IP address of my handheld device? Would you please elaborate this part for me? 

    Moreover, if I sent SSID+IP address together to the CC3000, how does it separate the SSID and IP in the same packet? Will it use the SSID+IP as SSID to set up the connection? How do I get the IP address that appended with ssid?

    Once again, thank you very much!

  • Hi,

    FirstTimeConfig.java is the old source. It has been updated. You can update the SSID field in this application.

    At the CC3000 side, currently there is no implementation to seperate out SSID and IP address. You would have to add a logic where you can parse this field based on a token or pattern. And then seperate out the IP address and the SSID.

    Thanks & Regards,
    Raghavendra

  • Hi, 

    Thanks for the reply.

    The Android SmartConfig app that I download from TI website is still use FirstTimeConfig.java, would you please share the link of the latest version of SmartConfig app? (This is the link I used to download the app -> http://www.ti.com/tool/smartconfig, and I downloaded "SmartConfig-Android", version 1.1)

    Regarding to the CC3000 side, I understand that there is no implementation of separating SSID and data appended.

    As far as I know, all the wlan operations are conducted by calling hci_command_send() function and input required command, and use SimpleLinkWaitEvent() function to receive the result, in this case. It seems to me that all the operation are start from MCU sending commands to CC3000 module, then wait for the process result. Am I correct? Then, in this case how could I capture the data received and process them? which C source code or function code should I look into?

    Thank you very much.