Skip to content

Commit c68f5d4

Browse files
carlescufihakehuang
authored andcommitted
doc: Bluetooth: Document issue with certain controllers
Certain Qualcomm controllers do not accept our settings for Host Buffer Size: < HCI Command: Host Buffer Size (0x03|0x0033) plen 7 #19 [hci0] 22.391048 ACL MTU: 27 ACL max packet: 6 SCO MTU: 0 SCO max packet: 0 > HCI Event: Command Complete (0x0e) plen 4 #20 [hci0] 22.391525 Host Buffer Size (0x03|0x0033) ncmd 1 Status: Invalid HCI Command Parameters (0x12) Likely due to the fact that we do not reserve space for any SCO packets in the Host. Other Controllers (Realtek) seem to not transmit any data at all in the Controller to Host direction if Controller to Host flow control is enabled. Document this fact in the User Guide so that users know what to do when this happens. Signed-off-by: Carles Cufi <[email protected]>
1 parent e2876ab commit c68f5d4

File tree

1 file changed

+27
-15
lines changed

1 file changed

+27
-15
lines changed

doc/guides/bluetooth/bluetooth-dev.rst

+27-15
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ to use the btmon tool from :ref:`BlueZ <bluetooth_bluez>`:
7171
7272
$ btmon --tty <console TTY> --tty-speed 115200
7373
74-
QEMU with an external Controller
75-
================================
74+
Host on Linux with an external Controller
75+
=========================================
7676

7777
.. note::
7878
This is currently only available on GNU/Linux
@@ -81,17 +81,37 @@ This setup relies on a "dual-chip" :ref:`configuration <bluetooth-configs>`
8181
which is comprised of the following devices:
8282

8383
#. A :ref:`Host-only <bluetooth-build-types>` application running in the
84-
:ref:`QEMU <application_run_qemu>` emulator
84+
:ref:`QEMU <application_run_qemu>` emulator or the ``native_posix`` native
85+
port of Zephyr
8586
#. A Controller, which can be one of two types:
8687

8788
* A commercially available Controller
8889
* A :ref:`Controller-only <bluetooth-build-types>` build of Zephyr
8990

91+
.. warning::
92+
Certain external Controllers are either unable to accept the Host to
93+
Controller flow control parameters that Zephyr sets by default (Qualcomm), or
94+
do not transmit any data from the Controller to the Host (Realtek). If you
95+
see a message similar to::
96+
97+
<wrn> bt_hci_core: opcode 0x0c33 status 0x12
98+
99+
when booting your sample of choice (make sure you have enabled
100+
:option:`CONFIG_BT_DEBUG_LOG` in your :file:`prj.conf` before running the
101+
sample), or if there is no data flowing from the Controller to the Host, then
102+
you need to disable Host to Controller flow control. To do so, set
103+
``CONFIG_BT_HCI_ACL_FLOW_CONTROL=n`` in your :file:`prj.conf`.
104+
105+
QEMU
106+
----
107+
108+
You can run the Zephyr Host on the :ref:`QEMU emulator<application_run_qemu>`
109+
and have it interact with a physical external Bluetooth Controller.
90110
Refer to :ref:`bluetooth_qemu_posix` for full instructions on how to build and
91111
run an application in this setup.
92112

93-
Native POSIX with an external Controller
94-
========================================
113+
Native POSIX
114+
------------
95115

96116
.. note::
97117
This is currently only available on GNU/Linux
@@ -100,16 +120,8 @@ The :ref:`Native POSIX <native_posix>` target builds your Zephyr application
100120
with the Zephyr kernel, and some minimal HW emulation as a native Linux
101121
executable.
102122
This executable is a normal Linux program, which can be debugged and
103-
instrumented like any other.
104-
105-
Just like with QEMU, you also need to use a combination of two devices:
106-
107-
#. A :ref:`Host-only <bluetooth-build-types>` application running in
108-
native_posix as a Linux application
109-
#. A Controller, which can be one of two types:
110-
111-
* A commercially available Controller
112-
* A :ref:`Controller-only <bluetooth-build-types>` build of Zephyr
123+
instrumented like any other, and it communicates with a physical external
124+
Controller.
113125

114126
Refer to :ref:`bluetooth_qemu_posix` for full instructions on how to build and
115127
run an application in this setup.

0 commit comments

Comments
 (0)