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

Central peripheral BLE address connection check

(開発環境 )
OS in development environment :Windows7
HARD :(Taiyo Yuden)EBSHSN Series Evaluation Board : Central / Peripherals
CPU :(Nordic) nRF52832 / ARMR Cortex?-M4F 32 bit processor 28-pin Land Grid Array / 15GPIOs / SWD
Soft Ver:nRF5_SDK_15.2.0_9412b96

How can I get connection information for each address in Central?
The address uses 0-3.
Thank you very much.

Parents Reply
  • Hello,

    In the disconnected event you should have a conn_handle.

    case BLE_GAP_EVT_DISCONNECTED:
    NRF_LOG_INFO("Disconnected conn_handle %d", p_ble_evt->evt.gap_evt.conn_handle);
    ...

    You can compare this conn_hande to the conn_handle that occured in the BLE_GAP_EVT_CONNECTED event. The connected event has both a conn_handle and an address.

    So let us say that in the BLE_GAP_EVT_CONNECTED event you had conn_handle 0x01 and address 0xea88a2c41a92.

    Then, later, you get a disconnect with conn_handle 0x01, this means that the device with address 0xea88a2c41a92 disconnected.

    Best Regards,

    Edvin

Children
No Data
Related