Skip to content

Bluetooth: controller: Fix for scanner Rx window hang #648

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

Merged
merged 4 commits into from
Jun 30, 2017

Conversation

cvinayak
Copy link
Collaborator

With the fix in commit 3c23c6f ("Bluetooth: controller:
Fix assert due to stale tick count") it is required that a
skipping event shall abort the previous role in order to
enable the ticker_job to resume and reschedule next ticker
expiry.

In the scan_adv sample, with continuous scanning, an
advertiser would pre-empt it, but if the advertiser skipped
its event without aborting the scanner, the scanner is hung
with its rx window without a timeout, and HCI command to
stop the advertiser will wait forever to complete.

Signed-off-by: Vinayak Kariappa Chettimada [email protected]

cvinayak added 4 commits June 30, 2017 11:09
Explicitly select CONFIG_BLUETOOTH_BROADCASTER and
CONFIG_BLUETOOTH_OBSERVER in the scan_adv sample.

If the Controller is included without connections support
then only broadcaster support is compiled in by default,
hence add broadcaster and observer role support explicitly
in the prj.conf file.

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
The scanner was reserving a little less slot ticks which
caused other roles to overlap before scan window could
close.

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
With the fix in commit 3c23c6f ("Bluetooth: controller:
Fix assert due to stale tick count") it is required that a
skipping event shall abort the previous role in order to
enable the ticker_job to resume and reschedule next ticker
expiry.

In the scan_adv sample, with continuous scanning, an
advertiser would pre-empt it, but if the advertiser skipped
its event without aborting the scanner, the scanner is hung
with its rx window without a timeout, and HCI command to
stop the advertiser will wait forever to complete.

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Fix missing re-initialization of ret_cb to
TICKER_STATUS_BUSY before every new call to ticker interface
functions' with operation's callback.

One issue was undirected advertisement disable to return
failure status in the scan_adv sample.

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
@jhedberg jhedberg merged commit 4362eda into zephyrproject-rtos:master Jun 30, 2017
@cvinayak cvinayak deleted the github_adv_stop_hang branch July 4, 2017 18:13
nagineni pushed a commit to nagineni/zephyr that referenced this pull request Nov 20, 2017
 - There is still not support for handling these errors,
   but at least printing them is better than nothing

Signed-off-by: James Prestwood <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants