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.

Parents
  • 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?  

Reply
  • 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?  

Children
No Data
Related