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 a69dacd6130 Documentation: Describe hardware-free Bluetooth simulation.
a69dacd6130 is described below

commit a69dacd61304d68f8373d165240c9157714eb224
Author: Lingao Meng <[email protected]>
AuthorDate: Fri Oct 23 11:12:00 2026 +0800

    Documentation: Describe hardware-free Bluetooth simulation.
    
    Fill the gap in NuttX's simulator documentation for hardware-free
    Bluetooth testing. Add a two-Host topology, describe H:4 Unix sockets
    and discrete-time synchronization, and link BTSak and NimBLE users
    to the guide and BSWorld for development and integration testing.
    
    Assisted-by: Codex:GPT-6
    Signed-off-by: Lingao Meng <[email protected]>
---
 .../applications/wireless/btsak/index.rst          |  3 +++
 .../applications/wireless/nimble/index.rst         |  4 +++
 Documentation/guides/simulation/simulator.rst      | 30 ++++++++++++++++++++++
 .../platforms/sim/sim/boards/sim/index.rst         |  8 ++++++
 4 files changed, 45 insertions(+)

diff --git a/Documentation/applications/wireless/btsak/index.rst 
b/Documentation/applications/wireless/btsak/index.rst
index 434207d2516..dee189752ef 100644
--- a/Documentation/applications/wireless/btsak/index.rst
+++ b/Documentation/applications/wireless/btsak/index.rst
@@ -2,6 +2,9 @@
 ``btsak`` Bluetooth Swiss Army Knife
 ====================================
 
+For a two-device advertising and scanning example using virtual Controllers
+on Linux, see :ref:`simulator_bluetooth_testing`.
+
 Commands
 --------
 
diff --git a/Documentation/applications/wireless/nimble/index.rst 
b/Documentation/applications/wireless/nimble/index.rst
index 06ab31a99f1..7b574483e3d 100644
--- a/Documentation/applications/wireless/nimble/index.rst
+++ b/Documentation/applications/wireless/nimble/index.rst
@@ -5,6 +5,10 @@
 This application will build nimBLE stack (host-only) as a library/application
 in NuttX.
 
+For a Central/Peripheral example that tests connections, GATT service
+discovery, and subscriptions without Bluetooth hardware, see
+:ref:`simulator_bluetooth_testing`.
+
 .. toctree::
   :maxdepth: 2
   :caption: Contents
diff --git a/Documentation/guides/simulation/simulator.rst 
b/Documentation/guides/simulation/simulator.rst
index 86220f0ec69..0586e664e3c 100644
--- a/Documentation/guides/simulation/simulator.rst
+++ b/Documentation/guides/simulation/simulator.rst
@@ -224,6 +224,36 @@ Testing / capturing TCP network traffic
 
 #. Observe TCP network traffic in Wireshark / tcpdump on Linux.
 
+.. _simulator_bluetooth_testing:
+
+Testing Bluetooth without hardware
+==================================
+
+The Linux simulator can run the NuttX Bluetooth Host or NimBLE with virtual
+Controllers to test advertising, scanning, connections, and GATT communication
+without Bluetooth hardware.
+
+Each Host connects to its Controller through an HCI H:4 Unix domain socket
+and must support discrete-time scheduling synchronized with the simulation.
+See :ref:`sim_babblesim_time` for NuttX's simulation time support.
+
+.. code-block:: text
+
+       NuttX Host A                    NuttX Host B
+     (BTSak or NimBLE)               (BTSak or NimBLE)
+             |                              |
+       H:4 Unix socket                H:4 Unix socket
+             |                              |
+     Python Controller A             Python Controller B
+             |                              |
+             +--------- BabbleSim PHY ------+
+
+`BSWorld <https://github.com/XiaoMi/bsworld>`_ provides build instructions
+and automated tests for
+:doc:`BTSak </applications/wireless/btsak/index>` advertising and scanning,
+and :doc:`NimBLE </applications/wireless/nimble/index>` connections, service
+discovery, and subscriptions.
+
 Testing NxModbus RTU on simulator
 =================================
 
diff --git a/Documentation/platforms/sim/sim/boards/sim/index.rst 
b/Documentation/platforms/sim/sim/boards/sim/index.rst
index 4e9262a7eb2..30d3e4f022a 100644
--- a/Documentation/platforms/sim/sim/boards/sim/index.rst
+++ b/Documentation/platforms/sim/sim/boards/sim/index.rst
@@ -41,6 +41,8 @@ Timing Fidelity
    Another option is to use ``CONFIG_SIM_WALLTIME_SLEEP`` which will enable the
    tick events to be delayed from the Idle task by using a host sleep call.
 
+.. _sim_babblesim_time:
+
 BabbleSim Discrete Time
 -----------------------
 
@@ -78,6 +80,9 @@ launching the NuttX simulator.
 The runtime options override ``CONFIG_SIM_BSIM_SIM_ID``,
 ``CONFIG_SIM_BSIM_PHY_ID``, and ``CONFIG_SIM_BSIM_DEVICE_NBR``.
 
+For a complete two-device Bluetooth example using virtual Controllers,
+see :ref:`simulator_bluetooth_testing`.
+
 Debugging
 =========
 
@@ -733,6 +738,9 @@ The process listening on the socket must be started before 
NuttX. If that
 process opens a real UART device, it still needs permission to access that UART
 device.
 
+For advertising, scanning, and connection tests without Bluetooth hardware,
+see :ref:`simulator_bluetooth_testing`.
+
 bridge
 ------
 

Reply via email to