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.

CC3135: Wi-Fi forum

Part Number: CC3135
Other Parts Discussed in Thread: MSP432E401Y, CC3100, CC3200

Hello,

I use a CC3135 with a MSP432E401Y. I want to have a simple html page which would be contained in CC3135. In this page I use User Token like "__SL_G_U11". But it doesn't work.

During the execution, I never go in the callbalck : 

SimpleLinkHttpServerCallback(SlNetAppHttpServerEvent_t *pHttpEvent,

                                  SlNetAppHttpServerResponse_t *pHttpResponse)

Do you have any idea why please.

Tharick

  • Hi Tharick,

    Host user tokens were used for the HTTP server in our Gen 1 devices (CC3100 and CC3200), but the tokens are legacy in our latest devices, including CC3135. CC3135 supports RESTful APIs instead. This is described in section 9.4 of the CC3x20, CC3x3x NWP Programmer's Guide, and they are used in the rest of the HTTP Server snippets in the guide. The event handler for the RESTful APIs is SimpleLinkNetAppRequestEventHandler. You can find sample code for this in the SimpleLink Academy Portable + Wi-Fi lab (the lab is for CC3235, but source code and steps are very similar).

    There is a legacy event handler in the CC3135 host driver for host tokens, but the name is changed to SimpleLinkHttpServerEventHandler. There are other changes from the Gen 1 host driver as well. Unless you are migrating from a custom CC3100 application, I suggest you use RESTful APIs instead of host tokens.

    Best regards,

    Sarah

  • Hi Sarah,

    Thanks for your answer.

    However we are a bit confused.

    You explain that Tokens are legacy and that we should use RESTful API instead as per section 9.4 of the Programmer's guide. When we look at chapter 9.4 named RESTful API Processing this only speaks about tokens...

    So could you please clarify your answer.

    Kind regards.

    Tharick

  • Hi Tharick,

    Apologies, you are correct that section 9.4 discusses the device tokens. These device tokens are useful because they are resources that can be handled by the network processor without waking the host MCU.

    For requests that do need to interface with the host, see section 9.7 Host HTTP Requests Processing.

    Best regards,

    Sarah