Provisioning manager - Event when smartphone connects

daviherc
Posts: 10
Joined: Wed Apr 28, 2021 5:31 pm

Provisioning manager - Event when smartphone connects

Postby daviherc » Mon Jan 31, 2022 3:17 pm

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

ESP_YJM
Posts: 300
Joined: Fri Feb 26, 2021 10:30 am

Re: Provisioning manager - Event when smartphone connects

Postby ESP_YJM » Thu Feb 10, 2022 7:31 am

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.

gulliverr
Posts: 7
Joined: Tue Nov 01, 2022 10:38 am

Re: Provisioning manager - Event when smartphone connects

Postby gulliverr » Tue Nov 01, 2022 12:54 pm

@daviherc did you find a way to catch that event for BLE?

ESP_laukik-hase
Posts: 6
Joined: Sun Jul 04, 2021 5:25 am

Re: Provisioning manager - Event when smartphone connects

Postby ESP_laukik-hase » Wed Nov 02, 2022 5:30 am

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

gulliverr
Posts: 7
Joined: Tue Nov 01, 2022 10:38 am

Re: Provisioning manager - Event when smartphone connects

Postby gulliverr » Wed Nov 02, 2022 6:55 am

Thank you Laukik. I'm glad this is addressed.

Who is online

Users browsing this forum: Asanga, ESP_Alvin and 75 guests