zephyr/samples/bluetooth/ibeacon
Benjamin Cabé d23d19d7f0 samples: bluetooth: use zephyr:code-sample directive
Describe the samples using code-sample directive in preparation for
upcoming changes to the Zephyr documentation that will be leveraging
the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-05 16:58:32 -04:00
..
boards boards: silabs: Consistently name dev kits 2024-06-12 12:52:28 -04:00
src samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
CMakeLists.txt
prj.conf Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
README.rst samples: bluetooth: use zephyr:code-sample directive 2024-09-05 16:58:32 -04:00
sample.yaml samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00

.. zephyr:code-sample:: bluetooth_ibeacon
   :name: iBeacon
   :relevant-api: bluetooth

   Advertise an Apple iBeacon using GAP Broadcaster role.

Overview
********

This simple application demonstrates the GAP Broadcaster role
functionality by advertising an Apple iBeacon. The calibrated RSSI @ 1
meter distance can be set using an IBEACON_RSSI build variable
(e.g. IBEACON_RSSI=0xb8 for -72 dBm RSSI @ 1 meter), or by manually
editing the default value in the ``main.c`` file.

Because of the hard-coded values of iBeacon UUID, major, and minor,
the application is not suitable for production use, but is quite
convenient for quick demonstrations of iBeacon functionality.

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

* A board with Bluetooth LE support, or
* QEMU with BlueZ running on the host

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

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

See :ref:`bluetooth samples section <bluetooth-samples>` for details on how
to run the sample inside QEMU.

For other boards, build and flash the application as follows:

.. zephyr-app-commands::
   :zephyr-app: samples/bluetooth/ibeacon
   :board: <board>
   :goals: flash
   :compact:

Refer to your :ref:`board's documentation <boards>` for alternative
flash instructions if your board doesn't support the ``flash`` target.