Skip to content

Commit 63b349f

Browse files
aescolarnashif
authored andcommitted
doc: Bluetooth: Expand BabbleSim section
Added some more content to the section about how to simulate with BabbleSim and a couple of extra links. Signed-off-by: Alberto Escolar Piedras <[email protected]>
1 parent 100287d commit 63b349f

File tree

3 files changed

+38
-16
lines changed

3 files changed

+38
-16
lines changed

boards/posix/nrf52_bsim/doc/index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ for more details.
3737
.. _BabbleSim:
3838
https://BabbleSim.github.io
3939

40+
.. _nrf52bsim_build_and_run:
41+
4042
Building and running
4143
**********************
4244

@@ -142,6 +144,8 @@ of the simulation in microseconds.
142144
BabbleSim devices and Phy support many command line switches.
143145
Run them with ``-help`` for more information.
144146

147+
You can find more information about how to run BabbleSim simulations in
148+
`this BabbleSim example <https://babblesim.github.io/example_2g4.html>`_.
145149

146150
Debugging
147151
**********

doc/guides/bluetooth/bluetooth-dev.rst

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ There are 4 possible hardware setups to use with Zephyr and Bluetooth:
2525
#. Embedded
2626
#. QEMU with an external Controller
2727
#. Native POSIX with an external Controller
28-
#. Native POSIX with BabbleSim
28+
#. Simulated nRF52 with BabbleSim
2929

3030
Embedded
3131
========
@@ -68,12 +68,16 @@ Native POSIX with an external Controller
6868
.. note::
6969
This is currently only available on GNU/Linux
7070

71-
The :ref:`Native POSIX <native_posix>` simulator allows Zephyr builds to run as
72-
a native POSIX applications. Just like with QEMU, you also need to use a
73-
combination of two devices:
71+
The :ref:`Native POSIX <native_posix>` target builds your Zephyr application
72+
with the Zephyr kernel, and some minimal HW emulation as a native Linux
73+
executable.
74+
This executable is a normal Linux program, which can be debugged and
75+
instrumented like any other.
7476

75-
#. A :ref:`Host-only <bluetooth-build-types>` application running as a native
76-
POSIX application
77+
Just like with QEMU, you also need to use a combination of two devices:
78+
79+
#. A :ref:`Host-only <bluetooth-build-types>` application running in
80+
native_posix as a Linux application
7781
#. A Controller, which can be one of two types:
7882

7983
* A commercially available Controller
@@ -82,18 +86,32 @@ combination of two devices:
8286
Refer to :ref:`bluetooth_qemu_posix` for full instructions on how to build and
8387
run an application in this setup.
8488

85-
Native POSIX with BabbleSim
86-
===========================
89+
Simulated nRF52 with BabbleSim
90+
==============================
8791

8892
.. note::
8993
This is currently only available on GNU/Linux
9094

91-
`BabbleSim`_ is a simulator of the physical layer of shared medium networks,
92-
and it can be used to develop BLE applications with Zephyr when combined with
93-
the Native POSIX target.
94-
When developing with BabbleSim, only :ref:`Combined builds
95-
<bluetooth-build-types>` are possible, since the whole Linux application is a
96-
single entity that communicates with the simulator.
95+
The :ref:`nrf52_bsim board <nrf52_bsim>`, is a simulated target board
96+
which emulates the necessary peripherals of a nrf52 SOC to be able to develop
97+
and test BLE applications.
98+
This board, uses:
99+
100+
* `BabbleSim`_ to simulate the nrf52 modem and the radio environment.
101+
* The POSIX arch to emulate the processor.
102+
* `Models of the nrf52 HW <https://github.com/BabbleSim/ext_NRF52_hw_models/>`_
103+
104+
Just like with the ``native_posix`` target, the build result is a normal Linux
105+
executable.
106+
You can find more information on how to run simulations with one or several
107+
devices in
108+
:ref:`this board's documentation <nrf52bsim_build_and_run>`
109+
110+
Currently, only :ref:`Combined builds
111+
<bluetooth-build-types>` are possible, as this board does not yet have
112+
any models of a UART, or USB which could be used for an HCI interface towards
113+
another real or simulated device.
114+
97115

98116
Initialization
99117
**************

doc/guides/bluetooth/bluetooth-tools.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ Running on QEMU and Native POSIX
8080
********************************
8181

8282
It's possible to run Bluetooth applications using either the :ref:`QEMU
83-
emulator<application_run_qemu>` or the :ref:`Native POSIX <native_posix>`
84-
simulator. In order to do so, a Bluetooth controller needs to be exported from
83+
emulator<application_run_qemu>` or :ref:`Native POSIX <native_posix>`.
84+
In either case, a Bluetooth controller needs to be exported from
8585
the host OS (Linux) to the emulator. For this purpose you will need some tools
8686
described in the :ref:`bluetooth_bluez` section.
8787

0 commit comments

Comments
 (0)