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.

CC3235SF: httpget example has "send failed" error

Part Number: CC3235SF
Other Parts Discussed in Thread: SYSCONFIG

Hello,

We attempted completing the httpget example to fetch data from a server. Our network connection is succeeding and the server is getting the incoming request.

However, the client receives a "send failed" error, shown below.

We traced this back to where the error is checked and found the following.

Essentially, HTTPStr_VER1_1 is "HTTP/1.1" and is comparing with our buffer string, which resembles "GET / HTTP/1.1".

Is there some sort of configuration we've missed that's not in the README for the example? What could be causing this? When trying on a local server, it was receiving the request.

Thanks in advance for the help.

  • This query has been assigned to our SW expert.

  • Hi Jack, 

    I ran the demo and wasnt able to replicate the issue. What SDK version are you using? Did you do any other modifcations to the code other than 

    Best,

    Rogelio

  • Thank you for the response. We use SDK version 6.10.0.05 because we work as a group with both Mac & Windows users and we can't find a Mac version of the latest SDK. Attached is the zip file of the code we tried running (with network info redacted). We're using SYSCONFIG 1.16.1.
    httpget_CC3235S_LAUNCHXL_tirtos7_ticlang (1).zip
    Thanks again.

  • Really appreciate the response and work done so far--was wondering if there are any updates on this issue.

  • Hi Jack,

    I apologize for the delay, I will try to run your code sometime this week. Ill follow up by Friday.

    Best,

    Rogelio

  • Hey Rogelio,

    I am working with Jack on this project, and we are still at a loss for progress. I have 2 SDK versions that I've tested this with: both 6.10.0.05 and 7.10.0.13. Both httpget examples are throwing the exact same error when attempting to send the HTTP GET request. The same error mentioned above in the original post: -3003.

    I have also tried using different SYSCFG versions with no luck there either (didn't think that would be the issue, but tested just to be safe.)

    Please let me know when you are able to confirm there are no issues with the code we shared above. I don't know why these examples wouldn't be working out of the box on the newest SDK version.

    Greg

  • Hi Greg,

    I am not expert to TI http client library, but information at first post does not make sense. Code at first post is parsing http response from server and string "GET / HTTP/1.1" at http response does not make sense. Http response can't look like that. Did you use JTAG and debug to determine what is going on?

    Jan

  • Hey Jan,

    We have been using the JTAG to debug during this whole process. This is what we see going on in the example:

    - The code calls HTTPClient_sendRequest() in line 92 of the httpget.c file in the example.

    - This function then calls sendRequest() inside of it.

    - Inside of sendRequest() in the httpclient.c source file, the function getStatus() is called, where the -3003 error comes from. 

    The only thing that could be returning -3003 inside the getStatus() function is the code that we attached above. I am confused, is this point in the code still evaluating the request before even sending it? I've attached an image below of what the client struct looks like when I am inside of getStatus() before it returns with -3003.

  • Hi,

    How are set pointers validBufStart and validBufEnd at return HTTPClient_ERESPONSEINVALID?

    Jan

  • Hey,

    I stopped the debug process at this breakpoint right here.

    And here is what the client struct looks like.

    I believe this should mean the string comparison would always fail since GET would be compared with the HTTP version.

    Greg

  • Hi Greg,

    According source code of httpclient.c it does not make sense what you see. Can you disable optimisation of compiler? Can you capture raw network communication using Wireshark or tcpdump?

    According state of validBufStart and validBufEnd pointer, return value ret from call SlNetSock_recv() should be 255. But value of ret is not available (likely was optimised out). It looks like receive function SlNetSock_recv() was never called. Without deeper digging into your code is hard to say what can be wrong. Unfortunately I haven't enough time do this. Maybe TI support can do this.

    Jan

  • Any support from TI would be appreciated! We tried setting optimization level to 0, but this still resulted in the same error. We also confirmed in debugging that SlNetSock_recv is called. Is it possible for someone else to try running our example code attached in the third reply?

  • Hi,

    Was you able capture network communication using Wireshark or tcpdump?

    Jan