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

[nrf fromtree] Samples: Bluetooth: Fix PAwR sample failed to set subevent data #1589

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

ryanjh
Copy link
Contributor

@ryanjh ryanjh commented Mar 25, 2024

Be respectful of PAwR subevents while scheduling scan activities. The radio will be swtiched from scan to PAwR when it is closed to the next subevent interval.

Upstream PR: zephyrproject-rtos/zephyr#70678

Comment on lines 301 to 302
.interval = per_adv_params.interval_min,
.window = per_adv_params.interval_min,
Copy link
Contributor

Choose a reason for hiding this comment

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

Scan interval and window are units of 0.625 ms, whereas the periodic advertising interval are in units of 1.25ms.

Is this intentional? If so, please add a comment to explain why we are setting these to the half the value of the PA interval.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for pointing it out. Those values should be double.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

reused the macros for contiuous scanner. zephyrproject-rtos/zephyr#70044

@ryanjh ryanjh force-pushed the periodic_adv_rsp_continuous_scan branch 2 times, most recently from ba65bc1 to 791768f Compare March 25, 2024 14:14
@ryanjh ryanjh changed the title Samples: Bluetooth: Fix PAwR sample failed to set subevent data [nrf fromlist] Samples: Bluetooth: Fix PAwR sample failed to set subevent data Mar 25, 2024
@ryanjh ryanjh force-pushed the periodic_adv_rsp_continuous_scan branch 2 times, most recently from c89f8d4 to e6bd8ba Compare March 30, 2024 16:11
@ryanjh ryanjh changed the title [nrf fromlist] Samples: Bluetooth: Fix PAwR sample failed to set subevent data [nrf fromtree] Samples: Bluetooth: Fix PAwR sample failed to set subevent data Mar 30, 2024
rugeGerritsen and others added 2 commits March 31, 2024 17:23
It is often desired to maximize the chances of receiving advertising
when scanning. To achieve this, the scanner should be enabled all the time.

Some controller implementations (like Nordic's SoftDevice Controller)
handle scheduling differently when scan_window = scan_interval.
Having a macro that defines this scanning configuration simplifies
writing applications.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
(cherry picked from commit 7c2f26b)
…vent data

Be respectful of PAwR subevents while scheduling scan activities.
The radio will be swtiched from scan to PAwR when it is closed to
the next subevent interval.

Signed-off-by: Ryan Chu <ryan.chu@nordicsemi.no>
(cherry picked from commit 2759a35)
@ryanjh ryanjh force-pushed the periodic_adv_rsp_continuous_scan branch from e6bd8ba to 2d14cee Compare March 31, 2024 15:23
@carlescufi carlescufi merged commit e85f119 into nrfconnect:main Apr 2, 2024
12 checks passed
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.

6 participants