Extended Advertising with FEM/MPSL

SDK: 2.6.1 (2.9 seems to give an HCI build error , undefined reference to `__device_dts_ord_135',  when enabled  CONFIG_BT_LL_SW_SPLIT, CONFIG_BT_LLL_VENDOR_NORDIC ?)

SOC:NRF52840

I am using the Ezurio/Laird BL654PA, but I found an issue when enabled  the FEM and using the Extended Advertising to allow advertising on the Coded phy.

Overlay - this seems to provide a strong RSSI using standard advertising phy:

/ {
    nrf_radio_fem: name_of_fem_node {
        compatible = "skyworks,sky66112-11", "generic-fem-two-ctrl-pins";
        ctx-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>; // p1.02
        crx-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>; // p1.04
        tx-gain-db = <4>;  // db of 4 plus CONFIG_BT_CTLR_TX_PWR_PLUS_8 seems the highest?
    };
};

&radio {
    fem = <&nrf_radio_fem>;
};

If I add the FEM support in the prf.conf file with Advertising extensions, I get an HCI error.

If i disable CONFIG_MPSL_FEM, and CONFIG_MPSL, the extended advertising works well.

Is there a way to allow both Coded Phy advertising to work with FEM? Thanks!

 

prj.conf

CONFIG_MPSL_FEM=y
CONFIG_MPSL=y

CONFIG_BT_EXT_ADV=y
CONFIG_BT_CTLR_PHY_CODED=y
CONFIG_BT_PHY_UPDATE=y
CONFIG_BT_AUTO_PHY_UPDATE=y
CONFIG_BT_LLL_VENDOR_NORDIC=y
CONFIG_BT_LL_SW_SPLIT=y

Error output:

ASSERTION FAIL [err == 0] @ WEST_TOPDIR/zephyr/subsys/bluetooth/host/hci_core.c:331
        command opcode 0x0c03 timeout with err -11

  • Hi,

    (2.9 seems to give an HCI build error , undefined reference to `__device_dts_ord_135',

    It would be interesting to solve this issue instead of using an old SDK, see here.

    when enabled  CONFIG_BT_LL_SW_SPLIT,

    This config is used to enable the Zephyr BLE link layer, and that is not supported. 

    If i disable CONFIG_MPSL_FEM, and CONFIG_MPSL, the extended advertising works well.

    If you are trying to use CONFIG_BT_LL_SW_SPLIT that will not work in combination with the MPSL, the MPSL only works with the SoftDevice Controller (which is the one you should use).

    Is there a way to allow both Coded Phy advertising to work with FEM? Thanks!

    Yes, that should not be a problem. But make sure you do not change to Zephyr LL. See Enabling support for front-end modules using Simple GPIO interface.

  • I only enabled the SW_SPLIT because I thought I needed this to enable two advertising sets, one for standard 1mbps phy and one for coded phy. Per the warning below:

    warning: BT_CTLR_ADV_AUX_SET (defined at subsys/bluetooth/controller/Kconfig.ll_sw_split:319) was
    assigned the value '2' but got the value ''. Check these unsatisfied dependencies: BT_LL_SW_SPLIT
    (=n). See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BT_CTLR_ADV_AUX_SET and/or look
    up BT_CTLR_ADV_AUX_SET in the menuconfig/guiconfig interface. The Application Development Primer,
    Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
    helpful too.

    Perhaps it will work just with the following settings and not need the SW_SPLIT?

    CONFIG_BT_EXT_ADV_MAX_ADV_SET=2
    CONFIG_BT_EXT_ADV=y
    CONFIG_BT_CTLR_PHY_CODED=y

    Update: 

    Removing the SW_SPLIT and CONFIG_BT_CTLR_ADV_AUX_SET seems to still allow both standard and coded phy advertising on two different advertising sets. I can find the device scanning on LE 1M and coded phy. 

    I do get this odd error message that setting the phy fails "Failed LE Set PHY (-5)".  This may not be a problem because the phy update reports the connection is using the coded phy.  It might be coming from 
    bt_conn_le_phy_update call.  I would like to request the coded phy even if the connection was initiated on the 1Mbps phy.



    Connection (1) - Initial Tx Power = 8
    [00:00:27.780,364] <inf> ble_periph: Gap connected peripheral id: 0, handle: 1.
    [00:00:27.780,975] <wrn> bt_hci_core: opcode 0x2032 status 0x3a
    [00:00:27.780,975] <err> bt_hci_core: Failed LE Set PHY (-5)
    [00:00:28.023,986] <inf> main: Conn 0 RSSI is -30 db.
    [00:00:28.697,235] <inf> ble_main: Phy Updated to RX=4 TX=4
    [00:00:29.024,353] <inf> main: Conn 0 RSSI is -32 db.
    Updated MTU: TX: 517 RX: 498 bytes
    [00:00:30.024,810] <inf> main: Conn 0 RSSI is -35 db.
    [00:00:31.025,177] <inf> main: Conn 0 RSSI is -35 db.
  • Hi,

    I am glad to hear it is working. Regarding the error, it is printed here in conn.c. This is only calle dwith CONFIG_BT_AUTO_PHY_UPDATE, and if that is not something you need or want (it is handled explicitly by the application or the peer,), you can set CONFIG_BT_AUTO_PHY_UPDATE=n in your project configuration. That said, following this further down I think it comes from here, but it could be interesting to confirm that with a debugger, and see what else you can find that way if you want CONFIG_BT_AUTO_PHY_UPDATE enabled.

Related