STM32WB pairing error with mixed bonded/nonbonded devices
Hi,
I am running a system with some STM32WB, one client and some server.
Right now i am connecting, pairing and bonding the devices.
If i start from a condition where i have all the server not bonded (aci_gap_get_bonded_devices return nothing) and I start the firmware, the client connects, pairs and bonds all the server and all works.
If i start from a condition where i have all the server already bonded and I start the firmware, the client connects and rebonds all the server and all works.
Instead if i start from a condition where I have some server bonded and others not I have some problems. In particular:
- If I connects (and pair and bond) before all the not bonded devices and after the bonded devices the system still works.
- If I connects (and rebond) only one server that was already bonded, all the not bonded server cannot be paired anymore.
In particular:
- I start the firmware, mac address list of the servers is received.
- the first server is bonded, so i connect it, send a pairing request via aci_gap_send_pairing_req, that rebond the server.
- the second server is not bonded.
- I connect it and i ask for pairing with this call: aci_gap_send_pairing_req(server->connectionHandle, 0x02).
- After called, returns 0, and i receive a EVT_BLUE_GAP_PAIRING_CMPLT event with status 2 (failed) and reason 8 (UNSPECIFIED_REASON) (error codes from AN5270 page141).
- If i retry to call the aci_gap_send_pairing_req function i receive the error 0x59 (BLE_STATUS_DEV_IN_BLACKLIST) (error code from ble_defs.h).
I have tryed to call the aci_gap_send_pairing_req with the force rebond parameter equal to 0x00. I have tryed to update the stack to the one published in 1.10 packages but no changes. Do you have any idea witch can be the problem?
Thank you in advance
