Hi,
I tried running the \zephyr\samples\bluetooth\periodic_adv program as a host-only application on the nrf52840 development board, with the controller using an nrf52832, and the two devices connected via HCI UART.The nrf52832 has been flashed with the Zephyr HCI_UART program.
However, the program has an error when executing the following line of code:
err = le_ext_adv_param_set(adv, param, false);
I used the logic analyzer to capture the communication instructions between the two devices, and found that the controller returned the following instructions: 04 0F 04 01 01 36 20. According to Bluetooth Core v5.4, this appears to prompt "UNKNOWN HCI COMMAND". I want to know how to solve this problem.
The prj.conf file used on nrf52840 looks like this:
CONFIG_BT=y
CONFIG_BT_EXT_ADV=y
CONFIG_BT_PER_ADV=y
CONFIG_LOG=y
CONFIG_BT_DEVICE_NAME="Test Periodic Advertising"
CONFIG_BT_HCI=y
CONFIG_BT_CTLR=n
CONFIG_BT_H4=y
The overlay file used on nrf52840 looks like this:
&pinctrl {
uart1_default: uart1_default {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 28)>,
<NRF_PSEL(UART_RTS, 0, 29)>;
};
group2 {
psels = <NRF_PSEL(UART_RX, 0, 30)>,
<NRF_PSEL(UART_CTS, 0, 31)>;
bias-pull-up;
};
};
uart1_sleep: uart1_sleep {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 28)>,
<NRF_PSEL(UART_RX, 0, 30)>,
<NRF_PSEL(UART_RTS, 0, 29)>,
<NRF_PSEL(UART_CTS, 0, 31)>;
low-power-enable;
};
};
};
&uart0 {
compatible = "nordic,nrf-uarte";
status = "okay";
current-speed = <115200>;
hw-flow-control;
};
&uart1 {
compatible = "nordic,nrf-uarte";
status = "okay";
current-speed = <115200>;
hw-flow-control;
pinctrl-0 = <&uart1_default>;
pinctrl-1 = <&uart1_sleep>;
pinctrl-names = "default", "sleep";
};
&spi1 {
status = "disabled";
};
/ {
chosen {
nordic,nus-uart = &uart0;
zephyr,bt-uart = &uart1;
};
};