ESP32-WROOM运行esp-idf例程simple_ota_example http连接失败?

butterfly
Posts: 13
Joined: Thu Sep 23, 2021 5:45 am

ESP32-WROOM运行esp-idf例程simple_ota_example http连接失败?

Postby butterfly » Tue Oct 12, 2021 8:14 am

您好!
准备先使用例程先测试一下再移植该例程,wifi连接上后,http连接失败,打印信息如下:

Code: Select all

I (880) wifi:mode : sta (7c:9e:bd:39:0d:7c)
I (880) wifi:enable tsf
I (890) example_connect: Waiting for IP(s)
I (2940) wifi:new:<6,2>, old:<1,0>, ap:<255,255>, sta:<6,2>, prof:1
I (3670) wifi:state: init -> auth (b0)
I (3690) wifi:state: auth -> assoc (0)
I (3720) wifi:state: assoc -> run (10)
I (3730) wifi:connected with E880-IR01, aid = 3, channel 6, 40D, bssid = 54:75:95:2d:6c:26
I (3730) wifi:security: WPA2-PSK, phy: bgn, rssi: -45
I (3730) wifi:pm start, type: 1

W (3750) wifi:<ba-add>idx:0 (ifx:0, 54:75:95:2d:6c:26), tid:0, ssn:0, winSize:64
I (3800) wifi:AP's beacon interval = 102400 us, DTIM period = 1
I (4670) esp_netif_handlers: example_connect: sta ip: 192.168.1.192, mask: 255.255.255.0, gw: 192.168.1.1
I (4670) example_connect: Got IPv4 event: Interface "example_connect: sta" address: 192.168.1.192
I (5670) example_connect: Got IPv6 event: Interface "example_connect: sta" address: fe80:0000:0000:0000:7e9e:bdff:fe39:0d7c, type: ESP_IP6_ADDR_IS_LINK_LOCAL
I (5670) example_connect: Connected to example_connect: sta
I (5680) example_connect: - IPv4 address: 192.168.1.192
I (5680) example_connect: - IPv6 address: fe80:0000:0000:0000:7e9e:bdff:fe39:0d7c, type: ESP_IP6_ADDR_IS_LINK_LOCAL
I (5690) wifi:Set ps type: 0

E (6060) esp-tls-mbedtls: mbedtls_ssl_handshake returned -0x2700
I (6070) esp-tls-mbedtls: Failed to verify peer certificate!
E (6070) esp-tls: Failed to open new connection
E (6070) TRANSPORT_BASE: Failed to open a new connection
E (6080) HTTP_CLIENT: Connection failed, sock < 0
E (6080) esp_https_ota: Failed to open HTTP connection: ESP_ERR_HTTP_CONNECT
E (6090) esp_https_ota: Failed to establish HTTP connection
E (6100) simple_ota_example: Firmware upgrade failed
http server测试是运行正常的,但是之前玩http clent没有用过tls-mbedtls,这个问题该如何处理?请指点迷津,谢谢您!

ESP_LJY
Posts: 58
Joined: Mon Sep 27, 2021 3:06 am

Re: ESP32-WROOM运行esp-idf例程simple_ota_example http连接失败?

Postby ESP_LJY » Tue Oct 12, 2021 10:17 am

错误提示:无法验证对端证书。
参考 examples/system/ota/README.md 中 Run HTTPS Server,创建 server 端自签名证书

Who is online

Users browsing this forum: No registered users and 97 guests