nx_web_http_client_request_send() returns always NX_NOT_BOUND (0x24)

hello to all,


I try to send a GET request to a HTTP/1.1 server, port =8080

For this I use the web_http framework under SSPv1.7.8

The nx_web_http_client_request_initialize sequence goes well, but the nx_web_http_client_request_send always returns NX_NOT_BOUND...he

Before, I send a PING sequence and the send is OK.

The port is 8080 and the URL is a call to an application which must return a JASON file:

Below is an extract of my code directly inspired by the Web documentation Hypertext Transfer Protocol (HTTP) and Hypertext Transfer Protocol Secure (HTTPS) User Guide dated Feb 03 2020, page 97:

  

with : WIFI_MYGETRESSOURCE="/Myapi/v1.00/form-data" and WIFI_HOST="192.168.43.1:8080"

Here is the log obtained:

Thanks in advance for your help.

Eric

Parents Reply Children
  • Hi Jeremy,

    In fact I used to call it, before initialize, but I don't know why it remains blocking despite the fact that I programmed a timout.
    I had deduced that it was perhaps useless because I had put "Autoinitalization" in the BSP ...

    Here is the writing of the call of the nx_web_http_client_connect() function :

    I didn't investigate more than that about this problem... Why doesn't the timeout work?

    Best Regards,

    Eric

  • Auto initialization means the generated initialisation function, web_http_client_init0() will be called, and that function is :-

    void web_http_client_init0(void)
    {
        UINT g_web_http_client0_err;
        /* Create HTTP Client. */
        g_web_http_client0_err = nx_web_http_client_create (&g_web_http_client0, "g_web_http_client0 HTTP Client", &g_ip0,
                                                            &g_packet_pool1, 1024);
        if (NX_SUCCESS != g_web_http_client0_err)
        {
            g_web_http_client0_err_callback ((void *) &g_web_http_client0, &g_web_http_client0_err);
        }
    }

    so it will only create the HTTP client, you still need to call nx_web_http_client_connect().

    You are using port 8080, port 8080 sometimes is used for a HTTP proxy server, are you trying to connect via a proxy server?

  • Thank you Jeremy for spending time again for my help!

    In fact, the server I'm connecting to is a Mobile application made by a third party company for my client.
    They are stingy with information...
    They just gave me an example of how to use it to retrieve the JASON form.
    I can do it with a Java application "NetTool" from a computer I get the form.

    It is quite possible that the server is a Proxy type.

    The connect function blocks here, in nx_web_http_client.c :

    Best Regards,

    Eric

  • Is it HTTP or HTTPS protocol, have you captured a wireshark trace of the connection that works, and one that doesn't?

  • HTTP /1.1

    I have the trace of the one that works with the computer:

    I don't have a capture with the S7 application...

    Eric

  • Hello,

    has anyone had the same problem as me, a block in the nx_web_http_client_connect function?
    Why does the timeout not work?

    Could this be due to a problem with the level of access to the HTTP Server application of the mobile, (android7)?
    It is a HTTP communication without TLS.

    If I scan the Wifi network that the Mobile is accessing with Wireshark I don't see any communication between my application and the mobile, despite the ping going well.

    Thanks for your help.

  • Hi Eric-

    Any update on your issue? Did you find a solution already or do you still need help?

  • Hi Eric-

    Since I don't see a rely we will assume you solved your issue. Feel free to post back if I'm incorrect.

  • Hi Warren, sorry I didn't see your message...
    Yes I solved this problem, but without understanding the real problem. I just increased the memory of packets in Pool, (16x1568 -> 30x1024). But according to my calculations it should be enough originally... Perhaps the organization? 1568 bytes...

    Now I have another problem that I posted on another thread. A problem with the restart of the thread that drives my nx_web_http_client framework... I still don't have an answer yet.

    Best Regards,

    Eric