Reputation: 3165
I am a little confused as to what level the Android or peripheral device requests the bluetooth low energy pair request type. Is this in the application layer when I initiate the connection via device.connectGatt(context, false, gattCallback)
or would this be the job of the peripheral to suggest the type?
How can someone choose between Just Works
, Numeric Comparison
, Passkey Entry
and Out of Band
?
Upvotes: 2
Views: 732
Reputation: 894
Both devices exchange their IOCapabilities at the beginning of the pairing process. The initiator send a IOCapabilityRequest and the responding device answers with a IOCapabilityResponse.
As the name says, the IO Capabilites contain data about what the device can show to the user. This can be one of "Display Only", "Display Yes/No", "Keyboard Only", "NoInputNoOutput", "KeyboardDisplay".
According to what both devices can do, they chose the method, see here:
https://blog.bluetooth.com/bluetooth-pairing-part-4
and
https://blog.bluetooth.com/bluetooth-pairing-passkey-entry
Upvotes: 3