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: Is it possible to implement http server example in non-OS environment and without VCC-P58 jumper ?

Part Number: CC3200

I am using http server / oob example of cc3200 and the set up webpage of mysimplelink.net where the device comes as http server in AP mode first then user connects to it and goes to the webpage enter the Wi-Fi  router connectivity credentials  so the next time when the device is in station mode it should get connected to the router. I flashed the respective ucf and .bin files but every time of resetting the device, I have to remove/place the VCC-P58 jumper.

1) The http server example and oob example, both are freeRTOS based. I want to change them in non-OS environment. How can I do this?

2) In both examples, How to bring the device as HTTP Server in AP -mode without having jumper on VCC-P58( No force AP jumper). So when user enters the SSID and password and priority on webpage the device will go into station mode and connect to the entered Wi-Fi router(as there is no jumper on VCC-P58)

Thanks.

  • Hi Techinspired,

    1. You would have to remove all the thread-based logic and implement some sort of scheduling yourself in a main while(1) loop. Take a look at the nonos variant of ota_update for an example of how this could be done. Note that the nonos example essentially recreates a task scheduler in its code.

    2. You could make a few edits to the HTTP server example to support the desired behavior. The first thing you would want to do is to get rid of the ConfigureSimpleLinkToDefaultState() call in the HTTPServerTask. This allows provisioning to persist on reset. Next, you would want to have some logic in ConnectToNetwork() that would put you into STA mode by default (regardless of VCC jumper) and then switch back into AP mode upon a connection timeout. The code currently makes the program wait for smart config provisioning if it cannot connect to a configured AP when in STA mode, but you should be able to follow the switch-to-AP-mode settings in ConnectToNetwork() and then execute the AP config steps to get to your desired behavior.

    Regards,
    Michael
  • Hi Michael,

    Thanks for your reply!

    1)How can I set a connection timeout parameter when the device is in Station mode?

    Best Regards,
    Techinspired
  • Hi Techinspired,

    There isn't a direct way to set a timeout for the auto connect, but there are a variety of methods to check for timeout. You can use a hardware timer that you can set to interrupt when a certain number of system ticks is reached, you could use a software timer that you can check periodically, or you could do what the HTTP example does and have a simple loop where you increment a variable every iteration of the loop and see if you have hit a defined timeout value:

    //waiting for the device to Auto Connect
    		while ( (!IS_IP_ACQUIRED(g_ulStatus))&&
    			   g_ucConnectTimeout < AUTO_CONNECTION_TIMEOUT_COUNT)
    		{
    			//Turn RED LED On
    			GPIO_IF_LedOn(MCU_RED_LED_GPIO);
    			osi_Sleep(50);
    
    			//Turn RED LED Off
    			GPIO_IF_LedOff(MCU_RED_LED_GPIO);
    			osi_Sleep(50);
    
    			g_ucConnectTimeout++;
    		}

    Regards,

    Michael