docs: bluetooth: Replace reference to native_posix w native_sim
Let's replace the references to native_posix with native_sim, Background: during this release native_sim is replacing native_posix as the main host test/development platform. Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
parent
49bccb5839
commit
d427169845
6 changed files with 34 additions and 34 deletions
|
@ -16,11 +16,11 @@ Supported methods to test zephyr bluetooth host:
|
||||||
|
|
||||||
- Testing Zephyr Host Stack on QEMU
|
- Testing Zephyr Host Stack on QEMU
|
||||||
|
|
||||||
- Testing Zephyr Host Stack on native posix
|
- Testing Zephyr Host Stack on :ref:`native_sim <native_sim>`
|
||||||
|
|
||||||
- Testing Zephyr combined (controller + host) build on Real hardware (such as nRF52)
|
- Testing Zephyr combined (controller + host) build on Real hardware (such as nRF52)
|
||||||
|
|
||||||
For running with QEMU or native posix, see :ref:`bluetooth_qemu_posix`.
|
For running with QEMU or :ref:`native_sim <native_sim>`, see :ref:`bluetooth_qemu_native`.
|
||||||
|
|
||||||
Setup Linux
|
Setup Linux
|
||||||
===========================
|
===========================
|
||||||
|
@ -293,14 +293,14 @@ Testing Zephyr Host Stack on QEMU:
|
||||||
~/zephyrproject/build/zephyr/zephyr.elf -i SERVER_IP -l LOCAL_IP
|
~/zephyrproject/build/zephyr/zephyr.elf -i SERVER_IP -l LOCAL_IP
|
||||||
|
|
||||||
|
|
||||||
Testing Zephyr Host Stack on native posix:
|
Testing Zephyr Host Stack on :ref:`native_sim <native_sim>`:
|
||||||
|
|
||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
# A Bluetooth controller needs to be mounted.
|
# A Bluetooth controller needs to be mounted.
|
||||||
# For running with HCI UART, please visit: https://docs.zephyrproject.org/latest/samples/bluetooth/hci_uart/README.html#bluetooth-hci-uart
|
# For running with HCI UART, please visit: https://docs.zephyrproject.org/latest/samples/bluetooth/hci_uart/README.html#bluetooth-hci-uart
|
||||||
|
|
||||||
west build -b native_posix zephyr/tests/bluetooth/tester/ -DEXTRA_CONF_FILE=overlay-native.conf
|
west build -b native_sim zephyr/tests/bluetooth/tester/ -DEXTRA_CONF_FILE=overlay-native.conf
|
||||||
|
|
||||||
sudo python ./autoptsclient-zephyr.py "C:\Users\USER_NAME\Documents\Profile Tuning Suite\PTS_PROJECT\PTS_PROJECT.pqw6" \
|
sudo python ./autoptsclient-zephyr.py "C:\Users\USER_NAME\Documents\Profile Tuning Suite\PTS_PROJECT\PTS_PROJECT.pqw6" \
|
||||||
~/zephyrproject/build/zephyr/zephyr.exe -i SERVER_IP -l LOCAL_IP --hci 0
|
~/zephyrproject/build/zephyr/zephyr.exe -i SERVER_IP -l LOCAL_IP --hci 0
|
||||||
|
|
|
@ -33,7 +33,7 @@ There are 4 possible hardware setups to use with Zephyr and Bluetooth:
|
||||||
|
|
||||||
#. Embedded
|
#. Embedded
|
||||||
#. QEMU with an external Controller
|
#. QEMU with an external Controller
|
||||||
#. Native POSIX with an external Controller
|
#. :ref:`native_sim <native_sim>` with an external Controller
|
||||||
#. Simulated nRF52 with BabbleSim
|
#. Simulated nRF52 with BabbleSim
|
||||||
|
|
||||||
Embedded
|
Embedded
|
||||||
|
@ -90,7 +90,7 @@ This setup relies on a "dual-chip" :ref:`configuration <bluetooth-configs>`
|
||||||
which is comprised of the following devices:
|
which is comprised of the following devices:
|
||||||
|
|
||||||
#. A :ref:`Host-only <bluetooth-build-types>` application running in the
|
#. A :ref:`Host-only <bluetooth-build-types>` application running in the
|
||||||
:ref:`QEMU <application_run_qemu>` emulator or the ``native_posix`` native
|
:ref:`QEMU <application_run_qemu>` emulator or the :ref:`native_sim <native_sim>` native
|
||||||
port of Zephyr
|
port of Zephyr
|
||||||
#. A Controller, which can be one of the following types:
|
#. A Controller, which can be one of the following types:
|
||||||
|
|
||||||
|
@ -117,23 +117,23 @@ QEMU
|
||||||
|
|
||||||
You can run the Zephyr Host on the :ref:`QEMU emulator<application_run_qemu>`
|
You can run the Zephyr Host on the :ref:`QEMU emulator<application_run_qemu>`
|
||||||
and have it interact with a physical external Bluetooth Controller.
|
and have it interact with a physical external Bluetooth Controller.
|
||||||
Refer to :ref:`bluetooth_qemu_posix` for full instructions on how to build and
|
Refer to :ref:`bluetooth_qemu_native` for full instructions on how to build and
|
||||||
run an application in this setup.
|
run an application in this setup.
|
||||||
|
|
||||||
Native POSIX
|
native_sim
|
||||||
------------
|
----------
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
This is currently only available on GNU/Linux
|
This is currently only available on GNU/Linux
|
||||||
|
|
||||||
The :ref:`Native POSIX <native_posix>` target builds your Zephyr application
|
The :ref:`native_sim <native_sim>` target builds your Zephyr application
|
||||||
with the Zephyr kernel, and some minimal HW emulation as a native Linux
|
with the Zephyr kernel, and some minimal HW emulation as a native Linux
|
||||||
executable.
|
executable.
|
||||||
This executable is a normal Linux program, which can be debugged and
|
This executable is a normal Linux program, which can be debugged and
|
||||||
instrumented like any other, and it communicates with a physical or virtual
|
instrumented like any other, and it communicates with a physical or virtual
|
||||||
external Controller.
|
external Controller.
|
||||||
|
|
||||||
Refer to :ref:`bluetooth_qemu_posix` for full instructions on how to build and
|
Refer to :ref:`bluetooth_qemu_native` for full instructions on how to build and
|
||||||
run an application with a physical controller. For the virtual controller refer
|
run an application with a physical controller. For the virtual controller refer
|
||||||
to :ref:`bluetooth_virtual_posix`.
|
to :ref:`bluetooth_virtual_posix`.
|
||||||
|
|
||||||
|
@ -152,7 +152,7 @@ This board, uses:
|
||||||
* The POSIX arch to emulate the processor.
|
* The POSIX arch to emulate the processor.
|
||||||
* `Models of the nrf52 HW <https://github.com/BabbleSim/ext_NRF52_hw_models/>`_
|
* `Models of the nrf52 HW <https://github.com/BabbleSim/ext_NRF52_hw_models/>`_
|
||||||
|
|
||||||
Just like with the ``native_posix`` target, the build result is a normal Linux
|
Just like with the :ref:`native_sim <native_sim>` target, the build result is a normal Linux
|
||||||
executable.
|
executable.
|
||||||
You can find more information on how to run simulations with one or several
|
You can find more information on how to run simulations with one or several
|
||||||
devices in
|
devices in
|
||||||
|
|
|
@ -74,13 +74,13 @@ Finally, reload and restart the daemon:
|
||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
sudo systemctl restart bluetooth
|
sudo systemctl restart bluetooth
|
||||||
|
|
||||||
.. _bluetooth_qemu_posix:
|
.. _bluetooth_qemu_native:
|
||||||
|
|
||||||
Running on QEMU and Native POSIX
|
Running on QEMU or native_sim
|
||||||
********************************
|
*****************************
|
||||||
|
|
||||||
It's possible to run Bluetooth applications using either the :ref:`QEMU
|
It's possible to run Bluetooth applications using either the :ref:`QEMU
|
||||||
emulator<application_run_qemu>` or :ref:`Native POSIX <native_posix>`.
|
emulator<application_run_qemu>` or :ref:`native_sim <native_sim>`.
|
||||||
In either case, a Bluetooth controller needs to be exported from
|
In either case, a Bluetooth controller needs to be exported from
|
||||||
the host OS (Linux) to the emulator. For this purpose you will need some tools
|
the host OS (Linux) to the emulator. For this purpose you will need some tools
|
||||||
described in the :ref:`bluetooth_bluez` section.
|
described in the :ref:`bluetooth_bluez` section.
|
||||||
|
@ -94,14 +94,14 @@ The host OS's Bluetooth controller is connected in the following manner:
|
||||||
with the help of the QEMU option :literal:`-serial unix:/tmp/bt-server-bredr`.
|
with the help of the QEMU option :literal:`-serial unix:/tmp/bt-server-bredr`.
|
||||||
This option gets passed to QEMU through :makevar:`QEMU_EXTRA_FLAGS`
|
This option gets passed to QEMU through :makevar:`QEMU_EXTRA_FLAGS`
|
||||||
automatically whenever an application has enabled Bluetooth support.
|
automatically whenever an application has enabled Bluetooth support.
|
||||||
* To a serial port in Native POSIX through the use of a command-line option
|
* To a serial port in :ref:`native_sim <native_sim>` through the use of a command-line option
|
||||||
passed to the Native POSIX executable: ``--bt-dev=hci0``
|
passed to the native_sim executable: ``--bt-dev=hci0``
|
||||||
|
|
||||||
On the host side, BlueZ allows you to export its Bluetooth controller
|
On the host side, BlueZ allows you to export its Bluetooth controller
|
||||||
through a so-called user channel for QEMU and Native POSIX to use.
|
through a so-called user channel for QEMU and :ref:`native_sim <native_sim>` to use.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
You only need to run ``btproxy`` when using QEMU. Native POSIX handles
|
You only need to run ``btproxy`` when using QEMU. native_sim handles
|
||||||
the UNIX socket proxying automatically
|
the UNIX socket proxying automatically
|
||||||
|
|
||||||
If you are using QEMU, in order to make the Controller available you will need
|
If you are using QEMU, in order to make the Controller available you will need
|
||||||
|
@ -142,12 +142,12 @@ building and running a sample:
|
||||||
the :literal:`bt-server-bredr` UNIX socket, letting the application
|
the :literal:`bt-server-bredr` UNIX socket, letting the application
|
||||||
access the Bluetooth controller.
|
access the Bluetooth controller.
|
||||||
|
|
||||||
* To run a Bluetooth application in Native POSIX, first build it:
|
* To run a Bluetooth application in :ref:`native_sim <native_sim>`, first build it:
|
||||||
|
|
||||||
.. zephyr-app-commands::
|
.. zephyr-app-commands::
|
||||||
:zephyr-app: samples/bluetooth/<sample>
|
:zephyr-app: samples/bluetooth/<sample>
|
||||||
:host-os: unix
|
:host-os: unix
|
||||||
:board: native_posix
|
:board: native_sim
|
||||||
:goals: build
|
:goals: build
|
||||||
:compact:
|
:compact:
|
||||||
|
|
||||||
|
@ -180,8 +180,8 @@ In order to see those logs, you can use the built-in ``btmon`` tool from BlueZ:
|
||||||
|
|
||||||
.. _bluetooth_virtual_posix:
|
.. _bluetooth_virtual_posix:
|
||||||
|
|
||||||
Running on a Virtual Controller and Native POSIX
|
Running on a Virtual Controller and native_sim
|
||||||
*************************************************
|
**********************************************
|
||||||
|
|
||||||
An alternative to a Bluetooth physical controller is the use of a virtual
|
An alternative to a Bluetooth physical controller is the use of a virtual
|
||||||
controller. This controller can be connected over an HCI TCP server.
|
controller. This controller can be connected over an HCI TCP server.
|
||||||
|
|
|
@ -6,13 +6,13 @@ Bluetooth samples
|
||||||
To build any of the Bluetooth samples, follow the same steps as building
|
To build any of the Bluetooth samples, follow the same steps as building
|
||||||
any other Zephyr application. Refer to :ref:`bluetooth-dev` for more information.
|
any other Zephyr application. Refer to :ref:`bluetooth-dev` for more information.
|
||||||
|
|
||||||
Many Bluetooth samples can be run on QEMU or Native POSIX with support for
|
Many Bluetooth samples can be run on QEMU or :ref:`native_sim <native_sim>` with support for
|
||||||
external Bluetooth Controllers. Refer to the :ref:`bluetooth-hw-setup` section
|
external Bluetooth Controllers. Refer to the :ref:`bluetooth-hw-setup` section
|
||||||
for further details.
|
for further details.
|
||||||
|
|
||||||
Several of the bluetooth samples will build a Zephyr-based Controller that can
|
Several of the bluetooth samples will build a Zephyr-based Controller that can
|
||||||
then be used with any external Host (including Zephyr running natively or with
|
then be used with any external Host (including Zephyr running natively or with
|
||||||
QEMU or Native POSIX), those are named accordingly with an "HCI" prefix in the
|
QEMU or ``native_sim``), those are named accordingly with an "HCI" prefix in the
|
||||||
documentation and are prefixed with :literal:`hci_` in their folder names.
|
documentation and are prefixed with :literal:`hci_` in their folder names.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
|
@ -55,10 +55,10 @@ For example, to build for the nRF52832 Development Kit:
|
||||||
|
|
||||||
.. _bluetooth-hci-uart-qemu-posix:
|
.. _bluetooth-hci-uart-qemu-posix:
|
||||||
|
|
||||||
Using the controller with QEMU and Native POSIX
|
Using the controller with QEMU or native_sim
|
||||||
===============================================
|
============================================
|
||||||
|
|
||||||
In order to use the HCI UART controller with QEMU or Native POSIX you will need
|
In order to use the HCI UART controller with QEMU or :ref:`native_sim <native_sim>` you will need
|
||||||
to attach it to the Linux Host first. To do so simply build the sample and
|
to attach it to the Linux Host first. To do so simply build the sample and
|
||||||
connect the UART to the Linux machine, and then attach it with this command:
|
connect the UART to the Linux machine, and then attach it with this command:
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ If you are running :file:`btmon` you should see a brief log showing how the
|
||||||
Linux kernel identifies the attached controller.
|
Linux kernel identifies the attached controller.
|
||||||
|
|
||||||
Once the controller is attached follow the instructions in the
|
Once the controller is attached follow the instructions in the
|
||||||
:ref:`bluetooth_qemu_posix` section to use QEMU with it.
|
:ref:`bluetooth_qemu_native` section to use QEMU with it.
|
||||||
|
|
||||||
.. _bluetooth-hci-uart-bluez:
|
.. _bluetooth-hci-uart-bluez:
|
||||||
|
|
||||||
|
|
|
@ -52,10 +52,10 @@ For example, to build for the nRF52832 Development Kit:
|
||||||
|
|
||||||
.. _bluetooth-hci-uart-async-qemu-posix:
|
.. _bluetooth-hci-uart-async-qemu-posix:
|
||||||
|
|
||||||
Using the controller with QEMU and Native POSIX
|
Using the controller with QEMU or native_sim
|
||||||
===============================================
|
============================================
|
||||||
|
|
||||||
In order to use the HCI UART controller with QEMU or Native POSIX you will need
|
In order to use the HCI UART controller with QEMU or :ref:`native_sim <native_sim>` you will need
|
||||||
to attach it to the Linux Host first. To do so simply build the sample and
|
to attach it to the Linux Host first. To do so simply build the sample and
|
||||||
connect the UART to the Linux machine, and then attach it with this command:
|
connect the UART to the Linux machine, and then attach it with this command:
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ If you are running :file:`btmon` you should see a brief log showing how the
|
||||||
Linux kernel identifies the attached controller.
|
Linux kernel identifies the attached controller.
|
||||||
|
|
||||||
Once the controller is attached follow the instructions in the
|
Once the controller is attached follow the instructions in the
|
||||||
:ref:`bluetooth_qemu_posix` section to use QEMU with it.
|
:ref:`bluetooth_qemu_native` section to use QEMU with it.
|
||||||
|
|
||||||
.. _bluetooth-hci-uart-async-bluez:
|
.. _bluetooth-hci-uart-async-bluez:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue