zephyr/samples/bluetooth/peripheral_hids/README.rst
Fabio Baltieri b787cc088d samples: bt: hids: add a non authenticated mode to the sample
The HIDs sample is currently setup with a passkey callback and requires
authenticated write and read access.

Add a sample option to disable the passkey callbacks, and automatically
set the GATT attributes as encryption required. This is a useful sample
setup as real world HID devices (mice, keyboards...) usually don't have
a passkey mechanism, and removing the callback to reproduce that setup
while not changing the GATT permission leads to automatic disconnections
for encryption failures that can be fairly hard to troubleshoot.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-24 19:33:03 +01:00

32 lines
937 B
ReStructuredText

.. _peripheral_hids:
Bluetooth: Peripheral HIDs
##########################
Overview
********
Similar to the :ref:`Peripheral <ble_peripheral>` sample, except that this
application specifically exposes the HID GATT Service. The report map used is
for a generic mouse.
In the default configuration the sample uses passkey authentication (displays a
code on the peripheral and requires that to be entered on the host during
pairing) and requires an authenticated link to access the GATT characteristics.
To disable authentication and just use encrypted channels instead, build the
sample with `CONFIG_SAMPLE_BT_USE_AUTHENTICATION=n`.
Requirements
************
* BlueZ running on the host, or
* A board with BLE support
Building and Running
********************
This sample can be found under :zephyr_file:`samples/bluetooth/peripheral_hids` in the
Zephyr tree.
See :ref:`bluetooth samples section <bluetooth-samples>` for details.