HI ...
Which one is stable to identify the connected peripheral devices using mac address or connection handle . if it is mac address , then suggest me a way to identify the mac address of device
Thanks in advance
HI ...
Which one is stable to identify the connected peripheral devices using mac address or connection handle . if it is mac address , then suggest me a way to identify the mac address of device
Thanks in advance
Hi,
When you get connected (BLE_GAP_EVT_CONNECTED event) you can find the address of the peer device in p_ble_evt->gap_evt.connected.peer_addr
But this is only valid for those use static random/public address. Those address that wouldn't change over time. Most phones today use random resolvable address which change every 15 minutes.
To be able to recognize those device, you would need to bond to them to get the IRK key to reconnect.
I would suggest you to get familiar with the bonding concept in Bluetooth Low Energy.
how to do that .. i want to send the data to particular mac address
Please study fundamental of Bluetooth Low Energy. And try our example, for example in the SDK, for example ble_app_hids_mouse, ble_app_proximity.
sure i will study and get back to you
from that example i understand the whitelist , but how come this work mac address , where can i get my mac address of the device
Hi Pspavi,
Please let us know which devices you are planing to connect to ? Are they phones or they are other nRF52 chip ?
To get the nRF52 MAC address, you can call sd_ble_gap_addr_get() to get the address. Please have a look in the documentation for more information on how to use it.
Hi Pspavi,
Please let us know which devices you are planing to connect to ? Are they phones or they are other nRF52 chip ?
To get the nRF52 MAC address, you can call sd_ble_gap_addr_get() to get the address. Please have a look in the documentation for more information on how to use it.