Page 1 of 1

Provisioning manager - Event when smartphone connects

Posted: Mon Jan 31, 2022 3:17 pm
by daviherc
Hello all,

Is there a way to be notified as soon as one smartphone starts the provisioning routine, i.e. as soon as the BLE connection is established?

From the example, I see these:

Code: Select all

WIFI_PROV_START, WIFI_PROV_CRED_RECV, WIFI_PROV_CRED_FAIL, WIFI_PROV_CRED_SUCCESS, WIFI_PROV_END
But none of those seem to be triggered at that time. I thought maybe something related to protocomm could help me. Do you have any ideas?

Thank you,
Davi

Re: Provisioning manager - Event when smartphone connects

Posted: Thu Feb 10, 2022 7:31 am
by ESP_YJM
I think you can use this judgement to judge the station connected when provisioning is in softap mode.

Code: Select all

if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_AP_STACONNECTED)
For BLE, it is difficult to get connected event in userspace. Maybe need modify protocomm/src/simple_ble/simple_ble.c. This event is ESP_GATTS_CONNECT_EVT.

Re: Provisioning manager - Event when smartphone connects

Posted: Tue Nov 01, 2022 12:54 pm
by gulliverr
@daviherc did you find a way to catch that event for BLE?

Re: Provisioning manager - Event when smartphone connects

Posted: Wed Nov 02, 2022 5:30 am
by ESP_laukik-hase
Hello,

A similar request was filed on GitHub (see here); the commit will be syncing to the master branch soon. Meanwhile, you can try the patch attached in the linked GitHub issue.

Thanks,
Laukik

Re: Provisioning manager - Event when smartphone connects

Posted: Wed Nov 02, 2022 6:55 am
by gulliverr
Thank you Laukik. I'm glad this is addressed.