Hello,
We have a device that acts as both a bluetooth central and a peripheral. The device does not actually have a display or a keyboard, but it has another input port that fills the role of the keyboard. When acting as a central device, we support passkey pairing by using this other (secure) port to supply the passkey.
The trouble is that we ALSO want to be able to support static passkey pairing for the bluetooth peripheral. Because it is a static passkey, we do not actually need to show it on a display for the peripheral to know what it is.
To get the central device to work, we need to tell the peer manager that we have a keyboard
#define SEC_PARAM_IO_CAPABILITIES BLE_GAP_IO_CAPS_KEYBOARD_ONLY
To get the peripheral to use our passkey pairing, we need to tell the peer manager that we ONLY have a display.
#define SEC_PARAM_IO_CAPABILITIES BLE_GAP_IO_CAPS_DISPLAY_ONLY
If we try to tell it that we have both a keyboard and a display it seems to act the same way that it acts if we say that it only has a keyboard. When we try to pair from a phone the phone generates the passkey and asks our device to enter it. Our device does not actually get an event to enter a key though. Even if it did, we want it to use our static passkey, not the one generated on the phone. For this test we used the nrf connect app as the central.
Is it possible to run two instances of the peer manager with different settings? One for the central device and one for the peripheral? If so, how would it know when events to handle?
Should we somehow de-initialize and re-initialize the peer manager when we get a peripheral connection? It seems like the peer manager needs to be initialized before the connection, which would make this difficult.
Is there a single configuration that we have overlooked that would be flexible to solve both of our problems?
Should we be trying to fix this on the phone app side?
Is this just not possible?
this device using SDK version 15.2, softdevice S132
Edit: please note that this question is not about static passkey pairing. It is about supporting different peer manager settings for different roles.
Thanks!