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

NCS scan_adv example doesn't work on nrf52811

Hi All,

I tried NCS example scan_adv to test nrf52811 however it's stopped on bt_enable()

the log as:

[16:36:13:020] *** Booting Zephyr OS build v2.4.0-ncs1-1699-gcdc4c217fbd0 ***␍␊

[16:36:13:025] Starting Scanner/Advertiser Demo␍␊

[16:36:13:028] Bluetooth init failed (err -35)␍␊

[16:36:13:031] [00:00:00.008,666] <0x1b>[0m<inf> sdc_hci_driver: SoftDevice Controller build revision: ␍␊

[16:36:13:039] d4 43 b5 cf 63 22 e9 d4 ed 8a 24 d0 4c a1 f7 b1 |.C..c".. ..$.L...␍␊

[16:36:13:048] a4 26 85 75 |.&.u <0x1b>[0m␍␊

[16:36:13:058] [00:00:00.008,697] <0x1b>[1;31m<err> bt_hci_core: HCI driver open failed (-35)<0x1b>[0m␍␊

I verified nrf52840 it's working.

Is there any issue to run scan_adv on nrf52811 ?

BR,

Sam

Parents Reply
  • Hi Sam, 
    It's the following enum: 

    /** Advertising PDU types */
    enum {
    /** Scannable and connectable advertising. */
    BT_GAP_ADV_TYPE_ADV_IND = 0x00,
    /** Directed connectable advertising. */
    BT_GAP_ADV_TYPE_ADV_DIRECT_IND = 0x01,
    /** Non-connectable and scannable advertising. */
    BT_GAP_ADV_TYPE_ADV_SCAN_IND = 0x02,
    /** Non-connectable and non-scannable advertising. */
    BT_GAP_ADV_TYPE_ADV_NONCONN_IND = 0x03,
    /** Additional advertising data requested by an active scanner. */
    BT_GAP_ADV_TYPE_SCAN_RSP = 0x04,
    /** Extended advertising, see advertising properties. */
    BT_GAP_ADV_TYPE_EXT_ADV = 0x05,
    };

    Inside gap.h

    If it's CODED, the flag adv_type should be BT_GAP_ADV_TYPE_EXT_ADV , but you need to check the primary_phy&secondary_phy as well to check which exact PHY used. 
    It's inside the bt_le_scan_recv_info struct. 

Children
No Data
Related