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.

Mobile Device Connectivity

Other Parts Discussed in Thread: CC3200

I have the cc3200 and I'm trying to figure out a way to change parameters on the cc3200, like turn on an LED or change the SSID  from a mobile device. 

I've read the documents on HTTP server and the GET and POST, but this seems to relies on having an embedded wed page that has tokens.   I would like to send an HTTP POST command and in the body of the request have a command that the cc3200 interprets as a command.  The flow would be like this:

1) cc3200 goes into AP mode

2) Mobile device connects to cc3200

3)Mobile device send HTTP POST request and in the body has a string that says "Turn ON LED"

4)cc3200 receives this string and turns on the LED.

No embedded web pages involved.   Can this be done?   if not by HTTP, can using the UDP or TCP be used. 

I would also use this to GET data from the cc3200 upon request. 

  • Hi Jeff,

    Is your limitation with using a web page? If not web page, you can achieve this using a text file in the serial flash as well.
    If this is UDP/TCP based, then this exchange would depend on the custom packet types that you define on top of TCP/UDP.

    Regards,
    Raghavendra
  • Please explain how to use the Text file or guide me to an example?
  • A few more question around this:
    1) what is the Max data length for a POST Token name and value. I would like to do the following:

    "__SL_P_UMyPOST=(some json string)"

    in other words

    EventData.httpPostData.token_value.len <--what is the Max size and where does it define this?
    and
    EventData.httpPostData.token_name.len <--what is the Max size and where does it define this?

    2) is the only way to trigger a SimpleLinkHttpServerCallback event is by tokens?
    3)Still would like to know how to implement the text file method
  • Hi Jeff,

    I will request you to refer to chapter 12 of programmers guide to get the details on the HTTP server. www.ti.com/.../swru368.pdf

    To answer your specific question:
    1) The Post token should be in format '__SL_P_UXX' Where XX can be any character and the token value should be <= 64.

    2) When ever device receives a HTTP Token which doesn't belong to predefined token, SimpleLinkHttpServerCallback event is triggered. (Please refer to existing example).

    3) For using post token you don't need any text. you can send a HTTP post request with a token and value. If you want to use get token you will need a file (can be text) flashed in the serial flash of device which will contain the get token/s. when this file is requested by the HTTP client these get tokens will be replaced by the corresponding values during the response of the get request.

    Regards,
    Ankur