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

HOW to use direct advertising to connect the central successfully?

I use nrf52832 board by fast advertising to connect the central(surface 4 Tablet).Then the board go to sleep.when I push the button the board use direct advertising to connect the central again,but it dont connect. I use the peer manager to get the central address,when the BLE_ADV_EVT_PEER_ADDR_REQUEST event of direct advertising happens.

SDK 14.2  Softdevice 132 .Can you give me some suggestions about direct advertising to connect previous central successfully.

Parents
  • when first time  push button ,the board can connect the central by direct advertising.In connection state, application handles things completely, then the board and central disconnect .The board go to sleep. Next time(push button no matter how many times) the board can use direct advertising ,but cannt connect.I'm confused about this problem,How to solve this problem?

  • Hi, can you make sure that you first delete all bonds on the central and peripheral? 

  • From my understanding they have addressed an issue where they were assuming privacy would be enabled for some devices and thus failed to program both the IRK resolution and the device’s static address to the controller’s offloaded capabilities (on Windows 10).

    Please let me know your results after testing.

    Best regards,
    Kenneth

  • So, when nrf52 connect with surface tablet, surface tablet use private address? I can get IRK in BLE_ADV_EVT_PEER_ADDR_REQUEST event to use pm_peer_data_bonding_load() function. But how to use it by direct adv? or in other words, how to change my code?

  • What we notice is that after pairing and using directed advertising to connect to a Windows 10 (Surface Pro) device, the Windows 10 device behaves differently based on a characteristic that reside on the peripheral side ("Central Address Resolution" characteristic). It seems that if Windows 10 discover this characteristic it will trigger an issue as described in my previous reply, this issue occur on the Windows 10 side.

    The Central Address Characteristic can't be removed on the peripheral side, as it is mandatory to have it if supported. This means that the fix should be done on the central side to handle this characteristic correctly, in this case Windows 10.

    The only way to possible workaround this issue on the peripheral side would be to always enable Privacy.

    Please let me know your results after testing Windows insiders build.

  • From the central, I can through windows insiders build to change "Central Address Resolution" characteristic?

    From the peripheral, I can use BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE type?

    Maybe, this issue is in Windows 10 ,so from Windows insiders build I can address this issue. But I didn't find anything about Bluetooth in it. 

  • It is an issue in Win 10, so it would be useful if you can test the Windows Insiders build to check if it's fixed.

    To answer your question on privacy:

    The sd_ble_gap_privacy_set() with privacy mode BLE_GAP_PRIVACY_MODE_DEVICE_PRIVACY might be done after bonding, before advertising again, if the local IRK is transmitted during bonding. It might also be set earlier during initialization (before bonding), but then the devices that do not support privacy will not be able to reconnect when privacy is enabled. So this is not a good workaround I think.

Reply
  • It is an issue in Win 10, so it would be useful if you can test the Windows Insiders build to check if it's fixed.

    To answer your question on privacy:

    The sd_ble_gap_privacy_set() with privacy mode BLE_GAP_PRIVACY_MODE_DEVICE_PRIVACY might be done after bonding, before advertising again, if the local IRK is transmitted during bonding. It might also be set earlier during initialization (before bonding), but then the devices that do not support privacy will not be able to reconnect when privacy is enabled. So this is not a good workaround I think.

Children
Related