This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Scan and advertise in nRF9160 dk

Hi , 

I ran the example "zephyr\samples\bluetooth\scan_adv" on the nRF9160 dk kit . 

It says the following error

"

2020-07-16T02:22:00.682Z DEBUG modem << ***** Booting Zephyr OS v1.14.99-ncs2 *****
2020-07-16T02:22:00.737Z DEBUG modem << Starting Scanner/Advertiser Demo
2020-07-16T02:22:00.742Z DEBUG modem << Bluetooth init failed (err -19)
2020-07-16T02:22:00.747Z DEBUG modem << [00:00:00.008,117] 1B[1;31m<err> bt_hci_core: No HCI driver registered

"

How to resolve this ? do i need to flash anything else 

Parents
  • Hi,

    How to resolve this ? do i need to flash anything else 

    You need to flash the hci_uart sample to the nRF52840 on the nRF91-DK. Board name nrf9160dk_nrf52840

    You might also need to set this in prj.conf:

    CONFIG_BT_H4=y
    CONFIG_BT_WAIT_NOP=y
    
    
    CONFIG_UART_2_NRF_FLOW_CONTROL=y
    CONFIG_UART_INTERRUPT_DRIVEN=y
    

    and an overlay, nrf9160dk_nrf9160ns.overlay , like this:

    / {
    	chosen {
    		zephyr,bt-uart=&uart2;
    	};
    };
    
    &uart2 {
    	compatible = "nordic,nrf-uarte";
    	current-speed = <1000000>;
    	status = "okay";
    	tx-pin = <18>;
    	rx-pin = <17>;
    	rts-pin = <21>;
    	cts-pin = <19>;
    };

    Similar to how it's done in the lte_ble_gateway sample.

Reply
  • Hi,

    How to resolve this ? do i need to flash anything else 

    You need to flash the hci_uart sample to the nRF52840 on the nRF91-DK. Board name nrf9160dk_nrf52840

    You might also need to set this in prj.conf:

    CONFIG_BT_H4=y
    CONFIG_BT_WAIT_NOP=y
    
    
    CONFIG_UART_2_NRF_FLOW_CONTROL=y
    CONFIG_UART_INTERRUPT_DRIVEN=y
    

    and an overlay, nrf9160dk_nrf9160ns.overlay , like this:

    / {
    	chosen {
    		zephyr,bt-uart=&uart2;
    	};
    };
    
    &uart2 {
    	compatible = "nordic,nrf-uarte";
    	current-speed = <1000000>;
    	status = "okay";
    	tx-pin = <18>;
    	rx-pin = <17>;
    	rts-pin = <21>;
    	cts-pin = <19>;
    };

    Similar to how it's done in the lte_ble_gateway sample.

Children
Related