Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth: Channel Sounding: Add several channel sounding HCI commands #78455

Merged

Conversation

olivier-le-sage
Copy link
Contributor

@olivier-le-sage olivier-le-sage commented Sep 15, 2024

Adds HCI support for:

  • LE CS Read Remote Supported Capabilities
  • LE CS Read Remote FAE Table
  • LE CS Test

@olivier-le-sage olivier-le-sage changed the title Cs capabilities and test DNM Sep 15, 2024
@olivier-le-sage olivier-le-sage force-pushed the cs-capabilities-and-test branch 2 times, most recently from 7669453 to c9bea05 Compare September 16, 2024 08:08
@olivier-le-sage olivier-le-sage changed the title DNM Bluetooth: Channel Sounding: Add several channel sounding HCI commands Sep 16, 2024
@olivier-le-sage olivier-le-sage force-pushed the cs-capabilities-and-test branch 5 times, most recently from c9a1e1d to 5c4341b Compare September 16, 2024 11:17
@olivier-le-sage olivier-le-sage marked this pull request as ready for review September 16, 2024 12:34
@Thalley Thalley removed their request for review September 16, 2024 13:06
@jhedberg
Copy link
Member

I'd like to see some kind of high-level architectural picture/plan for this feature. At the moment it seems like you're mapping HCI 1:1 to new Zephyr Bluetooth APIs, but that's not necessarily the most suitable or convenient abstraction for higher-level users (e.g. GATT services or whatever else will be the consumer of these APIs).

@theob-pro
Copy link
Contributor

I'd like to see some kind of high-level architectural picture/plan for this feature. At the moment it seems like you're mapping HCI 1:1 to new Zephyr Bluetooth APIs, but that's not necessarily the most suitable or convenient abstraction for higher-level users (e.g. GATT services or whatever else will be the consumer of these APIs).

From my understanding it's best to have a direct access to those HCI commands like that, the "real" work will be done by the profile. It's best to avoid doing too much magic in the Host so it can stay as simple as possible.

@jhedberg
Copy link
Member

From my understanding it's best to have a direct access to those HCI commands like that, the "real" work will be done by the profile. It's best to avoid doing too much magic in the Host so it can stay as simple as possible.

I agree that it's often the case, but not necessarily always. It'd help a lot to see the API used in practice (not just in the shell). What we have now is a new API with no in-tree users (not counting the shell commands). There are no sample applications or tests in this PR. This is the second CS PR, and I assume there are still more to come - I just wonder at what point the "big picture" will start to emerge.

@theob-pro
Copy link
Contributor

I agree that it's often the case, but not necessarily always. It'd help a lot to see the API used in practice (not just in the shell). What we have now is a new API with no in-tree users (not counting the shell commands). There are no sample applications or tests in this PR. This is the second CS PR, and I assume there are still more to come - I just wonder at what point the "big picture" will start to emerge.

I understand your concern and that's exactly why imo, the less the Host do, the more it will be able to fit in the different use cases that the users will come with. I agree with you, having use cases from user would be better but CS is quite new and until someone implement the profile there will be no real users.
In the worst case the API is marked as experimental and can be changed at any time if we realize that there is something fundamentally wrong with what we have done.

* - Bit 1: CS Channel Selection Algorithm #3c
* - Bit 2: CS phase-based ranging from RTT sounding sequence.
*/
uint16_t subfeatures_supported;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a bit inconsistent that we stopped mapping the bits into booleans beyond this member. Is it intentional?

Should we instead always use the full value and just add bitmask macros?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a fair point. What's the rationale here?

@olivier-le-sage
Copy link
Contributor Author

I'd like to see some kind of high-level architectural picture/plan for this feature. At the moment it seems like you're mapping HCI 1:1 to new Zephyr Bluetooth APIs, but that's not necessarily the most suitable or convenient abstraction for higher-level users (e.g. GATT services or whatever else will be the consumer of these APIs).

For the LE CS Test command at least, there's no upper layers that build upon it afaik. It's largely independent from the rest of the feature. I expect it will be used for demo applications and regression/interop testing (or similar) so I expect this part of the API to be used directly in apps.

But let me try to give some more info about our plans so that it's hopefully more clear what comes next after this PR. In general our vision for this work is to implement relatively little logic in the zephyr BLE host for this feature. We're implementing:

  • HCI wrappers and callbacks for the commands and events
  • Subevent result recombination
  • Some basic samples to demonstrate setting up CS Test and ACL-based CS.

In the nordic fork we'll be implementing the Ranging Profile (RAP https://www.bluetooth.com/specifications/specs/ranging-profile/ ) and Ranging Service (RAS https://www.bluetooth.com/specifications/specs/ranging-service/) used to exchange CS data over ACLs, so we will also be working to ensure these APIs are as useful as possible to upper layers. There are some good diagrams in those documents showing some interactions between host and controller

bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 24, 2024
…d FAE table

Adds HCI support for:
- LE CS Read Remote Supported Capabilities
- LE CS Read Remote FAE Table

Callbacks have been added to the conn object to allow upper layers to
make use of the cache commands, with which it will be possible to store
this information and provide it again in the case of a disconnect
and reconnect to the same device.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 24, 2024
Adds HCI support for the LE CS Test command.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 25, 2024
…d FAE table

Adds HCI support for:
- LE CS Read Remote Supported Capabilities
- LE CS Read Remote FAE Table

Callbacks have been added to the conn object to allow upper layers to
make use of the cache commands, with which it will be possible to store
this information and provide it again in the case of a disconnect
and reconnect to the same device.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 25, 2024
Adds HCI support for the LE CS Test command.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 25, 2024
…d FAE table

Adds HCI support for:
- LE CS Read Remote Supported Capabilities
- LE CS Read Remote FAE Table

Callbacks have been added to the conn object to allow upper layers to
make use of the cache commands, with which it will be possible to store
this information and provide it again in the case of a disconnect
and reconnect to the same device.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 25, 2024
Adds HCI support for the LE CS Test command.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 27, 2024
…d FAE table

Adds HCI support for:
- LE CS Read Remote Supported Capabilities
- LE CS Read Remote FAE Table

Callbacks have been added to the conn object to allow upper layers to
make use of the cache commands, with which it will be possible to store
this information and provide it again in the case of a disconnect
and reconnect to the same device.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 27, 2024
Adds HCI support for the LE CS Test command.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 27, 2024
…d FAE table

Adds HCI support for:
- LE CS Read Remote Supported Capabilities
- LE CS Read Remote FAE Table

Callbacks have been added to the conn object to allow upper layers to
make use of the cache commands, with which it will be possible to store
this information and provide it again in the case of a disconnect
and reconnect to the same device.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 27, 2024
Adds HCI support for the LE CS Test command.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 27, 2024
…d FAE table

Adds HCI support for:
- LE CS Read Remote Supported Capabilities
- LE CS Read Remote FAE Table

Callbacks have been added to the conn object to allow upper layers to
make use of the cache commands, with which it will be possible to store
this information and provide it again in the case of a disconnect
and reconnect to the same device.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 27, 2024
Adds HCI support for the LE CS Test command.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 30, 2024
…d FAE table

Adds HCI support for:
- LE CS Read Remote Supported Capabilities
- LE CS Read Remote FAE Table

Callbacks have been added to the conn object to allow upper layers to
make use of the cache commands, with which it will be possible to store
this information and provide it again in the case of a disconnect
and reconnect to the same device.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 30, 2024
Adds HCI support for the LE CS Test command.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 30, 2024
…d FAE table

Adds HCI support for:
- LE CS Read Remote Supported Capabilities
- LE CS Read Remote FAE Table

Callbacks have been added to the conn object to allow upper layers to
make use of the cache commands, with which it will be possible to store
this information and provide it again in the case of a disconnect
and reconnect to the same device.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 30, 2024
Adds HCI support for the LE CS Test command.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 1, 2024
…d FAE table

Adds HCI support for:
- LE CS Read Remote Supported Capabilities
- LE CS Read Remote FAE Table

Callbacks have been added to the conn object to allow upper layers to
make use of the cache commands, with which it will be possible to store
this information and provide it again in the case of a disconnect
and reconnect to the same device.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 1, 2024
Adds HCI support for the LE CS Test command.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 1, 2024
…d FAE table

Adds HCI support for:
- LE CS Read Remote Supported Capabilities
- LE CS Read Remote FAE Table

Callbacks have been added to the conn object to allow upper layers to
make use of the cache commands, with which it will be possible to store
this information and provide it again in the case of a disconnect
and reconnect to the same device.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 1, 2024
Adds HCI support for the LE CS Test command.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 1, 2024
…d FAE table

Adds HCI support for:
- LE CS Read Remote Supported Capabilities
- LE CS Read Remote FAE Table

Callbacks have been added to the conn object to allow upper layers to
make use of the cache commands, with which it will be possible to store
this information and provide it again in the case of a disconnect
and reconnect to the same device.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 1, 2024
Adds HCI support for the LE CS Test command.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 1, 2024
…d FAE table

Adds HCI support for:
- LE CS Read Remote Supported Capabilities
- LE CS Read Remote FAE Table

Callbacks have been added to the conn object to allow upper layers to
make use of the cache commands, with which it will be possible to store
this information and provide it again in the case of a disconnect
and reconnect to the same device.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 1, 2024
Adds HCI support for the LE CS Test command.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 4, 2024
…d FAE table

Adds HCI support for:
- LE CS Read Remote Supported Capabilities
- LE CS Read Remote FAE Table

Callbacks have been added to the conn object to allow upper layers to
make use of the cache commands, with which it will be possible to store
this information and provide it again in the case of a disconnect
and reconnect to the same device.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 4, 2024
Adds HCI support for the LE CS Test command.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 4, 2024
…d FAE table

Adds HCI support for:
- LE CS Read Remote Supported Capabilities
- LE CS Read Remote FAE Table

Callbacks have been added to the conn object to allow upper layers to
make use of the cache commands, with which it will be possible to store
this information and provide it again in the case of a disconnect
and reconnect to the same device.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 4, 2024
Adds HCI support for the LE CS Test command.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 4, 2024
…d FAE table

Adds HCI support for:
- LE CS Read Remote Supported Capabilities
- LE CS Read Remote FAE Table

Callbacks have been added to the conn object to allow upper layers to
make use of the cache commands, with which it will be possible to store
this information and provide it again in the case of a disconnect
and reconnect to the same device.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 4, 2024
Adds HCI support for the LE CS Test command.

Upstream PR: zephyrproject-rtos/zephyr#78455

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants