zephyr/samples/bluetooth/peripheral_hids
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
..
boards
src samples: bt: hids: add a non authenticated mode to the sample 2023-01-24 19:33:03 +01:00
CMakeLists.txt
Kconfig samples: bt: hids: add a non authenticated mode to the sample 2023-01-24 19:33:03 +01:00
prj.conf samples: bt: hids: implement a sample report 2022-09-15 16:27:35 +00:00
README.rst samples: bt: hids: add a non authenticated mode to the sample 2023-01-24 19:33:03 +01:00
sample.yaml samples: bt: hids: add a non authenticated mode to the sample 2023-01-24 19:33:03 +01:00

.. _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.