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: User token getting modified in web server callback while fetching from html file

Part Number: CC3200
Other Parts Discussed in Thread: UNIFLASH,

Hello,

I am trying to upgrade old SDK to latest SDK 1.5 but facing problem in  ( void SimpleLinkHttpServerCallback(SlHttpServerEvent_t *pSlHttpServerEvent, SlHttpServerResponse_t *pSlHttpServerResponse) )  callback.

pSlHttpServerEvent data getting modified from 10 character to 12 character. I have tested html file in browser it working fine and gets token correctly.

Same html code works fine with older SDK and data coming in gets event are perfect. So what could be the possible reason for data getting modified when callback invoked? Is there any dependency file for SimpleLinkHttpServerCallback where i can look?

Any help will be appreciated.

Thank you.

  • hello,

    i have tested oob example and when i prints http server get event data, it prints more character than 10, so far now i am not concentrating on get event data because comparison happening only for 10 character as length is 10. Correct me if i am wrong.

    Its seems in my project server response is too slow and when i inspect web page found that net::ERR_CONNECTION_TIMED_OUT while loading .css and js file.

    I could not figure out why connection time out is happening and could not load css and js file? I have tested same html file by opening in browser there is loads file without any delay.

    Could anyone point me in correct direction where things going wrong?

    Thank you.

  • Hi,

    Event data are not a null terminated string. You need to terminate data by 0x00 if you want to use printf().

    Jan

  • Hello Jan,

    Let forget about the token, We am facing another problem while loading the resource of html which are .css file and .js file

    When i inspect web page found net::ERR_CONNECTION_TIMED_OUT. What could be possible reason for connection time out?

    Thank you.

    Taufeeq.

  • Please check the "out_of_box" example that uses of .css and .js (in its uniflash project).

    In the OOB example, you'll find the "uniflash" folder that includes zip files which can be imported by Uniflash/ImageCreator.

    If you check the user files - you will see the .html, .js, and .css (under www/).

    You can download ("get file") for example for "/www/demo.html" and check how it uses the .js and .css files.

    I can't explain the timeout so i guess something is wrong in the way you use this.

  • Hi Taufeeq,

    I think reason of timeout issue is not properly implemented hander for user tokens. You should test your html code with external .js and .ccs files without any user token (inside html file). I suppose that at this configuration will all work properly.

    CC3200 have single socket http server. If your code not properly server user tokens it cause timeout error during serving user tokens. And this cause consequence timeout error during reading other files (.js, .ccs). This is like a snowball effect. One error inside your code cause multiple additional errors.

    Jan

  • hello Jan,

    I am using latest SDK 1.5 when compiling Simplelink IAR project which already created in ewarm directory,  there is issue net driver initialization gets failed and library size getting reduced compared to the original one which is already there in SDK.

    If that project have been compiled then library size should be same because i am not making any changes. Am i correct?

    If i am using provided library which comes with SDK then i don't face any problem.

    Could you compile simplelink project and test simplelink.a  OS library and check if you are facing same problem or not? if not then try to change mode from STA to AP then test it. My suspect simplelink library is causing problem to http server not sure.

    I have already tested html code with latest version of SDK with existing library, everything works fine, so i don't suspect any issue with html code( .jss / .css).

    Thank you.

  • Have you made changes in the "simplelink.a".

    It is not clear why you are building it.

    Br,

    Kobi

  • Hi,

    Sorry, I haven't available IAR and from this reason I am not able test it.

    Jan

  • hello Kobi,

    I do not have any major reason for building all library from source for now but my client needs all source and library intact which can be modified if required. It's about production so we can't take chances.

    Please test it if possible and share observation.

    Thank you.

    Taufeeq

  • hello kobi/Jan,

    I just want to inform you, the person who worked on upgrading SDK made mistake and mixed older project with new one. I took fresh source from SDK 1.5 and build library without making any change, everything works fine. There is no problem with simplink.a / IAR project in SDK 1.5. 

    Thank you.

    Taufeeq.

  • Hi Taufeeq,

    Thanks for the update.

    Br,

    Kobi