README.rst
1.. zephyr:code-sample:: bluetooth_hci_pwr_ctrl
2 :name: HCI Power Control
3 :relevant-api: bt_hrs bluetooth
4
5 Dynamically control the Tx power of a Bluetooth LE Controller using HCI vendor-specific commands.
6
7Overview
8********
9
10This sample application demonstrates the dynamic Tx power control over the LL
11of the Bluetooth LE controller via Zephyr HCI VS commands. The application implements a
12peripheral advertising with varying Tx power. The initial advertiser TX power
13for the first 5s of the application is the Kconfig set default TX power. Then,
14the TX power variation of the advertiser is a repeatedly descending staircase
15pattern ranging from -4 dBm to -30 dBm where the Tx power levels decrease every
165s.
17
18Upon successful connection, the connection RSSI strength is being monitored and
19the Tx power of the peripheral device is modulated per connection accordingly
20such that energy is being saved depending on how powerful the RSSI of the
21connection is. The peripheral implements a simple GATT profile exposing the
22HR service notifying connected centrals about a dummy HR each 2s.
23
24Requirements
25************
26
27* BlueZ running on the host, or
28* A board with Bluetooth LE support
29* A central device & monitor (e.g. nRF Connect) to check the RSSI values
30 obtained from the peripheral.
31
32Building and Running
33********************
34
35This sample can be found under :zephyr_file:`samples/bluetooth/hci_pwr_ctrl`
36in the Zephyr tree.
37
38See :zephyr:code-sample-category:`bluetooth` samples for details.
39