Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WiFi Provisioning Manager pairing state event handler? (IDFGH-8557) #10007

Closed
3 tasks done
law-ko opened this issue Oct 18, 2022 · 6 comments
Closed
3 tasks done

WiFi Provisioning Manager pairing state event handler? (IDFGH-8557) #10007

law-ko opened this issue Oct 18, 2022 · 6 comments
Assignees
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally

Comments

@law-ko
Copy link

law-ko commented Oct 18, 2022

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

Hello,

The BLE mechanism WiFi provisioning manager with security 1 is used. We want to know if the device is currently being connected (or is in pairing mode) once the PoP has been entered and is correct. Is there any event_handler event that can be used to detect this?

The console showed the below log when PoP is entered.

I (214581) NimBLE: GAP procedure initiated: advertise; 
I (214581) NimBLE: disc_mode=2
I (214581) NimBLE:  adv_channel_map=0 own_addr_type=0 adv_filter_policy=0 adv_itvl_min=256 adv_itvl_max=256
I (214591) NimBLE: 

Thank you

@law-ko law-ko changed the title WiFi Provisioning Manager current state update? WiFi Provisioning Manager pairing state? Oct 18, 2022
@law-ko law-ko changed the title WiFi Provisioning Manager pairing state? WiFi Provisioning Manager pairing state event handler? Oct 19, 2022
@github-actions github-actions bot changed the title WiFi Provisioning Manager pairing state event handler? WiFi Provisioning Manager pairing state event handler? (IDFGH-8557) Oct 19, 2022
@espressif-bot espressif-bot added the Status: Opened Issue is new label Oct 19, 2022
@laukik-hase
Copy link
Collaborator

Hello, @lawrenceko-intecular!

Thank you for the report. If I understand correctly, do you want an event when the BLE host (Android, iOS) is successfully paired and connected with the target device (ESP32)? The PoP is entered after the connection is established and has nothing to do with the transport establishment.

@law-ko
Copy link
Author

law-ko commented Oct 21, 2022

Hello @laukik-hase ,

The objective is to identify which device is currently being paired up (e.g. show led blink), and the best way is to have an event notice after PoP connection is established besides checking if BLE host is paired as any device can connect to its BLE host.

Thank you.

@laukik-hase
Copy link
Collaborator

Hello, @law-ko!

Could you please check if the attached patch works for you? I have added events for transport connection establishment and termination. Please verify with the wifi_prov_mgr example.
wifi_prov_event_transport_paired.zip

P.S. - Use the command git am <diff.patch> to apply the patch over the current master branch @ 6a8810f.

@law-ko
Copy link
Author

law-ko commented Oct 22, 2022

Hello @laukik-hase ,

I am using v4.4.2 ESP-IDF and I looked into your patch it seems like you added PROTOCOMM_TRANSPORT_BLE_EVENT in the event handler, is PROTOCOMM_TRANSPORT_BLE_EVENT a new event added in ESP-IDF v5? It shows undeclared when I try to use it.

Thank you

@laukik-hase
Copy link
Collaborator

Hello, @law-ko!

The event PROTOCOMM_TRANSPORT_BLE_EVENT has been added to ESP-IDF in this patch.
This patch is just a proposed solution to verify whether the solution works for you. If yes, I'll go forward and get it merged internally.

As mentioned earlier, this patch is applicable to the master branch only (@ 6a8810f) and not to the v4.4 release. We generally do not backport features like these to the previous releases (e.g. v4.4) but I'll discuss it internally and get back to you.

@espressif-bot espressif-bot added Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Resolution: Done Issue is done internally and removed Status: Opened Issue is new Resolution: NA Issue resolution is unavailable labels Nov 1, 2022
@herculanodavi
Copy link

Hi, is this feature available in 5.0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

4 participants