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

Possible NCS controller bug for peripheral if CONFIG_BT_REMOTE_VERSION=y

The following issue is for NCS version 1.4.0 and 1.4.1 for an nRF52840 DK target.

When CONFIG_BT_AUTO_PHY_UPDATE=y for both a peripheral and central, I see in Wireshark a LL_PHY_REQ from both sides, as expected.  Here’s an example.

As soon as I simply add CONFIG_BT_REMOTE_VERSION=y to the peripheral’s prj.conf, the peripheral no longer sends a LL_PHY_REQ, as shown below.

  • Even several seconds (>5 s) after the connection, I don’t see in Wireshark an LL_PHY_REQ from the peripheral.

You should be able to reproduce this issue with the peripheral_uart and central_uart projects by just adding this line to the peripheral uart’s prj.conf:  CONFIG_BT_REMOTE_VERSION=y.

The missing LL_PHY_REQ from the peripheral has ramifications such as subsequent user-requested connection parameter updates don’t get sent when using bt_conn_le_param_update().

  • The missing le_phy_update_complete() due to the suspected bug prevents resumption of calls to conn.c/conn_auto_initiate() to continue auto-initiated procedures. 
  • That means slave_update_conn_param() never gets called in conn_auto_initiate(), which prevents the call to k_delayed_work_submit(&conn->update_work, CONN_UPDATE_TIMEOUT),
  • The missing "delayed_work" means conn_update_timeout() never runs, preventing auto connection parameter updates and subsequent user-initiated updates.

I haven't verified if this problem occurs with the Zephyr stack instead of the Nordic stack.

  • It seems that this issue was brought up here:  https://github.com/zephyrproject-rtos/zephyr/pull/17246 in this comment:

    "dnsglk on April 3, 2020:

    Thanks for the reply!

    Sorry, I still don't get it. Shouldn't the happy-flow mean that all calls should succeed (given that their corresponding if-conditions are true - IS_ENABLED):

    • hci_le_read_remote_features()
    • hci_read_remote_version()
    • hci_le_set_phy()
    • hci_le_set_data_len()
    • slave_update_conn_param()

    Why quit conn_auto_initiate() if PHY succeeds for example? Is there a relation between success on remote features and auto PHY negotiation, and DLE and Peripheral Conn Params Update Request?

    My issue is that if slave_update_conn_param() is not called at all, then there is no way peripheral can initiate the update of connection parameters after the connection is established. Neither the initial auto update (slave_update_conn_param), nor from 'bt_le_conn_param_update()`. Isn't it a bug?"

    However, the second from last comment says this:

    "joerchan on April 6, 2020:

    @dnsglk Can you create an bug-report with the missing le_phy_update_complete and tell us how to reproduce this problem? Please be as detailed as possible"

    I can't find any bug report.  Do you see any Zephyr bug report?  If not, can someone ask @dnsglk to create one?

    Do you agree the issue I stated is the same as the issue "dnsglk" stated?  

  • Hi, Variant!

    I've brought this up internally and will hopefully have an answer from the developers soon. In the meantime I suggest that you in reach out to Zephyr trough one of their preferred channels aswell as the issue in the Zephyr GitHub repository seems related. You can for example create your own GitHub issue. 

    From what I can see dnslk haven't posted any issues or bug reports. He is not, from what I know, a Nordic employee so I guess it will be just as effective if you ask him to create an issue on the matter. 

    Will report back as soon as I get something back from the developers! Thank you for your patience.

    Best regards,
    Carl Richard

  • Thanks Carl! 

    I should add that this issue is not urgent as we can simply not enable CONFIG_BT_REMOTE_VERSION.   But it did take me considerable time to isolate the issue to CONFIG_BT_REMOTE_VERSION and determine it's related to the conn_auto_initiate() state machine.  At least this issue is easily reproducible with the peripheral_uart project.


  • Hi again, Mike!

    Good to hear that it's not urgent. We will still strive to figure this out. Could you provide the full Wireshark Sniffer log for the developers to look at?

    Best regards,
    Carl Richard

  • Just to confirm, you tested this using the Softdevice controller, not the Zephyr BLE controller, correct? 

    Best regards,
    Carl Richard

Related