-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Compile this with ESPIDF v4.2.1 instead of v4.4 #5176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @calkoe, @david-cermak will take a look on this. He is develpor of MQTT. |
Some Additional Error Details: This is the Error Message i receive:
As mentioned in the vanilla 4.2.1 IDF my code works perfectly fine. This is how i use the MQTT Library: config.user_context = this;
config.uri = uri.c_str();
config.client_id = "MyClientID";
client = esp_mqtt_client_init(&config);
esp_mqtt_client_register_event(client, (esp_mqtt_event_id_t)ESP_EVENT_ANY_ID, mqtt_event_handler, NULL);
esp_mqtt_client_start(client); |
@calkoe You have to supply server's certificate (or a cert bundle, ca-store or some other means of verification). One of the changes in idf
in the long running effort of discouraging insecure connections or defaulting to insecure if config option missed. An alternative (for IDF users) is to explicitly configure:
|
Thanks for the answer. Ok thanks bad news for me. I want to use this in my local Network with self-signed Certificates that might be change. I know the CONFIG_ESP_TLS_INSECURE and CONFIG_ESP_TLS_SKIP_SERVER_CERT_VERIFY but unfortunately they have no effect in the precompiled arduino-esp32-framework. It would be awesome to set the skip_server_verify in the esp_mqtt_client_config_t |
@david-cermak |
@calkoe The ESP-IDF should not crash on such errors. If you see this could you please report the use-case with the exact steps to reproduce? The expected behaviour is raising a
Please note that, it's possible to check the above errors programmatially and have your app take appropriate reaction. About the alternatives:
If you're planning on using self signed certificates, would the There're more alternatives, like PSK method, CA-bundle or CA-store, which could be used also in the local network. About the I think this is a valid feature request, although I believe that we'd still like to recommend having at least the |
I'm not able to reproduce the Crash with the latest version or #2.0.0-alpha1. I've managed to update the CA Certificate via a MQTT Message and store it in the NVS, i think this is the way to go.
|
And (for IDF users)you need to make changes in file "sdkconfig" in root directory of your project |
Hello,
is there a way to compile this Framework with the latest stable ESPIDF 4.2.1 ?
Unfortunately some Espressif Libraries have still some Bugs in the current used ESPIDF 4.4 like the MQTT-Library.
I currently not able use the Arduino Framework, ESPIDF 4.x features and Espressifs MQTT-Library together.
Thanks for the Support!
The text was updated successfully, but these errors were encountered: