zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.67k stars 6.52k forks source link

Bluetooth: Controller: hci: Wrong periodic advertising report data status #46121

Open ppryga-nordic opened 2 years ago

ppryga-nordic commented 2 years ago

Describe the bug The periodic advertising data status may be set to wrong value when preparing a report event in HCI layer.

In case there periodic advertiser:

sends a data with length that is equal to CONFIG_BT_CTLR_SCAN_DATA_LEN_MAX. the periodic advertising has included CTE the number of PDUs in a chain is larger than required for transport of advertising data (e.g. for max AD payload of 1650 bytes, minimum required number of PDUs is 7). In other words there are empty PDUs added to the chain to transport CTE. the event generated in HCI layer has data status set to BT_HCI_LE_AD_EVT_TYPE_DATA_STATUS_INCOMPLETE. That is caused by wrong condition checking if data_len_total is less than CONFIG_BT_CTLR_SCAN_DATA_LEN_MAX.

Expected behavior In such condition a report event should have data status set to BT_HCI_LE_AD_EVT_TYPE_DATA_STATUS_COMPLETE

Impact Related with periodic advertising only.

jgl-meta commented 1 year ago

@carlescufi Do you know what the status of this one is? It has been marked as stale many times.

carlescufi commented 1 year ago

@carlescufi Do you know what the status of this one is? It has been marked as stale many times.

Unfortunately still no ETA for this one yet.

cvinayak commented 9 months ago

Marked as known issue.

Controller HCI encoding of reports needs implementation to report correct data status.