In current implementation, the bonding information of classic is queried by calling the function `bt_foreach_bond()`. And the bonding information of classic is deleted by calling `bt_unpair()`. There are two issues if the LE and classic are bonded at same time for dual mode peer device. Issue 1, for the function `bt_foreach_bond()`, there are two bonding information will be found. But there is no way to find which bonding information belongs to LE or classic. Issue 2, For the function `bt_unpair()`, all bonding information will be deleted if the passed address is the public address. But there is no way to delete the bonding information of LE or classic. Remove the calling of function `bt_foreach_bond_br()` from the function `bt_foreach_bond()`. And rename it to `bt_br_foreach_bond()`, and public it as an API to query the bonding information of classic. Remove the calling of function `bt_keys_link_key_clear_addr()` from the function `bt_unpair()`. Add an API `bt_br_unpair()` to delete the bonding information of classic. Add a `br_bond_deleted` to structure `bt_conn_auth_info_cb` for classic. The callback will be triggered if the bonding information has been deleted by the function `bt_br_unpair()`. Add a `clear` shell command for classic to delete the bonding information. Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com> |
||
|---|---|---|
| .. | ||
| bt.c | ||
| bt.h | ||
| CMakeLists.txt | ||
| cs.c | ||
| gatt.c | ||
| iso.c | ||
| l2cap.c | ||