Skip to content

BLEConnection::requestPairing does not return if the device is disconnected during pairing. #566

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

Closed
arms22 opened this issue Sep 3, 2020 · 3 comments
Labels

Comments

@arms22
Copy link

arms22 commented Sep 3, 2020

Describe the bug
BLEConnection::requestPairing does not return if the device is disconnected during pairing.

After the BLE_GAP_EVT_DISCONNECTED event occurs, the BLE_GAP_EVT_EVT_CONN_SEC_UPDATE event does not occur, so
xSemaphoreGive(_pair_sem)is not called and No longer return from xSemaphoreTake(_pair_sem, portMAX_DELAY).

Set up (mandatory)

  • PC & IDE : Arduino 1.8.13 Windows 10
  • BSP : 0.20.5
  • Board : Feather nRF52840 Express
  • Sketch: None
@arms22 arms22 added the Bug label Sep 3, 2020
@hathach
Copy link
Member

hathach commented Sep 9, 2020

ah right, thanks, that is indeed an issue. Currently there is huge pending PR $466 that implement LESC and completely rework the pairing process. We will wait until that PR got merged and double check this again. Thanks for posting.

@arms22
Copy link
Author

arms22 commented Sep 10, 2020

Hi hathach
Thanks for the reply.
I'll check again once PR $466 have been merged!

@hathach
Copy link
Member

hathach commented Sep 11, 2020

#466 is merged, I have just checked the log. It completely reworks the pairing process from using legacy just work to more advanced LESC. Some API is removed and new is added. The pairing process is not non-blocking, a callback is invoked when it is complete (failed or succeeded). Thanks for filing the issue.

@hathach hathach closed this as completed Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants