espressif / esp-idf-provisioning-ios

Apache License 2.0
130 stars 62 forks source link

Provision hangs without response #77

Open grasmash opened 6 months ago

grasmash commented 6 months ago

Description

I am using this sample app to provision an ESP32 device. The device is running this sample project.

I can find the device, scan wifi networks, and send credentials. However, the app hangs indefinitely when the provision command is sent.

To Reproduce Steps to reproduce the behavior:

  1. Set up sample project for ESP 32 with something like [idf.py](http://idf.py/) -p /dev/cu.usbserial-0001 flash monitor
  2. Build the sample app.
  3. Scan the QR code from step 1.
  4. Select wifi network.
  5. Enter wifi password.
  6. Observe ESP output. Credentials are received and wifi is successfully connected.
  7. ESP output does not proceed to "hello world" and app hangs at "Confirming Wi-Fi connection" indefinitely. ...

Frequency This happens nearly every time, but once it actually provisioned after about 5 minutes of hang time. In that single case, it produced the output:

I (188607) app: Connected with IP Address:192.168.86.61
I (188607) esp_netif_handlers: sta ip: 192.168.86.61, mask: 255.255.255.0, gw: 192.168.86.1
I (188607) wifi_prov_mgr: STA Got IP
I (188617) app: Provisioning successful
I (188617) app: Hello World!
I (189617) app: Hello World!
I (190617) app: Hello World!
I (191617) app: Hello World!
I (192617) app: Hello World!
I (192797) NimBLE: GAP procedure initiated: stop advertising.

I (192797) NimBLE: GAP procedure initiated: stop advertising.

I (192807) NimBLE: GAP procedure initiated: terminate connection; conn_handle=0 hci_reason=19

E (192897) protocomm_nimble: Error setting advertisement data; rc = 30

In all other cases, it hangs at the point shown in the screenshot below.

Expected behavior After wifi connection, the "Confirming Wi-Fi credentials" step should be completed. Barring that, some kind of status message should be shown.

Screenshots image

ESP Device Information:

iOS information:

Provisioning information:

Additional context ...