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
  • Do you call nx_web_http_client_connect :-

    or nx_web_http_client_secure_connect :-

    before calling nx_web_http_client_request_initialize() and nx_web_http_client_request_send()?

  • 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

Reply
  • 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

Children