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

Extended advertising fails with zephyr Host - Controller configuration

Hi, I'm using nRF9160 as host and nRF52833 as a controller with NCS 1.5.0 SDK. On nRF52833 LPUART sample runs, I have added needed configurations for extended advertising there. On nRF9160 periodic_adv sample runs however system resets after waiting semaphore for HCI_CMD_TIMEOUT seconds in bt_hci_cmd_send_sync. (bt_le_ext_adv_start -> bt_le_ext_adv_set_data -> le_adv_update -> bt_hci_cmd_send_sync). Here is what get in the terminal:

 *** Booting Zephyr OS build v2.4.99-ncs1  ***
 
 Starting Periodic Advertising Demo
 
 
 [00:00:02.259,429] <wrn> bt_hci_core: opcode 0x0000 pool id 2 pool 0x200103fc != &hci_cmd_pool 0x200103d4
 [00:00:02.289,672] <inf> bt_hci_core: Identity: F7:90:8F:C8:9C:F6 (random)
 [00:00:02.289,672] <inf> bt_hci_core: HCI: version 5.2 (0x0b) revision 0x0000, manufacturer 0x05f1
 [00:00:02.289,672] <inf> bt_hci_core: LMP: version 5.2 (0x0b) subver 0xffff
 ASSERTION FAIL [err == 0] @ WEST_TOPDIR/zephyr/subsys/bluetooth/host/hci_core.c:333
 
   k_sem_take failed with err -11
 
 [00:00:12.293,212] <err> os: r0/a1:  0x00000003  r1/a2:  0x20014118  r2/a3:  0x200104e8
 [00:00:12.293,212] <err> os: r3/a4:  0x00000002 r12/ip:  0x0a31312d r14/lr:  0x0000fc39
 [00:00:12.293,243] <err> os:  xpsr:  0x41000000
 [00:00:12.293,243] <err> os: Faulting instruction address (r15/pc): 0x0000fc44
 [00:00:12.293,243] <err> os: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
 [00:00:12.293,243] <err> os: Current thread: 0x20010428 (unknown)
 [00:00:12.576,446] <err> fatal_error: Resetting system

With the same Host - Controller configuration I tried to run ibeacon sample which uses legacy advertising and it ran without errors. Also periodic_sync example runs as expected too, only problem is in extended advertising. What steps should be followed for this problem?

Parents
  • Hi Simon,

    I am using 1.5.0 SDK and can confirm these PRs are already applied.

    Regards,

    Safa

  • I guess this is related to https://devzone.nordicsemi.com/f/nordic-q-a/72923/nrf-connect-mobile-app-doesn-t-show-advertising-nrfxlib. Are you able to use extended advertising with the Zephyr BLE controller?

    Some developers are currently looking into this, and I'll keep you updated.

    Best regards,

    Simon

  • I think to run periodic advertising sample, using Zephyr controller is necessary so all aforementioned problems occurred while CONFIG_BT_LL_SW_SPLIT=y

    Regards, 

    Safa

  • Sorry for the delay on this. I will look into it on Friday/Monday.

    Best regards,

    Simon

  • Update 29/04/2021: Added strikethrough over false statement

    Have you made any progress on this lately?

    It seems like this is related to the 52833 specifically. 

    In zephyr\samples\bluetooth\periodic_adv\prj.conf (NCS v1.5.0) I added CONFIG_BT_LL_SW_SPLIT=y, then I built and flashed the example for respectively the nrf52833dk_nrf52833 and the nrf52840dk_nrf52840 (host and controller on the same chip).

    For the nrf52840dk_nrf52840 I got the following output:

    [00]*** Booting Zephyr OS build v2.4.99-ncs1  ***
    Starting Periodic Advertising Demo
    [00:00:00.601,562] [1B][0m<inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)[1B][0m
    [00:00:00.601,562] [1B][0m<inf> bt_hci_core: HW Variant: nRF52x (0x0002)[1B][0m
    [00:00:00.601,562] [1B][0m<inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 2.4 Build 99[1B][0m
    [00:00:00.602,142] [1B][0m<inf> bt_hci_core: Identity: CB:89:22:18:D8:D0 (random)[1B][0m
    [00:00:00.602,142] [1B][0m<inf> bt_hci_core: HCI: version 5.2 (0x0b) revision 0x0000, manufacturer 0x05f1[1B][0m
    [00:00:00.602,142] [1B][0m<inf> bt_hci_core: LMP: version 5.2 (0x0b) subver 0xffff[1B][0m
    Set Periodic Advertising Data...done.
    Set Periodic Advertising Data...done.
    Set Periodic Advertising Data...done.
    Set Periodic Advertising Data...done.
    Set Periodic Advertising Data...done.
    Set Periodic Advertising Data...done.
    Set Periodic Advertising Data...done.

    For the nrf52833dk_nrf52833 I got this output:

    [00]*** Booting Zephyr OS build v2.4.99-ncs1  ***
    Starting Periodic Advertising Demo
    Failed to create advertising set (err -5)
    [00:00:00.258,361] [1B][0m<inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)[1B][0m
    [00:00:00.258,361] [1B][0m<inf> bt_hci_core: HW Variant: nRF52x (0x0002)[1B][0m
    [00:00:00.258,361] [1B][0m<inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 2.4 Build 99[1B][0m
    [00:00:00.258,911] [1B][0m<inf> bt_hci_core: Identity: E1:73:76:DD:47:2A (random)[1B][0m
    [00:00:00.258,941] [1B][0m<inf> bt_hci_core: HCI: version 5.2 (0x0b) revision 0x0000, manufacturer 0x05f1[1B][0m
    [00:00:00.258,941] [1B][0m<inf> bt_hci_core: LMP: version 5.2 (0x0b) subver 0xffff[1B][0m
    [00:00:00.259,033] [1B][1;33m<wrn> bt_hci_core: opcode 0x2036 status 0x01[1B][0m
    

    Have you tested using an nrf52840dk as the controller? Does it work then.

    I will due some more investigations and get back to you with clearer answers.

    Best regards,

    Simon

Reply
  • Update 29/04/2021: Added strikethrough over false statement

    Have you made any progress on this lately?

    It seems like this is related to the 52833 specifically. 

    In zephyr\samples\bluetooth\periodic_adv\prj.conf (NCS v1.5.0) I added CONFIG_BT_LL_SW_SPLIT=y, then I built and flashed the example for respectively the nrf52833dk_nrf52833 and the nrf52840dk_nrf52840 (host and controller on the same chip).

    For the nrf52840dk_nrf52840 I got the following output:

    [00]*** Booting Zephyr OS build v2.4.99-ncs1  ***
    Starting Periodic Advertising Demo
    [00:00:00.601,562] [1B][0m<inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)[1B][0m
    [00:00:00.601,562] [1B][0m<inf> bt_hci_core: HW Variant: nRF52x (0x0002)[1B][0m
    [00:00:00.601,562] [1B][0m<inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 2.4 Build 99[1B][0m
    [00:00:00.602,142] [1B][0m<inf> bt_hci_core: Identity: CB:89:22:18:D8:D0 (random)[1B][0m
    [00:00:00.602,142] [1B][0m<inf> bt_hci_core: HCI: version 5.2 (0x0b) revision 0x0000, manufacturer 0x05f1[1B][0m
    [00:00:00.602,142] [1B][0m<inf> bt_hci_core: LMP: version 5.2 (0x0b) subver 0xffff[1B][0m
    Set Periodic Advertising Data...done.
    Set Periodic Advertising Data...done.
    Set Periodic Advertising Data...done.
    Set Periodic Advertising Data...done.
    Set Periodic Advertising Data...done.
    Set Periodic Advertising Data...done.
    Set Periodic Advertising Data...done.

    For the nrf52833dk_nrf52833 I got this output:

    [00]*** Booting Zephyr OS build v2.4.99-ncs1  ***
    Starting Periodic Advertising Demo
    Failed to create advertising set (err -5)
    [00:00:00.258,361] [1B][0m<inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)[1B][0m
    [00:00:00.258,361] [1B][0m<inf> bt_hci_core: HW Variant: nRF52x (0x0002)[1B][0m
    [00:00:00.258,361] [1B][0m<inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 2.4 Build 99[1B][0m
    [00:00:00.258,911] [1B][0m<inf> bt_hci_core: Identity: E1:73:76:DD:47:2A (random)[1B][0m
    [00:00:00.258,941] [1B][0m<inf> bt_hci_core: HCI: version 5.2 (0x0b) revision 0x0000, manufacturer 0x05f1[1B][0m
    [00:00:00.258,941] [1B][0m<inf> bt_hci_core: LMP: version 5.2 (0x0b) subver 0xffff[1B][0m
    [00:00:00.259,033] [1B][1;33m<wrn> bt_hci_core: opcode 0x2036 status 0x01[1B][0m
    

    Have you tested using an nrf52840dk as the controller? Does it work then.

    I will due some more investigations and get back to you with clearer answers.

    Best regards,

    Simon

Children
  • Forget the last reply. The reason it didn't work for the nrf52833 was because there were no nrf52833.conf file in the folder zephyr/samples/bluetooth/periodic_adv/boards.

    I was trying to set everything up to reproduce your problem, and thought I would start with the ibeacon sample, to make sure I got it right. However, I encountered some problems (I've don't have too much experience with BLE host controller on separate chips). Would you be able to upload the ibeacon sample as well as the periodic_adv sample you used on the nRF9160 DK, and the lpuart sample (if modified) you used on the nRF52833 DK?

Related