NRF52832 Feather BleHID pairing when already bonded

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Tronic052
 
Posts: 8
Joined: Sat Feb 13, 2016 2:24 pm

NRF52832 Feather BleHID pairing when already bonded

Post by Tronic052 »

Apologies, I'm not great at Arduino IDE programming and may have the terminology wrong, but I tend to get there in the end.

I'm working on blehid device. One feature that I am trying to implement is to be able to pair with a device a second time using a new mac address (not simultaneously connected twice, but to re-pair later with a different MAC). The mac address side of things is working fine, I can connect to the same device but the blehid service is not present. I've tried to google the issue and believe the problem lies in the fact that "the peer manager will reject pairing requests from an already bonded peer".

Now whilst I understand what this means by reading the post here:

https://devzone.nordicsemi.com/f/nordic ... first-time

I'm not sure where to implement this suggested fix:
static void pm_evt_handler(pm_evt_t const * p_evt)
{
case PM_EVT_CONN_SEC_CONFIG_REQ:
{
// Reject pairing request from an already bonded peer.
pm_conn_sec_config_t conn_sec_config = {.allow_repairing = true};
pm_conn_sec_config_reply(p_evt->conn_handle, &conn_sec_config);
} break;
I'm not sure if Adafruit has provided me with access to this "flag" or where to find it.

Any help would be appreciated.

User avatar
Tronic052
 
Posts: 8
Joined: Sat Feb 13, 2016 2:24 pm

Re: NRF52832 Feather BleHID pairing when already bonded

Post by Tronic052 »

Can anybody please help me with this?

I need to set:

allow_repairing = true

but I don't know how to implement it.

Thank you for your help.

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”