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

Getting device address in ble_app_hrs central

Hi All, I am a beginner in nrf52. I need to get the client device address in ble_app_hrs_central, because I have more than one devices connected. There is a hrs_c_evt_handler in the main.c which is called when a client sent a new heart rate value. I can found the conn_handle which may identify the connection. I need to get the device address assigned this connection. How can I get it?

thx Zamek

Parents Reply
  • Ok, good idea, but when BLE_GAP_EVT_CONNECTED event happened, there is ble_gap_evt_t structure which has a union named params and I can use ble_gap_evt_connected structure. It has a ble_gap_addr_t which contains the peer address and a ble_gap_conn_params which contains min_conn_interval, max_conn_interval, slave_latency and conn_sup_timeout only. Seems to be there is no connect handle at this phase:( Unfortunately I have no idea how can I make a link between peer address and connection handle.

Children
No Data
Related