cant accept path in ota example
-
- Posts: 132
- Joined: Tue Aug 14, 2018 6:21 am
- Location: India
cant accept path in ota example
Hi,
I am trying to use ota example. in path of ota example if I give path like "example.com:2233/take/ota.bin", it cant connect to server.
please help me out for the problem.
I am trying to use ota example. in path of ota example if I give path like "example.com:2233/take/ota.bin", it cant connect to server.
please help me out for the problem.
--
Somesh Burkule
Somesh Burkule
Re: cant accept path in ota example
"https://example.com:2233/take/ota.bin"
If you are using esp_https_ota, then you need "https" and a certificate. Or you can comment out the checks and use http.
John A
If you are using esp_https_ota, then you need "https" and a certificate. Or you can comment out the checks and use http.
John A
-
- Posts: 132
- Joined: Tue Aug 14, 2018 6:21 am
- Location: India
Re: cant accept path in ota example
Problem solved. I used dns_gethostbyname() api in my code and passes "example.com" to it. it returns ip address.fly135 wrote:"https://example.com:2233/take/ota.bin"
If you are using esp_https_ota, then you need "https" and a certificate. Or you can comment out the checks and use http.
John A
--
Somesh Burkule
Somesh Burkule
Re: cant accept path in ota example
OK, so it appears that you are not using the latest esp_https_ota code in the IDF.
John A
John A
-
- Posts: 33
- Joined: Wed Mar 28, 2018 6:58 am
Re: cant accept path in ota example
Good morning I would like to know how to turn off the check of servers certifications. I'm using ESP-WROVER-KIT v3 eval board**"https://example.com:2233/take/ota.bin"
If you are using esp_https_ota, then you need "https" and a certificate. Or you can comment out the checks and use http.
John A
I've tryied to NULL .cert_pem value in cfg struct or comment out the .cert_pem line.
Code: Select all
esp_http_client_config_t config = {
.url = CONFIG_FIRMWARE_UPGRADE_URL,
//.cert_pem = NULL, //(char *)server_cert_pem_start,
.event_handler = _http_event_handler,
};
I believe if I turn off the certification check I will be able to use the esp_https_ota command from an http connection.
The url that I'm trying to connect is: http://www.go-on.gr/scripts/updates/hello-world.bin
Regards, Kostas.
- Attachments
-
- https_cert_problem.png (5.15 KiB) Viewed 10907 times
Re: cant accept path in ota example
If i remember this message means that you have turned off https in menuconfig->ESP http client.
Re: cant accept path in ota example
In $IDF_PATH/components/esp_https_ota/src/esp_https_ota.c, function esp_https_ota...
and for HTTP instead of HTTPS....
Comment out the "return ESP_FAIL;"
John A
Code: Select all
if (!config->cert_pem) {
ESP_LOGE(TAG, "Server certificate not found in esp_http_client config");
return ESP_FAIL;
}
Code: Select all
if (esp_http_client_get_transport_type(client) != HTTP_TRANSPORT_OVER_SSL) {
ESP_LOGE(TAG, "Transport is not over HTTPS");
return ESP_FAIL;
}
John A
-
- Posts: 33
- Joined: Wed Mar 28, 2018 6:58 am
Re: cant accept path in ota example
Thank you for your answer John.
Best regards, Kostas.
Best regards, Kostas.
-
- Posts: 132
- Joined: Tue Aug 14, 2018 6:21 am
- Location: India
Re: cant accept path in ota example
hi,
I am using dns_gethostbyname() api to resolve IP. but it takes too much time to get ip.
what will be the problem.
--
Somesh Burkule
Somesh Burkule
-
- Posts: 33
- Joined: Wed Mar 28, 2018 6:58 am
Re: cant accept path in ota example
Hello burkulesomesh43.
I think there is no need to use "dns_gethostbyname() api to resolve IP" . I'm using directly the url of the path and I have success in downloading the OTA just fine. For example .url= "https://example.com/take/ota.bin"
If CA cert pem files and all other stuff are ok, I don't think that you will anticipate any problem.
Regards, Kostas.
I think there is no need to use "dns_gethostbyname() api to resolve IP" . I'm using directly the url of the path and I have success in downloading the OTA just fine. For example .url= "https://example.com/take/ota.bin"
If CA cert pem files and all other stuff are ok, I don't think that you will anticipate any problem.
Regards, Kostas.
Who is online
Users browsing this forum: No registered users and 143 guests