zephyr/samples/boards/reel_board/mesh_badge
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 Bluetooth: Host: Add const prefix for UUID 2023-12-07 16:16:43 +00:00
CMakeLists.txt
README.rst bluetooth: mesh: Doc fix Bluetooth mesh to Mesh 2023-12-01 10:56:18 +00:00
prj.conf Bluetooth: Samples: Remove usage of `BT_DEBUG_LOG` 2023-06-07 13:56:55 -04:00
sample.yaml samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00

README.rst

.. _mesh_badge:

Mesh Badge
##########

Overview
********

This sample app for the reel board showcases Bluetooth Mesh

The app starts off as a regular Bluetooth GATT peripheral application.
Install the "nRF Connect" app on your phone (available both for
Android and iOS) to access the service that the app exposes. The service
can also be accessed with any Bluetooth LE GATT client from your PC,
however these instructions focus on the necessary steps for phones.

Steps to set up
***************

#. On your phone, use the nRF Connect app to Scan for devices and look
   for "reel board"
#. Connect to the device. You'll see a single service - select it
#. Request to write to the characteristic by pressing on the upward pointing
   arrow symbol
#. Select "Text" to enter text instead of hex
#. Enter your name (or any other arbitrary text). Multiple words
   separated by spaces are possible. The font used on the reel display
   allows three rows of up to 12 characters
   wide text. You can force line breaks with a comma.
#. Press "Send" - this will trigger pairing since this is a protected
   characteristic. The passkey for the pairing will be shown on the board's
   display. Enter the passkey in your phone.
#. Once pairing is complete the board will show the text you sent. If
   you're not happy with it you can try writing something else.
#. When you're happy with the text, disconnect from the board (exit the app or
   go back to the device scan page)
#. Once disconnected the board switches over to Bluetooth Mesh mode, and you
   can't connect to it anymore over GATT.

If you configure multiple boards like this they can communicate with
each other over mesh: by pressing the user button on the board the first
word (name) of the stored text will be sent to all other boards in
the network and cause the other boards to display "<name> says hi!".

To reset a board to its initial state (disable mesh, erase the stored
text, and make it connectable over GATT):

#. Keep the user button pressed when powering on (or press the reset button
   when powered)
#. Wait until "Resetting Device" is shown