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 devices that send RSSI before advertisement are never found #236

Closed
qdot opened this issue Jan 1, 2021 · 0 comments
Closed

Bluetooth devices that send RSSI before advertisement are never found #236

qdot opened this issue Jan 1, 2021 · 0 comments
Assignees
Labels
bug Device Comm Managers Tasks/Bugs pertaining to a Device Communication Managers (platform specific hardware access)

Comments

@qdot
Copy link
Member

qdot commented Jan 1, 2021

Describe the bug

  1. Power on Kiiroo KEON
  2. Start buttplug-rs w/ btleplug, start scanning for devices

Expected behavior
KEON found every time

Actual behavior
KEON is found around 50% of the time

Additional context
Due to our caching to addresses to make sure we don't constantly reprocess unnamed devices, we miss when a device has just sent its RSSI packets before we actually see an advertisement. If we get a device with no name, we shouldn't add it to the tried addresses list, we should just ignore the advertisement.

@qdot qdot added bug Device Comm Managers Tasks/Bugs pertaining to a Device Communication Managers (platform specific hardware access) labels Jan 1, 2021
@qdot qdot self-assigned this Jan 1, 2021
qdot added a commit that referenced this issue Jan 1, 2021
If we ignore addresses without names, we may get RSSI packets
before advertisement packets and will never actually resolve the
device to connect

fixes #236
qdot added a commit that referenced this issue Jan 1, 2021
Same as last commit, if we don't spin the loop on DeviceUpdated
events, we may never see name updates for peripherals, which
means we won't connect until the next time we see a new device.
Always try devices on all packets, since things were fixes with
task spawning this shouldn't hurt memory in tight start/stop
loops.

Fixes #236
qdot added a commit that referenced this issue Jan 1, 2021
Same as last commit, if we don't spin the loop on DeviceUpdated
events, we may never see name updates for peripherals, which
means we won't connect until the next time we see a new device.
Always try devices on all packets, since things were fixes with
task spawning this shouldn't hurt memory in tight start/stop
loops.

Fixes #236
@qdot qdot closed this as completed in cf8d3ed Jan 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Device Comm Managers Tasks/Bugs pertaining to a Device Communication Managers (platform specific hardware access)
Projects
None yet
Development

No branches or pull requests

1 participant