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: host: Subscriptions not removed upon unpair #21131

Closed
jsiverskog opened this issue Dec 3, 2019 · 0 comments · Fixed by #21132
Closed

Bluetooth: host: Subscriptions not removed upon unpair #21131

jsiverskog opened this issue Dec 3, 2019 · 0 comments · Fixed by #21132
Assignees
Labels
area: Bluetooth bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@jsiverskog
Copy link
Contributor

Describe the bug
When having a central being connected (and bonded) with one peripheral at a time, it's not possible to unpair and then reconnect/pair to a second device without allocating a struct bt_gatt_subscribe_params per connection.

To Reproduce
Steps to reproduce the behavior:

  1. Configure a BLE central device with CONFIG_SMP=y and CONFIG_BT_SETTINGS=y
  2. Connect and pair/bond with a peripheral
  3. Enable notifications on a characteristic
  4. Disconnect the peripheral and call bt_unpair
  5. Try to connect and pair/bond with a second peripheral
  6. Enable notifications on the same characteristic (same struct bt_gatt_subscribe_params)

Expected behavior
Subscriptions for a bonded device should be removed upon unpair, and the struct bt_gatt_subscribe_params should allow re-use afterwards.

Impact
Increased code complexity and memory usage.

Environment (please complete the following information):

  • OS: Linux
  • Toolchain: gcc-arm-none-eabi-8-2019-q3-update
  • Commit v1.14.1
@jsiverskog jsiverskog added the bug The issue is a bug, or the PR is fixing a bug label Dec 3, 2019
@jsiverskog jsiverskog changed the title Bluetooth: host: Remove subscriptions upon unpair Bluetooth: host: Subscriptions not removed upon unpair Dec 3, 2019
@jhedberg jhedberg added the priority: low Low impact/importance bug label Dec 3, 2019
jsiverskog added a commit to jsiverskog/zephyr that referenced this issue Dec 4, 2019
Make sure all subscriptions are removed when a connection is unpaired.

Fixes zephyrproject-rtos#21131

Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
carlescufi pushed a commit that referenced this issue Dec 4, 2019
Make sure all subscriptions are removed when a connection is unpaired.

Fixes #21131

Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
jsiverskog added a commit to jsiverskog/zephyr that referenced this issue Dec 18, 2019
Make sure all subscriptions are removed when a connection is unpaired.

Fixes zephyrproject-rtos#21131

Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
nashif pushed a commit that referenced this issue Jan 8, 2020
Make sure all subscriptions are removed when a connection is unpaired.

Fixes #21131

Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants