HCI UART

Hi, 

I'm trying to use the HCI UART sample to provide Bluetooth support through UART. At first I want to test it between two Nordic Boards, but later switch to another MCU.

One first nRF52840 DK I have flashed the HCI UART sample.

One the second nRF52840 DK I have flashed a peripheral_hr sample and added the the required configs:

CONFIG_BT_HCI=y
CONFIG_BT_LL_SW_SPLIT=n
I have also created an overlay file for the peripheral_hr build
/ {
	chosen {
		zephyr,bt-hci = &uart1;
	};
};

&uart1
{
	current-speed = <1000000>;
	hw-flow-control;
	status = "okay";

    bt_hci_uart: bt_hci_uart {
		compatible = "zephyr,bt-hci-uart";
		status = "okay";
	};
};
&uart1_default {
	group2 {
		psels = <NRF_PSEL(UART_RX, 1, 1)>,
				<NRF_PSEL(UART_TX, 1, 2)>,
				<NRF_PSEL(UART_RTS, 1, 3)>,
				<NRF_PSEL(UART_CTS, 1, 4)>;
	};
};
I have connected UART0 from nRF52840 DK (HCI UART) to UART1 from nRF52840 (peripheral_hr)
RTS (0.05) -> CTS (P1.04)
TX (P0.06) -> RX (P1.01)
CTS (P0.07) -> RTS (P1.03)
RX (P0.08) -> TX (1.02)
GND -> GND
When testing I receive the error "HCI driver open failed (-1)" which comes from uarte_nrfx_poll_in, more specific from
if (!nrf_uarte_event_check(uarte, NRF_UARTE_EVENT_ENDRX)) {
        return -1;
    }
Do you have any idea why the input buffer is always empty?
Do the nRF52840 DK (peripheral_hr) need to be able to reset the nRF52840 DK (hci_uart)?
I assume I should not add the overlay-all-bt_ll_sw_split.conf when building the HCI UART sample?
Best regards,
Christoffer
Parents Reply Children
  • Hi Siguard,
    Thanks so far 
    HCI                   HOST
    RTS (1.03) -> CTS (P1.04)
    TX (P1.02) -> RX (P1.01)
    CTS (P1.04) -> RTS (P1.03)
    RX (P1.01) -> TX (1.02)
    I have tried adding the configs to the peripheral_hr prj.conf without any luck.
    I also started playing with the reset but couldn't get bt_hci_transport_setup to be called. I assume it is called from h4_open?
    From what I hear the reset shouldn't be entirely necessary, so maybe we shouldn't put to much focus on that?
Related