Not able to provision esp32

noweare
Posts: 101
Joined: Tue Jul 02, 2019 11:35 am

Not able to provision esp32

Postby noweare » Wed Aug 27, 2025 3:27 pm

Hello developers,

I am not able to to provision my esp32.
I am using the esp-idf provisioning example as a starting point.
I am using security 2 in dev mode.
Getting the error: security2: failed to authenticate client proof! (which appears on the console)

Using the esp_prov tool I generate the salt and verifier arrays for the username and password I am using
python esp_prov.py --transport softap --sec_ver 2 --sec2_gen_cred --sec2_username joemcc --sec2_pwd xyz123

The generated salt and verifier is copied into the program.
I am using the provisioning softAP app on my iphone to interact with the esp32
When I run the program I switch to the esp32 network on my iphone and connect to the esp32 successfully.
In the iphone app I enter the proof of possession which is the same as the password used in esp_prov.py
then hitting "next" I get the error on the phone "failed to initialize session with device"

//-----------------------------------------//
In the console I get more errors :
E (22000) security2: Failed to authenticate client proof!
E (22000) security2: Session setup error -1
E (22000) app: Received incorrect username and/or PoP for establishing secure session!
E (22000) protocomm_httpd: Data handler failed
W (22020) httpd_uri: httpd_uri: uri handler execution failed
//--------------------------------------//

I notice that I am getting a warning in the console: protocomm_httpd: Resetting socket session id as socket 57 was closed
before I can enter the password on the iphone.

So I am kind of stuck at this point trying to figure this out.
Any help is appreciated.


//------------------------------------------------------//
Here is all of the console output

I (31) boot: ESP-IDF v5.3.1-dirty 2nd stage bootloader
I (31) boot: compile time Aug 23 2025 20:14:55
I (31) boot: Multicore bootloader
I (36) boot: chip revision: v3.0
I (40) boot.esp32: SPI Speed : 40MHz
I (44) boot.esp32: SPI Mode : DIO
I (49) boot.esp32: SPI Flash Size : 4MB
I (53) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (62) boot: ## Label Usage Type ST Offset Length
I (70) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (77) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (85) boot: 2 factory factory app 00 00 00010000 00140000
I (92) boot: End of partition table
I (96) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=2a1d8h (172504) map
I (164) esp_image: segment 1: paddr=0003a200 vaddr=3ffbdb60 size=05768h ( 22376) load
I (172) esp_image: segment 2: paddr=0003f970 vaddr=40080000 size=006a8h ( 1704) load
I (173) esp_image: segment 3: paddr=00040020 vaddr=400d0020 size=9ee3ch (650812) map
I (401) esp_image: segment 4: paddr=000dee64 vaddr=400806a8 size=18274h ( 98932) load
I (453) boot: Loaded app from partition at offset 0x10000
I (453) boot: Disabling RNG early entropy source...
I (465) cpu_start: Multicore app
I (473) cpu_start: Pro cpu start user code
I (473) cpu_start: cpu freq: 160000000 Hz
I (473) app_init: Application information:
I (476) app_init: Project name: esp32_provisioning
I (482) app_init: App version: 1
I (486) app_init: Compile time: Aug 27 2025 11:13:26
I (492) app_init: ELF file SHA256: 614671122...
I (498) app_init: ESP-IDF: v5.3.1-dirty
I (503) efuse_init: Min chip rev: v0.0
I (508) efuse_init: Max chip rev: v3.99
I (513) efuse_init: Chip rev: v3.0
I (518) heap_init: Initializing. RAM available for dynamic allocation:
I (525) heap_init: At 3FFAE6E0 len 0000F480 (61 KiB): DRAM
I (531) heap_init: At 3FFC7528 len 00018AD8 (98 KiB): DRAM
I (537) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (543) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (550) heap_init: At 4009891C len 000076E4 (29 KiB): IRAM
I (558) spi_flash: detected chip: generic
I (561) spi_flash: flash io: dio
I (565) coexist: coex firmware version: 4482466
I (570) main_task: Started on CPU0
I (580) main_task: Calling app_main()
I (630) wifi:wifi driver task: 3ffb81f0, prio:23, stack:6656, core=0
I (650) wifi:wifi firmware version: ccaebfa
I (650) wifi:wifi certification version: v7.0
I (650) wifi:config NVS flash: enabled
I (650) wifi:config nano formating: disabled
I (650) wifi:Init data frame dynamic rx buffer num: 32
I (660) wifi:Init static rx mgmt buffer num: 5
I (660) wifi:Init management short buffer num: 32
I (670) wifi:Init dynamic tx buffer num: 32
I (670) wifi:Init static rx buffer size: 1600
I (670) wifi:Init static rx buffer num: 10
I (680) wifi:Init dynamic rx buffer num: 32
I (680) wifi_init: rx ba win: 6
I (690) wifi_init: accept mbox: 6
I (690) wifi_init: tcpip mbox: 32
I (690) wifi_init: udp mbox: 6
I (700) wifi_init: tcp mbox: 6
I (700) wifi_init: tcp tx win: 5760
I (710) wifi_init: tcp rx win: 5760
I (710) wifi_init: tcp mss: 1440
I (710) wifi_init: WiFi IRAM OP enabled
I (720) wifi_init: WiFi RX IRAM OP enabled
I (740) app: Starting provisioning
I (750) app: Development mode: using hard coded salt
I (750) app: Development mode: using hard coded verifier
I (760) phy_init: phy_version 4830,54550f7,Jun 20 2024,14:22:08
I (830) wifi:mode : sta (10:97:bd:d2:30:50)
I (830) wifi:enable tsf
I (840) wifi:mode : sta (10:97:bd:d2:30:50) + softAP (10:97:bd:d2:30:51)
I (840) wifi:Total power save buffer number: 16
I (840) wifi:Init max length of beacon: 752/752
I (840) wifi:Init max length of beacon: 752/752
I (850) esp_netif_lwip: DHCP server started on interface WIFI_AP_DEF with IP: 192.168.4.1
I (850) wifi:Total power save buffer number: 16
I (860) esp_netif_lwip: DHCP server started on interface WIFI_AP_DEF with IP: 192.168.4.1
I (870) wifi_prov_mgr: Provisioning started with service name : PROV_D23050
I (880) app: Provisioning started
I (880) app: If QR code is not visible, copy paste the below URL in a browser.
https://espressif.github.io/esp-jumpsta ... t":"softap"}
I (8890) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<0,0>, prof:1, snd_ch_cfg:0x0
I (8890) wifi:station: 3e:42:69:2a:be:5e join, AID=1, bgn, 20
I (8890) app: SoftAP transport: Connected!
I (9030) esp_netif_lwip: DHCP server assigned IP to a client, IP is: 192.168.4.2
I (9300) wifi:<ba-add>idx:2 (ifx:1, 3e:42:69:2a:be:5e), tid:0, ssn:0, winSize:64
W (16920) protocomm_httpd: Resetting socket session id as socket 57was closed
I (26310) security2: Using salt and verifier to generate public key...
E (27630) security2: Failed to authenticate client proof!
E (27640) security2: Session setup error -1
E (27640) app: Received incorrect username and/or PoP for establishing secure session!
E (27640) protocomm_httpd: Data handler failed
W (27650) httpd_uri: httpd_uri: uri handler execution failed
I (57960) wifi:<ba-add>idx:3 (ifx:1, 3e:42:69:2a:be:5e), tid:1, ssn:0, winSize:64
I (57990) wifi:<ba-add>idx:4 (ifx:1, 3e:42:69:2a:be:5e), tid:5, ssn:0, winSize:64

//---------------- end ------------------------------//

Who is online

Users browsing this forum: Google [Bot], Semrush [Bot] and 2 guests