I've written ESP32 software that sends post request to an HTTP server using https protocol. Authentication and response succeeds fine-- as long as my Default Log Level (set via menuconfig) is set to INFO or DEBUG (may work for VERBOSE, but Idk). If I set default log level to WARN or ERROR the post negotiation never succeeds--my http handler only ever receives a HTTP_EVENT_DISCONNECTED event (I'm using printf() to print occurrence of any event).
The only difference is the default log level and using the https protocol. However, if I post using unsecured http protocol the request succeeds, regardless of default log level. As indicated below, esp_log_level_set() never seems to work (OK maybe I'm not using it right) even when I place the call in the module handling HTTP events.
Adding call to esp_log_level_set("*", ESP_LOG_INFO) in app_main() when default is set to ERROR still fails.
Adding call to esp_log_level_set("*", ESP_LOG_ERROR) in app_main() when default is set to INFO will result in successful negotiation, however still produces same output as INFO. So it appears that esp_log_level_set() has no effect.
As it stands now, I can only get https post requests to work if I set default log level to ERROR and INFO (probably VERBOSE too).
Please help me understand how I can fix this, the logging will probably affect my performance.
The source is too extensive to post to this forum.
Thanks
testing with a ESP32-DevKitC
ESP-IDF v4.4.1-dirty
ubuntu 20.04
setting CONFIG_LOG_DEFAULT_LEVEL less than INFO does not allow HTTPS connections
-
- Posts: 125
- Joined: Fri May 24, 2019 2:02 am
Re: setting CONFIG_LOG_DEFAULT_LEVEL less than INFO does not allow HTTPS connections
This is a late reply I know, but I see no one else replied. This issue may be caused by a race condition somewhere. Logging on slows things down and the race outcome is safe. Logging off and the race condition comes out in a bad way.
Who is online
Users browsing this forum: Bing [Bot] and 96 guests