Announcements

Join us FREE of charge at OktoberTech Asia Pacific and get inspired on how you could apply Digital Solutions for a smart Future. Click here to find out more.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Studio Bluetooth Forum Discussions

LJYe_2922526
Level 5
25 likes received 10 likes received 5 likes given
Level 5

Hi forum BT experts,

I have several questions regarding BR/EDR pairing:

1) What library call/calls triggers pairing? In the “hci_audio_gateway” demo the HCI_CONTROL_COMMAND_BOND command is not used to pair with a peer, and yet somehow after the HCI_CONTROL_AG_COMMAND_CONNECT command the app is bonded with the peer. Is pairing done in the background by the stack (on RFCOMM connection)? I was expecting library calls to wiced_bt_dev_sec_bond().

2) Is it correct that bonding/pairing means exchanging and storing the (BD_addr, key) pair? I see that the address/key pair is stored in the “NVRAM” and it is synchronized with the host. 

3) Extension to the previous question, if I don’t want the app to auto-connect to a paired device, all I have to do is delete the addr/key pairs from the app, correct?

4) Auto-reconnection with a bonded device is not working with the “hci_audio_gateway” demo project. If I shut down the paired headset and restart it the app was not able to re-establish the rfcomm link, and I can see periodic L2CAP traffic in the logs attempting to reconnect and fails. Any ideas why?

Thanks!

1 Solution
ShengY_96
Employee
50 likes received 25 likes received 10 likes received
Employee

Hi LJ Ye

Pairing is to exchange the keys. Bonding store the keys/peer_addr to the nvram.

Not suggest to delete the bonding info as if the peer side still store the bonding data, the next time connection will failed.

Per my understand, auto connect is depend on application's function. App or firmware need to implement. Bonding only store the keys/peer_addr. If connection has happened, no need to do the pair progress(like input fixed pair key) for people, the key exchange can be handled by stack auto.

Regards

Jenson

View solution in original post

1 Reply
ShengY_96
Employee
50 likes received 25 likes received 10 likes received
Employee

Hi LJ Ye

Pairing is to exchange the keys. Bonding store the keys/peer_addr to the nvram.

Not suggest to delete the bonding info as if the peer side still store the bonding data, the next time connection will failed.

Per my understand, auto connect is depend on application's function. App or firmware need to implement. Bonding only store the keys/peer_addr. If connection has happened, no need to do the pair progress(like input fixed pair key) for people, the key exchange can be handled by stack auto.

Regards

Jenson