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-LAUNCHXL: httpserver example app does not connect in STA mode

Part Number: CC3200-LAUNCHXL
Other Parts Discussed in Thread: CC3200

Hello,

I run oob first in AP mode:

*************************************************
CC3200 Out of Box Application
*************************************************

Manufacturer ID: 0x5449
Device ID: 0x67
Configuration register value: 0x7480
CHIP ID: 0xf8
[NETAPP EVENT] IP Acquired: IP=192.168.1.1 , Gateway=192.168.1.1

Connect to : 'mysimplelink-CB8462'

[WLAN EVENT] Station connected to device

************************

then entered the configuration for my LAN, remover the jumper and it connected in STA mode.

*************************************************
CC3200 Out of Box Application
*************************************************

Manufacturer ID: 0x5449

Device ID: 0x67
Configuration register value: 0x7480
CHIP ID: 0xf8
[NETAPP EVENT] IP Acquired: IP=192.168.1.1 , Gateway=192.168.1.1
[WLAN EVENT] Device Connected to the AP: XXXXXX , BSSID: xx:xx:xx:xx:xx:xx
[NETAPP EVENT] IP Acquired: IP=192.168.1.xxx , Gateway=192.168.1.xxx

****************************************

I then flashed the httpserver example and it runs on AP mode:

*************************************************
CC3200 HTTP Server Application
*************************************************

Host Driver Version: 1.0.1.6

Build Version 2.11.0.1.31.1.5.0.2.1.0.3.37
Device is configured in default state

Device is in AP Mode, Please Connect to AP [mysimplelink-CB8462] andtype [mysimplelink.net] in the browser
Use Smart Config Application to configure the device.

*********************************

I do the same configuration for my LAN, but it does not connect. Instead it goes to the default configuration:

*************************************************
CC3200 HTTP Server Application
*************************************************

Host Driver Version: 1.0.1.6
Build Version 2.11.0.1.31.1.5.0.2.1.0.3.37
Device is configured in default state
Use Smart Config Application to configure the device.

*******************************************

I am expecting the same behavior with respect to AP or STA operating modes on both oob and httpserver examples. It seems that the device fails to connect to the LAN when in station mode and it goes to the default configuration.

This is the bit of MAIN code that ells me that the LAN connection in STA mode times out:

//Couldn't connect Using Auto Profile
if(g_ucConnectTimeout == AUTO_CONNECTION_TIMEOUT_COUNT)
{
//Blink Red LED to Indicate Connection Error
GPIO_IF_LedOn(MCU_RED_LED_GPIO);

CLR_STATUS_BIT_ALL(g_ulStatus);

Report("Use Smart Config Application to configure the device.\n\r");
//Connect Using Smart Config
lRetVal = SmartConfigConnect();
ASSERT_ON_ERROR(lRetVal);

//Waiting for the device to Auto Connect
while(!IS_IP_ACQUIRED(g_ulStatus))
{
MAP_UtilsDelay(500);
}

}
//Turn RED LED Off
GPIO_IF_LedOff(MCU_RED_LED_GPIO);
UART_PRINT("\n\rDevice is in STA Mode, Connect to the AP[%s] and type"
"IP address [%d.%d.%d.%d] in the browser \n\r",g_ucConnectionSSID,
SL_IPV4_BYTE(g_uiIpAddress,3),SL_IPV4_BYTE(g_uiIpAddress,2),
SL_IPV4_BYTE(g_uiIpAddress,1),SL_IPV4_BYTE(g_uiIpAddress,0));

}
return SUCCESS;

****************************************

oob works like a charm! Could you tell me what is wrong with httpserver?

 

Thanks,

 

Ramon

  • Hi Ramon,

    The httpserver example is not implemented the same way as the Out of Box. If you look at the readme, you can either connect to the CC3200 as an AP and interact that way, or you can configure using SmartConfig. It's not implemented to connect to a profile added from the HTML page like the Out of Box does.

    The httpserver example deletes all saved profiles on start up (in the ConfigureSimpleLinkToDefaultState function, line 783). This would not work with the HTML page since you must restart the CC3200 to connect once you add the profile (with the auto connect policy enabled). Try removing this command.

    The decision to start in AP or station mode is also part of the application code. It's not a native part of the CC3200. You can see the httpserver example check for the input on pin 58 in ReadDeviceConfiguration().

    Best regards,
    Sarah

  • Thank you Sara. I was getting to realize this from the code when I received you reply. This has been helpful.