zephyr/samples/bluetooth/direct_adv
Lingao Meng 786b9a0ad4 Bluetooth: Host: Add const prefix for UUID
Add const prefix for service uuid and char uuid.

Since Service UUID and Char UUID should not change in the service
definition, they are most reasonably defined as rodata, also for
save some ram footprint.

The field `attr->user_data` type is `void *`, as this PR change
all Service UUID to rodata, so there must add (void *) to avoid warning.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2023-12-07 16:16:43 +00:00
..
src
CMakeLists.txt
README.rst
prj.conf
sample.yaml

README.rst

.. _ble_direct_adv:

Bluetooth: Direct Advertising
#############################

Overview
********

Application demonstrating the BLE Direct Advertising capability. If no device is bonded
to the peripheral, casual advertising will be performed. Once bonded, on every subsequent
boot direct advertising to the bonded central will be performed. Additionally this sample
provides two BLE characteristics. To perform write, devices need to be bonded, while read
can be done just after connection (no bonding required).

Please note that direct advertising towards iOS based devices is not allowed.
For more information about designing BLE devices for Apple products refer to
"Accessory Design Guidelines for Apple Devices".

Requirements
************

* A board with BLE support
* Second BLE device acting as a central with enabled privacy. For example another Zephyr board
  or any modern smartphone

Building and Running
********************

This sample can be found under :zephyr_file:`samples/bluetooth/direct_adv` in the
Zephyr tree.

See :ref:`bluetooth samples section <bluetooth-samples>` for details.