Example DPP Easy Connect Tx Fail

nottledim
Posts: 7
Joined: Tue Oct 24, 2017 6:24 pm

Example DPP Easy Connect Tx Fail

Postby nottledim » Mon Jun 27, 2022 1:02 pm

I'm trying the example
esp-idf/examples/wifi/wifi_easy_connect/dpp-enrollee
and find it frequently fails but not always.

I (1199) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07
I (1309) wifi:mode : sta (50:02:91:86:33:b8)
I (1309) wifi:enable tsf
I (1309) wifi dpp-enrollee: Started listening for DPP Authentication
E (3639) wifi dpp-enrollee: DPP Auth failed (Reason: ESP_ERR_DPP_TX_FAILURE), retry...
[/code]

The error occurs after the initiator sends authentication.

It's not clear why but the code stop working altogether i.e no more events or any interaction after ESP_SUPP_DPP_FAIL. It's supposed to retry but doesn't.

nottledim
Posts: 7
Joined: Tue Oct 24, 2017 6:24 pm

Re: Example DPP Easy Connect Tx Fail

Postby nottledim » Mon Jun 27, 2022 2:30 pm

Looking at logs it seems the error is in wpa_supplicant offchannel event handler

Code: Select all

D (6692) event: running post WIFI_EVENT:19 with handler 0x400e03c4 and context 0x3ffc6cd0 on loop 0x3ffbcd18
0x400e03c4: offchan_event_handler at /home/dick/src/esp/esp-idf-v4.4/esp-idf/components/wpa_supplicant/esp_supplicant/src/esp_dpp.c:449

E (6702) wifi dpp-enrollee: DPP Auth failed (Reason: ESP_ERR_DPP_TX_FAILURE), retry...

D (7212) event: running post WIFI_EVENT:20 with handler 0x400d7504 and context 0x3ffbe000 on loop 0x3ffbcd18
0x400d7504: event_handler at /home/dick/src/esp/projects/example-easy_connect/dpp-enrollee/main/dpp_enrollee_main.c:55

D (7212) event: running post WIFI_EVENT:20 with handler 0x400e03c4 and context 0x3ffc6d00 on loop 0x3ffbcd18
0x400e03c4: offchan_event_handler at /home/dick/src/esp/esp-idf-v4.4/esp-idf/components/wpa_supplicant/esp_supplicant/src/esp_dpp.c:449
The wpa debug log shows this:

Code: Select all

I (1271) wifi dpp-enrollee: Started listening for DPP Authentication
I (4071) wpa: DPP: Authentication Request from 32:15:74:32:91:a8
E (4081) wpa: curve: secp256r1

E (4081) wpa: prime len is 32

E (4081) wpa: Q_x: - hexdump(len=32):
E (4081) wpa: a4 9d 38 81 ef d5 3e 31 54 6c cd 08 ca 82 dd cc
E (4091) wpa: 96 77 25 ed 5d de ac 61 c9 86 db fc ee 7f 78 8e
E (4091) wpa: Q_y: - hexdump(len=32):
E (4101) wpa: f0 97 e0 aa 3e 20 cc 86 cb 5f 30 11 35 a1 35 8f
E (4101) wpa: bc 68 39 a1 a4 10 cb 2e 4c f8 b9 4d ac 38 40 ec
E (4111) wpa: d:      - hexdump(len=32):
E (4111) wpa: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
E (4121) wpa: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
E (4461) wpa: curve: secp256r1

E (4461) wpa: prime len is 32

E (4471) wpa: Q_x: - hexdump(len=32):
E (4471) wpa: 0a 28 1b b5 00 ee e9 2d 42 1b 5a 1a 3f 6e 75 ff
E (4471) wpa: 08 f2 5e 59 8c 6f 85 cb 4c 19 f7 bf 2e df b4 d8
E (4481) wpa: Q_y: - hexdump(len=32):
E (4481) wpa: af 6e ea a3 32 16 b8 43 12 c1 f0 75 24 a8 22 d1
E (4491) wpa: 23 5e 4a 05 75 ef 49 10 63 3a b0 f8 42 56 0d 3d
E (4501) wpa: d:      - hexdump(len=32):
E (4501) wpa: 58 e4 63 9e a0 4f 1a 4b 44 e8 ba 71 73 77 54 ad
E (4511) wpa: 4d 80 c1 62 c2 f5 0e 55 72 f5 e2 9c f2 b7 9b 53
E (4861) wifi dpp-enrollee: DPP Auth failed (Reason: ESP_ERR_DPP_TX_FAILURE), retry...
I don't know where these errors are coming from. I don't understand what the error means either. Perhaps someone can enlighten me.

nottledim
Posts: 7
Joined: Tue Oct 24, 2017 6:24 pm

Re: Example DPP Easy Connect Tx Fail

Postby nottledim » Mon Jun 27, 2022 7:42 pm

I can get it work by changing the AP channels. I had the same SSID on 2 different channels (both in the channel list) which I think perplexed it. Probably not ideal but no excuse for crashing.

devjasta
Posts: 1
Joined: Tue Feb 21, 2023 4:03 am

Re: Example DPP Easy Connect Tx Fail

Postby devjasta » Tue Feb 21, 2023 4:07 am

I'm hitting this as well, and is being discussed further here: https://github.com/espressif/esp-idf/issues/10615. I currently can't find a work-around, but more importantly I think we're dealing with an issue here that prevents production deployment of DPP due to the unpredictable errors without reliable (or currently even known) workarounds available in code.

Who is online

Users browsing this forum: awegel and 101 guests