-
Notifications
You must be signed in to change notification settings - Fork 19
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
hcitool backend causes an ever increasing number of hcidump commands to run concurrently #54
Comments
After digging some more, I realized that the poll() call is done on I'll open a pull request to change this. All of this is probably tenuous and the package should move away from hcitools and towards a Bleak/D-Bus solution. |
Yes, this is really what should happen. Our choice of
|
IIRC it was the Linux kernel that deduplicated the advertisements. That's why I used hcidump. I haven't tracked if the kernel will actually gives us duplicates now. (This support is important to us because CP may be using advertisements to give varying data, not just initiating a connection like Linux assumes.) |
This bleak issue makes it sounds like duplicate packet data may eventually be available, but for now hcidump seems to be the only solution. The device I'm work with (Tilt hydrometer) also sends duplicate advertisements with some varying data. |
Nice find! Glad things are going the right direction. |
@cj8scrambler I think you fixed this with #55. So closing. Correct me if I'm wrong. |
When using the hcidump backend (either as root or with capabilities set on hcidump/hcitool) in a loop causes an ever increasing number of hcidump commands run concurrently.
Hardware: Raspberry Pi 3 Model B Plus Rev 1.3
adafruit-circuitpython-ble version: 9.0.1
To demonstrate, in one window run:
In another window, run:
The number of hcidump commands running will keep increasing. The
start_scan()
call completes quickly (sometimes with data), causing another call. The new call starts hcidump again, but the previous hcidump command is still running.The cause is that for some reason the poll() call in common.py is sometimes returning a 1 even though hcidump is still running fine. If I remove the returncode check in the while loop, then everything works as expected.
The text was updated successfully, but these errors were encountered: