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

Synchronize multiple DF TX devices in the DF Connectionless RX Example "Periodic Advertising list" #38316

Closed
Faizan-Ellahi-DE opened this issue Sep 5, 2021 · 3 comments · Fixed by #38338
Assignees

Comments

@Faizan-Ellahi-DE
Copy link

Faizan-Ellahi-DE commented Sep 5, 2021

I got an Unknown Command error while working with the periodic advertising list feature #29127

When I tried to add the device to the Periodic Advertising list or clear the Periodic Advertising list, error -5 shows over the terminal after deep looking at the source code found the reason for such error is that commands (BT_HCI_OP_LE_ADD_DEV_TO_PER_ADV_LIST, BT_HCI_OP_LE_REM_DEV_FROM_PER_ADV_LIST, BT_HCI_OP_LE_CLEAR_PER_ADV_LIST, BT_HCI_OP_LE_READ_PER_ADV_LIST_SIZE) are not defined/handled in the **static int controller_cmd_handle(uint16_t ocf, struct net_buf *cmd, struct net_buf **evt, void node_rx) function.

Is there any way to solve such a bug, kindly guide me?

@Faizan-Ellahi-DE Faizan-Ellahi-DE changed the title Synchronize multiple DF TX devices in the DF Connectionless RX Example Synchronize multiple DF TX devices in the DF Connectionless RX Example "Periodic Advertising list" Sep 7, 2021
@cvinayak
Copy link
Contributor

cvinayak commented Sep 7, 2021

Periodic Advertising List in the Controller is work in progress, please try this PR: #38338

@cvinayak cvinayak self-assigned this Sep 7, 2021
@cvinayak
Copy link
Contributor

cvinayak commented Sep 9, 2021

@Thalley Does the host support synchronization from periodic advertising lists?

Shouldn't this check addresses in the list?

if (!pending_per_adv_sync ||
pending_per_adv_sync->sid != evt->sid ||
bt_addr_le_cmp(&pending_per_adv_sync->addr, &evt->adv_addr)) {
struct bt_le_per_adv_sync_term_info term_info;
BT_ERR("Unexpected per adv sync established event");
per_adv_sync_terminate(sys_le16_to_cpu(evt->handle));

@Thalley
Copy link
Collaborator

Thalley commented Sep 9, 2021

@Thalley Does the host support synchronization from periodic advertising lists?

Shouldn't this check addresses in the list?

if (!pending_per_adv_sync ||
pending_per_adv_sync->sid != evt->sid ||
bt_addr_le_cmp(&pending_per_adv_sync->addr, &evt->adv_addr)) {
struct bt_le_per_adv_sync_term_info term_info;
BT_ERR("Unexpected per adv sync established event");
per_adv_sync_terminate(sys_le16_to_cpu(evt->handle));

Yes, that is actually still missing. Basically we need to implement this paragraph:

If the Periodic Advertiser List is not used, the Advertising_SID, Advertiser Address_Type, and Advertiser Address parameters specify the periodic advertising device to listen to; otherwise they shall be ignored.

So if the option to use the list is set, then we shall ignore the address parameters and instead either just accept it, or store the list in the host and validate whether the address of the event is in the list. The former is the simpler solution, and I am not sure if we need to validate the address in the host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants