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

ble_gap_addr_t address is not right?

when phone connect to the device, I print the connected address. However, I find that the bluetooth address is not same with the phone bluetooth address. here is the debug infomation: image description

peer_address is:34:40:36:59:18:01, addr_type is:CA

the phone bluetooth address is:18:59:36:40:34:CA

I use SDK9.0.0, SoftDevice8.0.0

how to get the correct bluetooth? Thanks!

Parents Reply
  • when I chang code to below:

    peer_address =p_ble_evt->evt.gap_evt.params.connected.peer_addr
    

    I got the correct bluetooth address sometimes. sometimes I got wrong address,when I debug peer_address.addr_type, I find out, when peer_address.addr_type=0 , peer_address is same with the phone address, when peer_address.addr_type=1, the address is wong ! how to get the correct address whether peer_address.addr_type is 0 or not? Thanks!

Children
No Data
Related