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

Advertising with device_name Vs whitelisting

I am confused with whitelisting and advertising/scanning with device name

I have a peripheral and a central device, peripheral device is advertising with device name set as 'PERIPHERAL_DEVICE' and my central device is scanning for the name 'PERIPHERAL_DEVICE' (m_target_periph_name[] = "PERIPHERAL_DEVICE"). Connection between central and peripherals are stable in indoors, but outdoor I get disconnections at some spots. Does whitelisting help me in faster reconnection? and stable connections?

I have already increased the tx power (sd_ble_gap_tx_power_set(4);) for better bluetooth range. The peripheral device is on a handlebar of a bicycle and the central device is in my backpack, while riding I always find disconnections at specific spots, it looks like some bluetooth/wifi causing disconnection, how can I get to know the reason for disconnection? and how to keep stable connection?

  • FormerMember
    0 FormerMember

    A whitelist consists of "accepted" devices, and the purpose of a whitelist for a peripheral device is to accept or reject connect requests from central devices. Connect requests from centrals in the whitelist will be accepted, while connect requests from unknown devices will be rejected.

    What can help in getting a faster re-connection is to use directed advertising. When using directed advertising, the advertising interval is typically very short, and the advertising packet includes the address of the only initiator that can connect to the advertiser (Bluetooth Core Specification v.4.2, Vol. 6, Part B, chapter 4.4.2.4). Only the initiator/central with the address given in the directed advertising packet is allowed to send a connect request.

    If the link suddenly dropped at certain spots, it sounds like a connection supervision timeout. If you somehow can enable logging when doing the testing, you can check the BLE_GAP_EVT_DISCONNECTED event information, it contains the disconnect reason.

Related