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

Coded PHY Advertising on nRF Connect SDK

Hey All,

I ran into an issue on the nRF Connect SDK trying to get a nRF52840 advertising using CODED PHY. I figure it's not fully implemented yet are there any updates on timeline for that? I also posted a bug in the Zephyr repo.

Describe the bug
BLE advertising failed to start on a nRF52840 when enabling BT_LE_ADV_OPT_EXT_ADV.

[00:00:00.002,960] <inf> ble_m: BLE Stack Ready!
[00:00:00.002,960] <inf> ble_peripheral: Bluetooth initialized
[00:00:00.002,960] <err> ble_peripheral: Advertising failed to start (err -22)

To Reproduce

  1. Choose any BLE example
  2. Use a compatible board like nrf52840dk_nrf52840
  3. Add CONFIG_BT_EXT_ADV=y to your prj.conf
  4. When initializing struct bt_le_adv_param *adv_param = add these two flags BT_LE_ADV_OPT_CODED | BT_LE_ADV_OPT_EXT_ADV

Looks like this:


struct bt_le_adv_param *adv_param = BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE | BT_LE_ADV_OPT_ONE_TIME | BT_LE_ADV_OPT_CODED | BT_LE_ADV_OPT_EXT_ADV, BT_GAP_ADV_FAST_INT_MIN_2, BT_GAP_ADV_FAST_INT_MAX_2, NULL);


For instance, if I used the throughput example in the SDK and try to set BT_LE_ADV_OPT_CODED | BT_LE_ADV_OPT_EXT_ADV as some of the parameters it always return -22. Looking further into it, it appears that CODED PHY advertising is (purposefully?) disabled in valid_adv_param.

Any insight is appreciated!

Parents
  • The Zephyr link layer does not support extended advertising. Whereas the Nordic one does. Enabling these two in my prj.conf seems to fix the errors. I've yet been able to scan/connect though..

    # Link Layer
    CONFIG_BT_LL_NRFXLIB_VS_INCLUDE=y
    CONFIG_BT_LL_NRFXLIB_DEFAULT=y
  • the problem is, Zehpyr can't see the NRFxlib

    I followed this tutorial to install NRFx with zephyr with no luck

    https://jimmywongiot.com/2019/12/18/step-by-step-on-nordic-connect-sdk-for-development/

    tried also to copy the nrfxlib and import the kconfig file into my zephyr enviroment.

    https://github.com/nrfconnect/sdk-nrfxlib

    actually, I find nowhere in any file on nrfx library this text "LL_NRFXLIB"

    tried also to include CONFIG_SOFTDEVICE_CONTROLLER_S140 with no luck.

    so, What do i miss?

    I always get

    prj.conf:9: warning: attempt to assign the value 'y' to the undefined symbol BT_LL_NRFXLIB_DEFAULT

    same for CONFIG_BT_LL_NRFXLIB_VS_INCLUDE

    this is my prj.conf

    CONFIG_BT=y
    CONFIG_BT_BROADCASTER=y
    CONFIG_BT_OBSERVER=y
    CONFIG_BOARD_NRF52840DONGLE_NRF52840=y

    # Link Layer
    #NRF
    #CONFIG_SOFTDEVICE_CONTROLLER_S140=y
    CONFIG_BT_LL_NRFXLIB_DEFAULT=y
    #NRF
    CONFIG_BT_EXT_ADV=y
    CONFIG_BT_CTLR_PHY_CODED=y
    CONFIG_GPIO=y

    CONFIG_USB=y
    CONFIG_USB_DEVICE_STACK=y
    CONFIG_USB_DEVICE_PRODUCT="Qoudra BLE"
    CONFIG_USB_UART_CONSOLE=y

    CONFIG_UART_INTERRUPT_DRIVEN=y
    CONFIG_UART_LINE_CTRL=y
    CONFIG_UART_CONSOLE_ON_DEV_NAME="CDC_ACM_0"                                                

Reply
  • the problem is, Zehpyr can't see the NRFxlib

    I followed this tutorial to install NRFx with zephyr with no luck

    https://jimmywongiot.com/2019/12/18/step-by-step-on-nordic-connect-sdk-for-development/

    tried also to copy the nrfxlib and import the kconfig file into my zephyr enviroment.

    https://github.com/nrfconnect/sdk-nrfxlib

    actually, I find nowhere in any file on nrfx library this text "LL_NRFXLIB"

    tried also to include CONFIG_SOFTDEVICE_CONTROLLER_S140 with no luck.

    so, What do i miss?

    I always get

    prj.conf:9: warning: attempt to assign the value 'y' to the undefined symbol BT_LL_NRFXLIB_DEFAULT

    same for CONFIG_BT_LL_NRFXLIB_VS_INCLUDE

    this is my prj.conf

    CONFIG_BT=y
    CONFIG_BT_BROADCASTER=y
    CONFIG_BT_OBSERVER=y
    CONFIG_BOARD_NRF52840DONGLE_NRF52840=y

    # Link Layer
    #NRF
    #CONFIG_SOFTDEVICE_CONTROLLER_S140=y
    CONFIG_BT_LL_NRFXLIB_DEFAULT=y
    #NRF
    CONFIG_BT_EXT_ADV=y
    CONFIG_BT_CTLR_PHY_CODED=y
    CONFIG_GPIO=y

    CONFIG_USB=y
    CONFIG_USB_DEVICE_STACK=y
    CONFIG_USB_DEVICE_PRODUCT="Qoudra BLE"
    CONFIG_USB_UART_CONSOLE=y

    CONFIG_UART_INTERRUPT_DRIVEN=y
    CONFIG_UART_LINE_CTRL=y
    CONFIG_UART_CONSOLE_ON_DEV_NAME="CDC_ACM_0"                                                

Children
No Data
Related