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

[nRF Connect SDK V1.5] Periodic Extended Advertising Examples not working

Hi all,

As I wanted to try out the new extended periodic advertising examples (periodic_adv and periodic_sync) located under /v1.5.0/zephyr/samples/bluetooth of the latest nRF Connect SDK (V1.5.0). This post focuses on the periodic_adv sample.

Try with the nrf softdevice

On line 335 (bt_hci_cmd_send_sync()) I stumbled upon an error code with value -1, since coming from the HCI I suppose it means BT_HCI_ERR_UNKNOWN_CMD from which I deduce that periodic extended advertising is not yet supported by the softdevice that is used with that version of the SDK and the nrf52840 DK. Question Number 1: is that correct?

The call stack leading to this error is as follows:

main()

    main.c line 37: bt_le_per_adv_set_param()

                hci_core line 7156: bt_hci_cmd_send_sync()

                            hci_core line 335 status = cmd(buf)->status; Here the status is -1

                            hci_core line 337 bt_hci_cmd_send_sync()

Because of status being -1 the bt_le_per_adv_set_param() function fails and the execution is aborted.

Try with the Zephyr BLE Controller

Since the samples are located in the Zephyr directory and not in the nrf directory I tried to select the BLE controller from Zephyr by enabling BLE_LL_SW_SPLIT in the sdk configuration tool. By using the BLE controller form Zephyr I don't get the BT_HCI_ERR_UNKNOWN_CMD error anymore but instead I run in a semaphore timeout, the call stack is as follows :

main()

          line 52: bt_le_ext_adv_start()

                      line 8754:  set_le_adv_enable_ext()

                                        line 561: bt_hci_cmd_send_sync()

                                                  line 332: hci_core  k_sem_take()

                                                  line 333: BT_ASSERT_MSG() with err being -11

Here is a screenshot of the Terminal:

Question number 2: does that mean that the BLE Controller from Zephyr does not yet support periodic extended advertising?

Here I found that the Zephyr BLE Controller does not support extended advertising. Which brings me to Question 3: Can you provide a roadmap as to when the periodic advertising samples will be supported respectively by the softdevice and the Zephyr BLE Controller?

I hope I have exposed my problem clearly, I am looking forward to reading your answers

Cheers

Colin

Parents
  • Hi,

    Question Number 1: is that correct?

     Correct. Periodic advertising is not supported by the SoftDevice Controller today. You need to use the Zephyr Controller for that.

    Question number 2: does that mean that the BLE Controller from Zephyr does not yet support periodic extended advertising?

     Support for Periodic Advertising (both Advertising and Scanning procedures) in the Zephyr Host and Controller(experimental support) was added in Zephyr v2.4

    I tested the periodic_adv sample in NCS v1.5.0. In zephyr\samples\bluetooth\periodic_adv\prj.conf I added 

    CONFIG_BT_LL_SW_SPLIT=y
    And I built and tested the sample on a nrf52840dk_nrf52840
    And it worked fine. Log output:

    *** Booting Zephyr OS build v2.4.99-ncs1  ***
    Starting Periodic Advertising Demo
    [00:00:00.694,213] [1B][0m<inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)[1B][0m
    [00:00:00.694,213] [1B][0m<inf> bt_hci_core: HW Variant: nRF52x (0x0002)[1B][0m
    [00:00:00.694,213] [1B][0m<inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 2.4 Build 99[1B][0m
    [00:00:00.694,763] [1B][0m<inf> bt_hci_core: Identity: DD:F2:72:F3:85:37 (random)[1B][0m
    [00:00:00.694,763] [1B][0m<inf> bt_hci_core: HCI: version 5.2 (0x0b) revision 0x0000, manufacturer 0x05f1[1B][0m
    [00:00:00.694,793] [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.
    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.
    

    Did you use a nRF52840 DK, or something else?

Reply
  • Hi,

    Question Number 1: is that correct?

     Correct. Periodic advertising is not supported by the SoftDevice Controller today. You need to use the Zephyr Controller for that.

    Question number 2: does that mean that the BLE Controller from Zephyr does not yet support periodic extended advertising?

     Support for Periodic Advertising (both Advertising and Scanning procedures) in the Zephyr Host and Controller(experimental support) was added in Zephyr v2.4

    I tested the periodic_adv sample in NCS v1.5.0. In zephyr\samples\bluetooth\periodic_adv\prj.conf I added 

    CONFIG_BT_LL_SW_SPLIT=y
    And I built and tested the sample on a nrf52840dk_nrf52840
    And it worked fine. Log output:

    *** Booting Zephyr OS build v2.4.99-ncs1  ***
    Starting Periodic Advertising Demo
    [00:00:00.694,213] [1B][0m<inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)[1B][0m
    [00:00:00.694,213] [1B][0m<inf> bt_hci_core: HW Variant: nRF52x (0x0002)[1B][0m
    [00:00:00.694,213] [1B][0m<inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 2.4 Build 99[1B][0m
    [00:00:00.694,763] [1B][0m<inf> bt_hci_core: Identity: DD:F2:72:F3:85:37 (random)[1B][0m
    [00:00:00.694,763] [1B][0m<inf> bt_hci_core: HCI: version 5.2 (0x0b) revision 0x0000, manufacturer 0x05f1[1B][0m
    [00:00:00.694,793] [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.
    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.
    

    Did you use a nRF52840 DK, or something else?

Children
  • Hi Sigurd,

    Thank you for your answer, it did the trick.  I managed to get the Advertiser going and have the same output as your screenshot.

    Could you provide me with more info as to when your softdevices may support the extended periodic advertising?

    Cheers

    Colin Cina

  • Hi,

    ColinC said:
    Thank you for your answer, it did the trick.  I managed to get the Advertiser going and have the same output as your screenshot.

     Great!

    ColinC said:

    Could you provide me with more info as to when your softdevices may support the extended periodic advertising?

     For information regarding release schedules and roadmaps, please contact your local Nordic Regional Sales Manager(RSM). If you do not have any contact information, then let me know where you're based in a PM and I will provide you with the local RSMs contact info.

Related