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

How to map a gap event to a physical device?

What unique information can I use to know which physical device disconnected for example? Say I have a MAC address or a name encoded into the advertising packet. Correct me if I'm wrong, but connection handles are created after a connection is established. So how can I map a mac address or name to a connection handle?

Parents
  • That's the problem. I don't know everything all the way through. I don't have the connection handle until after the connection is established. If I look at the ble event data structure in the ble event call-back, there is a connection handle, but here is no other data. The handle is just a number. I don't know if this number is a handle on my tablet, my phone, or an NRF chip. When the soft device connect method is called, all information on advertising device is lost.

Reply
  • That's the problem. I don't know everything all the way through. I don't have the connection handle until after the connection is established. If I look at the ble event data structure in the ble event call-back, there is a connection handle, but here is no other data. The handle is just a number. I don't know if this number is a handle on my tablet, my phone, or an NRF chip. When the soft device connect method is called, all information on advertising device is lost.

Children
No Data
Related