Re: help with BLE HCI dual chip setup
Hi there,
On the board acting as a Host (i.e. the one that is running the app, not the on running hci_uart) you need to add a chosen node for zephyr,bt-uart, like here:
https://github.com/zephyrproject-rtos/zephyr/blob/main/boards/arm/hexiwear_k64/hexiwear_k64.dts#L29
More about zephyr chosen nodes here:
https://docs.zephyrproject.org/latest/reference/devicetree/api.html#id2
Carles
Sent: 29 March 2022 23:04
To: users@...
Subject: [Zephyr-users] help with BLE HCI dual chip setup
Hello,
I am testing the dual chip configuration of the BLE.
I am using two nrf52dk boards and I would like to setup one as host and one as controller.
I am following the "96Boards Carbon nRF51" sample as a reference.
my goal is to use a uart for the connection between the two boards.
I was able to build the controller part of the code but failed on the host.
I am testing with the peripheral sample project.
in the boards folder I added a .conf and .overlay files for the nrf52dk.
my nrf52dk_nrf52832.overlay file is as follows
&uart0 {
compatible = "nordic,nrf-uart";
current-speed = <1000000>;
status = "okay";
hw-flow-control;
tx-pin = <5>;
rx-pin = <4>;
rts-pin = <7>;
cts-pin = <6>;
};
my nrf52dk_nrf52832.conf file is as follows
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=n
CONFIG_USE_SEGGER_RTT=y
CONFIG_RTT_CONSOLE=y
CONFIG_LOG=y
CONFIG_LOG_DEFAULT_LEVEL=4
CONFIG_SPI_LOG_LEVEL_DBG=y
CONFIG_LOG_BACKEND_RTT=y
I added the following to prj.conf
# Incresed stack due to settings API usage
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_BT=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_SMP=y
CONFIG_BT_SIGNING=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DIS=y
CONFIG_BT_ATT_PREPARE_COUNT=5
CONFIG_BT_BAS=y
CONFIG_BT_HRS=y
CONFIG_BT_PRIVACY=y
CONFIG_BT_DEVICE_NAME="Zephyr Peripheral Sample Long Name"
CONFIG_BT_DEVICE_APPEARANCE=833
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
CONFIG_BT_DEVICE_NAME_MAX=65
CONFIG_BT_KEYS_OVERWRITE_OLDEST=y
CONFIG_BT_SETTINGS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_NVS=y
CONFIG_SETTINGS=y
# added these to enable the BLE HCI config
CONFIG_GPIO=y
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_BT_HCI=y
CONFIG_BT_CTLR=n
the project doesn't build. it gives the following error
error: '__device_dts_ord_DT_CHOSEN_zephyr_bt_uart_ORD' undeclared (first use in this function)
any advice on how to fix this or how to get get a dual chip setup to work would be very appreciated.
Thanks