Guru meditation error when using esp_http_client_init

Zingemneire
Posts: 68
Joined: Tue Apr 17, 2018 7:35 am

Guru meditation error when using esp_http_client_init

Postby Zingemneire » Fri Oct 26, 2018 1:20 pm

Hi,

This is a summary of what I am trying to do:

Code: Select all

          esp_http_client_handle_t httpClient;

         clientConfig.url            = httpServerFirmwareUrl;
         clientConfig.host           = HttpServerIpString;
         clientConfig.port           = httpServerPortNumber;
         clientConfig.method         = HTTP_METHOD_GET;
         clientConfig.transport_type = HTTP_TRANSPORT_OVER_TCP;
         clientConfig.buffer_size    = MAX_FIRMWARE_BLOCK_SIZE;
         clientConfig.event_handler  = Http_OtaClientEventHandler;
         httpClient                  = NULL;
         httpClient                  = esp_http_client_init ( &clientConfig );
All of the various values are strings, numbers, or pointers which have been initialised correctly but I keep getting "guru meditation error" whenever I use "esp_http_client_init".

The purpose is to try and establish an HTTP ( not HTTPS) connection to transfer data.

Any one have any suggestions as to what I am doing wrong?

Zingemneire
Posts: 68
Joined: Tue Apr 17, 2018 7:35 am

Re: Guru meditation error when using esp_http_client_init

Postby Zingemneire » Tue Oct 30, 2018 1:48 pm

Hi,

I have figured it out: the way to solve it is to add a bit more initialisation data.

Adding this:

Code: Select all

         clientConfig.path           = "/";
         clientConfig.username       = "";
         clientConfig.password       = "";
         clientConfig.query          = "";
Does the trick. It looks like some of the normal fallbacks to default values don't quite cut it.
Anyway: add the four items above and things are up and running.

Who is online

Users browsing this forum: aliarifat794 and 95 guests