-
Notifications
You must be signed in to change notification settings - Fork 494
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
Failed to execute mgmt cmd 'scanend' #150
Comments
I get the same error running "blescan" in the console. I'm running as root |
This happens on one of my Bluetooth dongles ("0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)") but not the other one ("0a5c:21e8 Broadcom Corp. BCM20702A0 Bluetooth 4.0"). The error happens when a random address is set, then scanning is shut down after:
There appears to be a race condition between subsequent invocations of "bluepy-helper". This patch "fixes" it: (By "fixing" I mean it makes it not happen on my particular computer. I didn't dig down through the layers of abstraction to solve it properly.)
|
I ran into the error on my raspberry pi but it was because I forgot to enable the bluetooth device in the first place :/ |
@markrages Your delay also works for a frequent BTL Exception Device Disconnected when scanning Frequently. I understand that it's a workaround but it helped to eliminate the frequent exceptions. Thanks |
Same here, but the patch doesn't work for me... :( Ubuntu 16.04 x64, bluepy version 1.1.2, Python 3.5. |
If this helps... This error has occurred when Bluetooth was disabled on my laptop (I didn't realize it). If I enable BT, I don't get that error... |
Also running into this on Ubuntu Server 18.04, patch doesn't help. |
Try |
Also finding this issue. It seems to happen particularly often under docker. Worth noting that restarting the interface with hciconfig isn't practical for long running logging applications etc. |
Yes, I have this issue, too. Raspian 4.19, Pi3, onboard bt. While hci down/up can clear it, like j616 commented, I need it for a persistent logging application (monitors motion sensors). I also have quite a bit of other software running on this Pi, so I'm testing on a Pi4 with a base Raspian install. |
My Pi4 also had issues - the process hung after running for a little while. I ended up switching to a USB-based BT devices (BLED112) with bled112_scanner.py. |
I have same issue and it run for while and give me Error: Traceback (most recent call last): |
Changing that line worked in my case
to
|
I'm getting the same problem on Raspberry Pi with Raspbian, I treed adding "passive=true", but it no longer finds the devices. Any other ideas? |
worked for me on rpiZeroW bluepy.btle.BTLEManagementError: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters) |
This seems to have fixed my issue with rejected as well. I detect the error in my code and run the above commands in my python script like this. |
大神们,请给个详细方案 |
This seems to have, at least temporarily, worked around the issue for me. Trying to read an airthings waveplus via a raspberry pi 3b+ every 15 minutes, posting the results to emoncms, which will sometimes work for weeks before failing, and sometimes fail after a few hours/days. |
For me sudo apt update solved the issue. |
I had similar error on my Raspberry Pi Zero W: Failed to execute mgmt cmd 'scanend'. This did not occur if I manually ran my Python script at the command line; only when I ran via cron. The fix for me was to add a delay to the start of my script to prevent it from running "too early" in the Pi boot process. Either adding sleep command to start of the Python script or to cron seemed to do the trick and eliminate the scanend Rejected error: |
Raspberry pi 3 Model B
Using the example code from http://ianharvey.github.io/bluepy-doc/scanner.html#sample-code
I get this error.
The text was updated successfully, but these errors were encountered: