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

Passive scan returns weird connectable #485

Open
B03901108 opened this issue May 27, 2022 · 0 comments
Open

Passive scan returns weird connectable #485

B03901108 opened this issue May 27, 2022 · 0 comments

Comments

@B03901108
Copy link

B03901108 commented May 27, 2022

Hi, I was running bluepy on Raspberry Pi 3 B+. To start a passive BLE scan, I specified passive=True when calling Scanner's scan method. Then, in ScanDelegate's handleDiscovery, the input ScanEntry's connectable became always True, even when the arriving advertisement came from a MAC address that had only been giving connectable=False during active BLE scanning.

To narrow down the cause, I even modified btle.py to print out resp['flag'][0] in ScanEntry's _update method. (resp['flag'][0] is the raw material to derive the up-to-date "connetable" value.) It seems that during passive BLE scanning, resp['flag'][0] is always 0x0, while during active BLE scanning, resp['flag'][0] can be either 0x0 or 0xfffffffc. Although I am unsure if the above helps debugging, I think the above narrows down the root cause to bluepy's interaction with BLE module.

It would be great if anyone could share feedback/solutions. Great thanks.

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

No branches or pull requests

1 participant