请教关于IDF5.0和5.1里面wifi-provisioning配置失败的问题

xucd2021
Posts: 5
Joined: Sat Mar 20, 2021 4:20 am

请教关于IDF5.0和5.1里面wifi-provisioning配置失败的问题

Postby xucd2021 » Sat Nov 05, 2022 6:32 am

之前为解决wifi重启出现pll_cap_ext 10的问题,更新了IDF版本,看github上有5.0,更新后发现wifi-provisioning有问题,于是再更新5.1,也还是同样的问题。

使用esp-idf\examples\provisioning\wifi_prov_mgr这个例程,配网失败。
menuconfig 里面相关配置如下

Code: Select all

# Example Configuration
#
CONFIG_EXAMPLE_PROV_TRANSPORT_BLE=y
# CONFIG_EXAMPLE_PROV_TRANSPORT_SOFTAP is not set
# CONFIG_EXAMPLE_PROV_SECURITY_VERSION_1 is not set
CONFIG_EXAMPLE_PROV_SECURITY_VERSION_2=y
CONFIG_EXAMPLE_PROV_SEC2_DEV_MODE=y
# CONFIG_EXAMPLE_PROV_SEC2_PROD_MODE is not set
CONFIG_EXAMPLE_PROV_TRANSPORT=1
CONFIG_EXAMPLE_RESET_PROVISIONED=y
CONFIG_EXAMPLE_RESET_PROV_MGR_ON_FAILURE=y
CONFIG_EXAMPLE_PROV_MGR_MAX_RETRY_CNT=5
# CONFIG_EXAMPLE_PROV_SHOW_QR is not set
# CONFIG_EXAMPLE_REPROVISIONING is not set
# end of Example Configuration

# Wi-Fi Provisioning Manager
#
CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16
CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30
CONFIG_WIFI_PROV_BLE_BONDING=y
CONFIG_WIFI_PROV_BLE_SEC_CONN=y
CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION=y
# CONFIG_WIFI_PROV_KEEP_BLE_ON_AFTER_PROV is not set
# end of Wi-Fi Provisioning Manager


打印日志如下

Code: Select all

I (623) wifi_prov_scheme_ble: BT memory released
I (643) app: Starting provisioning
I (653) BT_INIT: BT controller compile version [76c24c9]
I (653) phy_init: phy_version 503,13653eb,Jun  1 2022,17:47:08
I (693) BT_INIT: Bluetooth MAC: f4:12:fa:e0:b5:c2

I (693) protocomm_nimble: BLE Host Task Started
I (703) NimBLE: GAP procedure initiated: stop advertising.

I (703) NimBLE: GAP procedure initiated: advertise;
I (703) NimBLE: disc_mode=2
I (713) NimBLE:  adv_channel_map=0 own_addr_type=0 adv_filter_policy=0 adv_itvl_min=256 adv_itvl_max=256
I (723) NimBLE:

I (723) wifi_prov_mgr: Provisioning started with service name : PROV_E0B5C0
I (733) app: Provisioning started
I (733) app: If QR code is not visible, copy paste the below URL in a browser.
https://espressif.github.io/esp-jumpstart/qrcode.html?data={"ver":"v1","name":"PROV_E0B5C0","pop":"abcd1234","transport":"ble"}
I (19083) app: BLE transport: Connected!
I (19243) protocomm_nimble: mtu update event; conn_handle=1 cid=4 mtu=185

I (23113) NimBLE: GAP procedure initiated: stop advertising.
I (25573) NimBLE: GAP procedure initiated: advertise;
I (25573) NimBLE: disc_mode=2
I (25573) NimBLE:  adv_channel_map=0 own_addr_type=0 adv_filter_policy=0 adv_itvl_min=256 adv_itvl_max=256
I (25583) NimBLE:

I (25583) app: BLE transport: Disconnected!
I (25593) app: BLE transport: Disconnected!
I (25753) app: BLE transport: Connected!
I (26113) protocomm_nimble: mtu update event; conn_handle=1 cid=4 mtu=185

E (27013) security1: Key mismatch. Close connection
E (27013) security1: Session setup error -1
E (27013) protocomm_nimble: Invalid content received, killing connection
手机上面提示是
Sending Wi-Fi credentials.
Failed to initialise session with the device
:D :) ;) hello world

seanfan@qq.com
Posts: 16
Joined: Mon Dec 14, 2020 1:02 pm

Re: 请教关于IDF5.0和5.1里面wifi-provisioning配置失败的问题

Postby seanfan@qq.com » Tue Nov 15, 2022 11:46 pm

用ANDROID的ble provisioning APP(v2.1.0)试一下,我的是IOS的APP配不了,但安卓可以。另外是代码里安全认证版本要保证手机和ESP两边要一致,好像两边默认是V2,而不是V1了。

dengbq
Posts: 38
Joined: Thu Mar 31, 2022 8:45 am

Re: 请教关于IDF5.0和5.1里面wifi-provisioning配置失败的问题

Postby dengbq » Tue May 30, 2023 2:21 am

idf 5.0没有可配套的adf吧,你不使用adf?

ESP_LiuH
Posts: 42
Joined: Fri Feb 10, 2023 7:20 am

Re: 请教关于IDF5.0和5.1里面wifi-provisioning配置失败的问题

Postby ESP_LiuH » Tue May 30, 2023 12:03 pm

请确认 PoP 信息是否与上述日志一致

Who is online

Users browsing this forum: No registered users and 161 guests