Browse Source
Enable connecting native sim to a physical board running hci_uart without usage of Bumble or other intermediary steps, but rather using common h4 hardware driver. Most commonly used port is USB CDC-ACM, as by default for most nRF boards. Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>pull/91974/head
4 changed files with 54 additions and 0 deletions
@ -0,0 +1,15 @@
@@ -0,0 +1,15 @@
|
||||
.. _snippet-hci-uart-native-sim: |
||||
|
||||
Native Simulator support for hci_uart Snippet (hci-uart-native-sim) |
||||
################################################################### |
||||
|
||||
.. code-block:: console |
||||
|
||||
west build -S hci-uart-native-sim [...] |
||||
|
||||
Overview |
||||
******** |
||||
|
||||
This snippet allows to use hci_uart connected to the host computer |
||||
with the Native Simulator. It is useful for testing with a real |
||||
Bluetooth controller, such as a device running Zephyr. |
@ -0,0 +1,8 @@
@@ -0,0 +1,8 @@
|
||||
# zephyr,native-tty-uart has a high load order |
||||
CONFIG_BT_HCI_INIT_PRIORITY=55 |
||||
|
||||
CONFIG_BT_BUF_EVT_RX_SIZE=255 |
||||
CONFIG_BT_BUF_ACL_RX_SIZE=255 |
||||
CONFIG_BT_BUF_ACL_TX_SIZE=251 |
||||
CONFIG_BT_BUF_CMD_TX_SIZE=255 |
||||
CONFIG_BT_CTLR_SCAN_DATA_LEN_MAX=191 |
@ -0,0 +1,27 @@
@@ -0,0 +1,27 @@
|
||||
/* |
||||
* Copyright (c) 2025 Dmitrii Sharshakov |
||||
* |
||||
* SPDX-License-Identifier: Apache-2.0 |
||||
*/ |
||||
|
||||
&bt_hci_userchan { |
||||
status = "disabled"; |
||||
}; |
||||
|
||||
/ { |
||||
chosen { |
||||
zephyr,bt-hci = &bt_hci_uart; |
||||
}; |
||||
|
||||
hci_uart: hci_uart { |
||||
compatible = "zephyr,native-tty-uart"; |
||||
status = "okay"; |
||||
current-speed = <2000000>; |
||||
serial-port = "/dev/ttyACM0"; |
||||
|
||||
bt_hci_uart: bt_hci_uart { |
||||
compatible = "zephyr,bt-hci-uart"; |
||||
status = "okay"; |
||||
}; |
||||
}; |
||||
}; |
Loading…
Reference in new issue