This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

I can't re-connect to smart phone when advertising with whitelist

Dear all:

   My problem is described in the following steps:

     1. Progranm the SoftDevice 7 (S132) into NRF52832, then program the ble_hid_keyboard example(SDK16) into NRF52832.   (OK)

     2. NRF52832 start advertising, Central A(android smart phone HUAWEI honor 10) scan and pair with NRF52832. (OK)

     3. Turn off the bluetooth Central A, push a key that ble_hid_keyboard define to restart advertsing without whitelist,

         and Central B(a windows10 labtop ) scan and pair with NRF52832.Now there are 2 device , Central A and Central B , in the whitelist. . (OK)

     4. Turn on the bluetooth in Central A, NRF52832 still connecting with Central B now, and I turn off Central B, NRF52832 advertsing with whitelist but not connect to Central B

     5. Now turn on Central B , NRF52832 can connect to Central B soon.

what i mean is that why NRF52832  can't connect to smart phone when advertising with whitelist but labtop is ok?

by the way,I only disable the High_Duty_Cycle_Advertising in the ble_hid_keyboard example, not any other modification.

I did this test with 2 labtops and 2 smart phone(huawei and iphone),the test result are the same: NRF52832  can't connect to smart phone when advertising with whitelist but labtop is ok.

how should I do in the ble_hid_keyboard example, that I can connect to the smart phone when when advertising with whitelist.

Parents
  • Here's my suggestion, just to save some time for the next person that digs for this.

    Many smartphones use LE Privacy, which means that they use Resolvable Private Addresses, while Windows machines use Public Addresses. For pm_whitelist_set() to still allow Bonded Centrals that use LE Privacy, the application has to first call sd_ble_gap_device_identities_set() with the same list of peers to put on the whitelist.

    Also note that as described in this ticket, you have to disable advertising & scanning before calling sd_ble_gap_device_identities_set(), or else it will return
    BLE_ERROR_GAP_DEVICE_IDENTITIES_IN_USE.

Reply
  • Here's my suggestion, just to save some time for the next person that digs for this.

    Many smartphones use LE Privacy, which means that they use Resolvable Private Addresses, while Windows machines use Public Addresses. For pm_whitelist_set() to still allow Bonded Centrals that use LE Privacy, the application has to first call sd_ble_gap_device_identities_set() with the same list of peers to put on the whitelist.

    Also note that as described in this ticket, you have to disable advertising & scanning before calling sd_ble_gap_device_identities_set(), or else it will return
    BLE_ERROR_GAP_DEVICE_IDENTITIES_IN_USE.

Children
No Data
Related