This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 13b90ffe52b Documentation: add nimble_bleess example
13b90ffe52b is described below

commit 13b90ffe52b08ad100f54e8586fb84e8d8cf39e6
Author: Jackson-gjh <[email protected]>
AuthorDate: Sun Nov 8 22:19:30 2026 +0800

    Documentation: add nimble_bleess example
    
    Document the Apache NimBLE Environmental Sensing peripheral example. 
Describe
    its standard GATT service and characteristic formats, required 
configuration,
    NSH usage, and generated sample data.
    
    The example application is added by apache/nuttx-apps#3989.
    
    Assisted-by: Codex:gpt-5
    Signed-off-by: Jackson-gjh <[email protected]>
---
 .../applications/examples/nimble_bleess/index.rst  | 69 ++++++++++++++++++++++
 1 file changed, 69 insertions(+)

diff --git a/Documentation/applications/examples/nimble_bleess/index.rst 
b/Documentation/applications/examples/nimble_bleess/index.rst
new file mode 100644
index 00000000000..4af8fcb6ba9
--- /dev/null
+++ b/Documentation/applications/examples/nimble_bleess/index.rst
@@ -0,0 +1,69 @@
+=========================================================
+``nimble_bleess`` NimBLE Environmental Sensing peripheral
+=========================================================
+
+The ``nimble_bleess`` example implements a Bluetooth LE Environmental
+Sensing peripheral using Apache NimBLE. It advertises the standard
+Environmental Sensing service and exposes readable and notifiable temperature
+and humidity characteristics.
+
+The example generates slowly changing sample values every two seconds, so it
+can be used without sensor hardware. A real sensor application can replace
+the generated values by calling ``bleess_gatt_update()``.
+
+GATT service
+============
+
+The example uses the following standard Bluetooth UUIDs and value formats:
+
+.. list-table::
+   :header-rows: 1
+
+   * - Attribute
+     - UUID
+     - Format
+   * - Environmental Sensing service
+     - ``0x181a``
+     - Service
+   * - Temperature characteristic
+     - ``0x2a6e``
+     - Signed 16-bit little-endian value in 0.01 degrees Celsius
+   * - Humidity characteristic
+     - ``0x2a6f``
+     - Unsigned 16-bit little-endian value in 0.01 percent
+
+Configuration
+=============
+
+Enable ``CONFIG_EXAMPLES_NIMBLE_BLEESS`` together with Apache NimBLE and
+the peripheral role:
+
+.. code-block:: Kconfig
+
+   CONFIG_NET_BLUETOOTH=y
+   CONFIG_NIMBLE=y
+   CONFIG_NIMBLE_ROLE_PERIPHERAL=y
+   CONFIG_EXAMPLES_NIMBLE_BLEESS=y
+
+NimBLE requires a Bluetooth controller exposed through the NuttX HCI socket.
+See :doc:`/applications/wireless/nimble/index` for the common NimBLE
+configuration requirements.
+
+Usage
+=====
+
+Run the example from NSH:
+
+.. code-block:: console
+
+   nsh> bleess
+
+An optional numeric argument selects the HCI device:
+
+.. code-block:: console
+
+   nsh> bleess 0
+
+The peripheral advertises as ``NuttX NimBLE ESS``. A Bluetooth LE client
+can discover the Environmental Sensing service, read both characteristics,
+and subscribe to temperature and humidity notifications.

Reply via email to