3

Due to some bluetooth connection issues I've been having connecting some raspberry pis via bluetooth (just for context), I've been looking into different bluetooth agents I could use. There are a few places that (e.g.) mention there are "many" different bluetooth agents to use with bluetoothctl, and I know you can even make your own, but I can't seem to find even a semi-exhaustive list of the different agent options.

Potentially there's a directory in bluetoothctl that stores them? Are there some docs on the different properties/uses of each? I'm using Raspbian 9.9 (stretch) released on 2019-04-08 for reference.

Thank you in advance for any help you could offer.

1 Answer 1

7

The agents are external software entities that are used as callbacks by bluetoothctl. They get called at the instant when authentication during pairing is required. The current set of callbacks implemented in bluetoothd is defined by its D-Bus API.

While potentially there can be many agents indeed, they have been nicely divided into 5 categories by the Bluetooth SIG community: DisplayOnly, DisplayYesNo, KeyboardOnly, KeyboardDisplay, NoInputNoOutput. These are the names you can also use in bluetoothctl (e.g. '# agent NoInputNoOutput'). You can get the list by pressing TAB twice after agent in the bluetoothctl prompt ( [bluetooth]# agent [TAB][TAB] )

The factors influencing the possible types of agents are input and display capabilities of initiator and responder device. Obvioulsy 'initiator' is the device requesting pairing, and 'responder' is the other party.

There are 3 device input capacities considered: enter image description here

There are 2 device output capacities (note that the capability of displaying 6 digits is the decisive factor to assert a 'display' exists): enter image description here

As every device features both some input and some output, the above boils down to the following table. Note that NoInputNoOutput appears twice there. This is because none of the pairing algorithms can use Yes/No input and no output, therefore, NoInputNoOutput is used as the resulting IO capability: enter image description here

Now as we have an initiator with some combination of the input/output capabilities, and a responder with potentially different input/output characteristics, we can delve into all 25 possible combinations of agents on both pairing parties; note many of the combinations result in unauthenticated connections: enter image description here Sources of the tables: Tables 1,2,3: https://www.bluetooth.com/blog/bluetooth-pairing-part-1-pairing-feature-exchange/ Table 4: http://lpccs-docs.dialog-semiconductor.com/Tutorial-DA145x-BLE-Security/ble_security.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.