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.

CC3200: Smart Config Provisioning with SimpleLink Wi-Fi Starter Pro

Part Number: CC3200
Other Parts Discussed in Thread: CC3100

Hello,

I'm trying to test provisioning with the pro app (Build 2.2.22 SC lib 1.0.2) but I can't get it to work. I'm using the 1.3.0 SDK and the CC3100_CC3200_ServicePack_1.0.1.11-2.8.0.0.

I've flashed the provisioning_smartconfig exampe on the Launchpad.

In the app settings I've selected Smart Config.

I open the app, fill in the password and press "Start Configuration". It doesn't find anything.

I've tried enabling the console output on the provisioning_smartconfig example, but it can't find the uart_if.h from examples/common even though it is included (really strange)

Here's the relevant part of the log from the app:

2017-03-21 12:48:30,686 INFO  [smartconfig.MainActivity]-[848] SL Dev found by M: {"name":"A4D57843C4AB@mysimplelink","host":"192.168.1.9","age":0}
2017-03-21 12:48:30,696 INFO  [utils.NetworkUtil]-[125] Network state: 1
2017-03-21 12:48:30,699 INFO  [smartconfig.NewSmartConfigFragment]-[344] *SC* Detected a new SL device (jsonString: {"name":"A4D57843C4AB@mysimplelink","host":"192.168.1.9","age":0})
2017-03-21 12:48:30,700 INFO  [smartconfig.NewSmartConfigFragment]-[405] *SC* The SL device found is not the one that was just set, "null" does not match "null"
2017-03-21 12:48:36,793 INFO  [smartconfig.NewSmartConfigFragment]-[2483] *SC* Stop M scan
2017-03-21 12:48:36,811 INFO  [smartconfig.MainActivity]-[1032] *M STOP *



Do you know what I have to do?
  • I tried again with an Android access point as the router.
    Here's the log:

    2017-03-21 16:20:47,780 INFO [smartconfig.MainActivity]-[1244] ***** Application Created *****
    2017-03-21 16:20:47,944 INFO [smartconfig.MainActivity]-[275] UDPBcastServer - restarted
    2017-03-21 16:20:47,969 INFO [utils.NetworkUtil]-[125] Network state: 1
    2017-03-21 16:20:48,159 INFO [utils.NetworkUtil]-[125] Network state: 1
    2017-03-21 16:20:48,167 INFO [smartconfig.NewSmartConfigFragment]-[2471] *SC* Start M scan
    2017-03-21 16:20:48,172 INFO [utils.NetworkUtil]-[125] Network state: 1
    2017-03-21 16:20:48,181 INFO [utils.NetworkUtil]-[125] Network state: 1
    2017-03-21 16:20:48,184 INFO [smartconfig.NewSmartConfigFragment]-[2471] *SC* Start M scan
    2017-03-21 16:20:48,827 INFO [utils.NetworkUtil]-[125] Network state: 1
    2017-03-21 16:20:48,843 INFO [smartconfig.NewSmartConfigFragment]-[1978] *SC* Currently connected via wifi to: "Roberto" capabilities: [WPA2-PSK-CCMP][ESS]
    2017-03-21 16:21:11,342 INFO [smartconfig.NewSmartConfigFragment]-[2483] *SC* Stop M scan
    2017-03-21 16:21:11,352 INFO [smartconfig.MainActivity]-[1032] *M STOP *
    2017-03-21 16:21:11,923 INFO [smartconfig.MainActivity]-[747] Ping - stopped
    2017-03-21 16:21:11,932 INFO [smartconfig.MainActivity]-[766] PB - Completed
    2017-03-21 16:21:15,101 INFO [smartconfig.MainActivity]-[1244] ***** Application Created *****
    2017-03-21 16:21:15,110 INFO [smartconfig.MainActivity]-[275] UDPBcastServer - restarted
    2017-03-21 16:21:15,121 INFO [utils.NetworkUtil]-[125] Network state: 1
    2017-03-21 16:21:15,209 INFO [utils.NetworkUtil]-[125] Network state: 1
    2017-03-21 16:21:15,226 INFO [smartconfig.NewSmartConfigFragment]-[2471] *SC* Start M scan
    2017-03-21 16:21:15,228 INFO [utils.NetworkUtil]-[125] Network state: 1
    2017-03-21 16:21:15,235 INFO [utils.NetworkUtil]-[125] Network state: 1
    2017-03-21 16:21:15,237 INFO [smartconfig.NewSmartConfigFragment]-[2471] *SC* Start M scan
    2017-03-21 16:21:15,679 INFO [utils.NetworkUtil]-[125] Network state: 1
    2017-03-21 16:21:15,688 INFO [smartconfig.NewSmartConfigFragment]-[1978] *SC* Currently connected via wifi to: "Roberto" capabilities: [WPA2-PSK-CCMP][ESS]
    2017-03-21 16:21:32,016 INFO [smartconfig.NewSmartConfigFragment]-[1274] *SC* *** Starting SL device configuration in SC mode - "start configuration" button pressed ***
    2017-03-21 16:21:32,026 INFO [utils.NetworkUtil]-[125] Network state: 1
    2017-03-21 16:21:32,064 INFO [smartconfig.NewSmartConfigFragment]-[2483] *SC* Stop M scan
    2017-03-21 16:21:32,066 INFO [smartconfig.MainActivity]-[1032] *M STOP *
    2017-03-21 16:21:32,066 INFO [smartconfig.NewSmartConfigFragment]-[2107] *SC* Start smart config - start mDNS discovery + PingBcast to find new SL devices
    2017-03-21 16:21:34,074 INFO [smartconfig.MainActivity]-[422] Stop mDNS discovery and clear devices and recent devices arrays and prefs
    2017-03-21 16:21:34,077 INFO [smartconfig.MainActivity]-[1032] *M STOP *
    2017-03-21 16:21:34,079 INFO [smartconfig.MainActivity]-[1038] Smartconf in action - on rx only
    2017-03-21 16:21:34,088 INFO [smartconfig.NewSmartConfigFragment]-[2146] *SC*
    *** Send
    Name: Dev-668
    Len: 7, Pass len: 8
    ***
    2017-03-21 16:21:34,098 INFO [smartconfig.NewSmartConfigFragment]-[2186] *SC* Broadcasting configuration information to network via SmartConfig
    2017-03-21 16:21:34,101 INFO [smartconfig.NewSmartConfigFragment]-[2260] *SC* smartConfigRunner ended
    2017-03-21 16:22:14,125 INFO [smartconfig.NewSmartConfigFragment]-[2197] *SC* running smartConfigRunner
    2017-03-21 16:22:15,762 INFO [smartconfig.NewSmartConfigFragment]-[2203] *SC* SmartConfig Broadcasting configuration information to network finished
    2017-03-21 16:22:15,774 INFO [utils.NetworkUtil]-[125] Network state: 1
    2017-03-21 16:22:15,780 INFO [smartconfig.NewSmartConfigFragment]-[2223] *SC* connected to network sent to SL device in profile to connect to - looking for new SL devices in the local network
    2017-03-21 16:22:15,788 INFO [smartconfig.NewSmartConfigFragment]-[2471] *SC* Start M scan
    2017-03-21 16:22:30,815 INFO [smartconfig.NewSmartConfigFragment]-[290] *SC* M scan completed, SL device was not found
    2017-03-21 16:22:30,858 INFO [smartconfig.NewSmartConfigFragment]-[498] *SC* Connecting to starting network "Roberto"
    2017-03-21 16:22:30,868 INFO [smartconfig.NewSmartConfigFragment]-[297] *SC* No SL devices were found in "Roberto", You can...
    2017-03-21 16:22:30,879 INFO [smartconfig.NewSmartConfigFragment]-[301] *SC* Since SL device was not found in the requested network - Allow user to manually choose SL device to connect to in order to obtain cfg verification from as AP
    2017-03-21 16:22:33,485 INFO [smartconfig.NewSmartConfigFragment]-[2483] *SC* Stop M scan
    2017-03-21 16:22:33,487 INFO [smartconfig.MainActivity]-[1032] *M STOP *
  • Hi Rodrido,

    You will have to include uart_if.c in your project and remove the NOTERM predefine in Properties->Build->ARM Compiler->Predefined Symbols to see the terminal output.

    For v1.3, you also need to include the provisioning library. Make sure that

    #define SL_EXT_LIB_1        sl_Provisioning

    is included in your user.h. You may have to rebuild the simplelink library and update your included library link in your project.

    Best regards,

    Sarah

  • Hello, Sarah. Thank you for your answer.

    I've linked uart_if.c to the project and removed NOTERM. It compiles corerctly, however it goes into FaultISR when executing InitTerm()

    Do you know what can that be? I haven't changed anything from the example, and I've tried with a couple of launchpads.
  • Hi,

    Please add this code into pinmux.c:

    //
    // Enable Peripheral Clocks 
    //
    MAP_PRCMPeripheralClkEnable(PRCM_UARTA0, PRCM_RUN_MODE_CLK);
    //
    // Configure PIN_55 for UART0 UART0_TX
    //
    MAP_PinTypeUART(PIN_55, PIN_MODE_3);
    //
    // Configure PIN_57 for UART0 UART0_RX
    //
    MAP_PinTypeUART(PIN_57, PIN_MODE_3);

    Jan

  • Regarding SmartConfig, I've uncommented the define in user.h. Now testing with an iPhone AP. Same thing. Here's the log

    2017-03-22 15:05:20,158 INFO [smartconfig.MainActivity]-[1244] ***** Application Created *****
    2017-03-22 15:05:20,302 INFO [smartconfig.MainActivity]-[275] UDPBcastServer - restarted
    2017-03-22 15:05:20,309 INFO [utils.NetworkUtil]-[125] Network state: 1
    2017-03-22 15:05:20,488 INFO [utils.NetworkUtil]-[125] Network state: 1
    2017-03-22 15:05:20,502 INFO [smartconfig.NewSmartConfigFragment]-[2471] *SC* Start M scan
    2017-03-22 15:05:20,522 INFO [utils.NetworkUtil]-[125] Network state: 1
    2017-03-22 15:05:20,528 INFO [utils.NetworkUtil]-[125] Network state: 1
    2017-03-22 15:05:20,531 INFO [smartconfig.NewSmartConfigFragment]-[2471] *SC* Start M scan
    2017-03-22 15:05:21,068 INFO [utils.NetworkUtil]-[125] Network state: 1
    2017-03-22 15:05:21,077 INFO [smartconfig.NewSmartConfigFragment]-[1978] *SC* Currently connected via wifi to: "Ale’s iPhone" capabilities: [WPA2-PSK-CCMP][ESS]
    2017-03-22 15:05:30,821 INFO [smartconfig.NewSmartConfigFragment]-[1274] *SC* *** Starting SL device configuration in SC mode - "start configuration" button pressed ***
    2017-03-22 15:05:30,825 INFO [utils.NetworkUtil]-[125] Network state: 1
    2017-03-22 15:05:30,858 INFO [smartconfig.NewSmartConfigFragment]-[2483] *SC* Stop M scan
    2017-03-22 15:05:30,863 INFO [smartconfig.MainActivity]-[1032] *M STOP *
    2017-03-22 15:05:30,867 INFO [smartconfig.NewSmartConfigFragment]-[2116] *SC* Start smart config - already scanning for new SL devices
    2017-03-22 15:05:30,878 INFO [smartconfig.MainActivity]-[422] Stop mDNS discovery and clear devices and recent devices arrays and prefs
    2017-03-22 15:05:30,884 INFO [smartconfig.MainActivity]-[1032] *M STOP *
    2017-03-22 15:05:30,885 INFO [smartconfig.MainActivity]-[1038] Smartconf in action - on rx only
    2017-03-22 15:05:30,894 INFO [smartconfig.NewSmartConfigFragment]-[2146] *SC*
    *** Send
    Name: Dev-544
    Len: 7, Pass len: 8
    ***
    2017-03-22 15:05:30,898 INFO [smartconfig.NewSmartConfigFragment]-[2186] *SC* Broadcasting configuration information to network via SmartConfig
    2017-03-22 15:05:30,901 INFO [smartconfig.NewSmartConfigFragment]-[2260] *SC* smartConfigRunner ended
    2017-03-22 15:06:10,901 INFO [smartconfig.NewSmartConfigFragment]-[2197] *SC* running smartConfigRunner
    2017-03-22 15:06:17,431 INFO [smartconfig.NewSmartConfigFragment]-[2203] *SC* SmartConfig Broadcasting configuration information to network finished
    2017-03-22 15:06:17,435 INFO [utils.NetworkUtil]-[125] Network state: 1
    2017-03-22 15:06:17,438 INFO [smartconfig.NewSmartConfigFragment]-[2223] *SC* connected to network sent to SL device in profile to connect to - looking for new SL devices in the local network
    2017-03-22 15:06:17,441 INFO [smartconfig.NewSmartConfigFragment]-[2471] *SC* Start M scan
    2017-03-22 15:06:32,453 INFO [smartconfig.NewSmartConfigFragment]-[290] *SC* M scan completed, SL device was not found
    2017-03-22 15:06:32,454 INFO [smartconfig.NewSmartConfigFragment]-[498] *SC* Connecting to starting network "Ale’s iPhone"
    2017-03-22 15:06:32,456 INFO [smartconfig.NewSmartConfigFragment]-[297] *SC* No SL devices were found in "Ale’s iPhone", You can...
    2017-03-22 15:06:32,458 INFO [smartconfig.NewSmartConfigFragment]-[301] *SC* Since SL device was not found in the requested network - Allow user to manually choose SL device to connect to in order to obtain cfg verification from as AP
    2017-03-22 15:06:48,811 INFO [smartconfig.NewSmartConfigFragment]-[2483] *SC* Stop M scan
    2017-03-22 15:06:48,822 INFO [smartconfig.MainActivity]-[1032] *M STOP *
  • Thanks to Jan I could enable the console output on the 3200. This is what I get:

    Host Driver Version: 1.0.1.11
    Build Version 2.8.0.0.31.1.4.0.1.1.0.3.37
    Device is configured in default state
    Device started as STATION
    [WLAN EVENT] Unexpected event [0x3]

    I get the unexpected event the first time I run the configuration. The folowing times I get nothing. When I reset the cc3200 and run the configuration again, it's the same output.

    Any ideas?

  • Hi Rodrigo,

    You will have to rebuild the simplelink library and link to the new library in your project. Simply uncommenting the line will not build the library.

    Best regards,
    Sarah
  • Oops, sorry I missed that step. My bad.
    I've done it now. And I really made sure I'm linking against the newly built NON_OS simplelink.a with that define in user.h
    However I'm still getting nothing.
    0x3 if I try with the router network and nothing at all if I do it through the iPhone AP.

    What should I do?
    Thanks again for your answers.
  • Now I tried using the iPhone app and Android phone as an AP, just in case it had something to do with the app. Same behavior, no message on the console.
  • Hi Rodrigo,

    What do you mean with phone as an AP? Smart Config works by connecting the phone to an external AP such as a router, and then broadcasting that information to CC3200 devices nearby. Please be sure you are following the usage instructions: processors.wiki.ti.com/.../CC32xx_SmartConfig_Provisioning

    If this does not work with your router, please try with another one. As mentioned on the wiki, SmartConfig does not work with all APs. This is why a backup provisioning method is suggested. Does the option to choose device to configure appear once you start configuration?

    Unexpected events are okay and indicate the CC3200 has seen an event not handled in this example.

    Best regards,
    Sarah
  • Hi Sarah,

    I feel like I've been a bit confusing. Let me explain myself better. At first I tested with a proper router: Turning on the CC3200, connecting the phone to the wifi router, running the app, setting up network password, clicking Start Configuration. No luck.
    As I knew from the wiki that it might not work with some routers, I took some phones (not the one with the TI SmartConfig App) and set ithem up to share their internet connection. I said AP, but it's also known as hotspot, or tethering. It simply opens up a wifi access point and you can connect to it with any other device, basically a WiFi to LTE router. I used a Nexus 5X, an iPhone 6, a BLU R1 HD and a Motorola E2.
    I followed the same steps as before and still nothing.
    I find it hard to believe that neither of them are supported. But I'll grab more proper routers and give it a try again.

    I'll keep you posted.

    Thanks,
    Rodrigo
  • Hello again.

    So we realized every single router we were using was 802.11n and that was the problem. We switched one to 802.11g and we were finally able to get the configuration on the 3200.
    The console output read:
    [WLAN EVENT] Unexpected event [0x3]
    [WLAN EVENT] Unexpected event [0x3]
    [WLAN EVENT] STA Connected to the AP: WiFiRouter , BSSID: 0:18:39:6a:17:4f
    [NETAPP EVENT] IP Acquired: IP=192.168.1.110 , Gateway=192.168.1.1

    However, not everything went ok. After that step the phone is supposed to get a confirmation from the 3200, that the configuration went right. Almost, each and every time we got to the screeen which says "Getting conffirmation from simplelink device uri://192.168.1.110" and then we got the toast notification saying "Configuration failed (etc)". It's really strange that it gets the IP from the device but it's unable to realize it got configured correctly. What is more, the device shows up in the Devices tab and it's possible to access its configuration page with no problem.
    Let me add, that there were a couple of times when the app didn't get the new IP of the device even though it got configured, since it wouldn't show the "Getting configuration" message.

    I took an old 802.11a/b/g router just in case and the same thing happened.

    Do you know what's going on?

    Thanks in advance
  • Hi Rodrigo,

    We have seen issues with the current app not correctly seeing when then CC3200 has been configured successfully. You should use the UART print as the indicator of whether the configuration succeeded or not. You can also navigate to the given IP.

    SmartConfig should work with 802.11b/g/n routers, so that is unusual. Are you able to connect to these routers typically in Station mode?

    Another thing I should mention is if you are running this example with the debugger, you should be using the debug SimpleLink library. If you are flashing the example to the LaunchPad, this shouldn't matter.

    Best regards,
    Sarah