-
Notifications
You must be signed in to change notification settings - Fork 490
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
bluepy.btle.BTLEException: Failed to execute mgmt cmd 'le on' #218
Comments
Did you try with sudo? |
all the command are executed as root. |
I think I have the same problem just with the TI Sensortag (running as root - debugging on). Running on a Raspberry Pi with a BLE USB; hcitool is able to scan: sudo python sensortagcollector.py Got: '' Traceback (most recent call last): |
Same issue for me.
I try to rebuild helper with the same results. |
same problem on my kali linux 2017 I try running : |
any help thanks in advance |
I have the same question. (2017kali\bleah ) Thanks for any help!!!!!! |
What output does bluepy-helper give when you run it directly? |
I had the same error, but |
|
i'm getting: i tried all the answer i could find, tried running as root, with sudo, i checked the interface and it's 0 anyone can help? |
have you tried running bluepy-helper directly and tried to execute "le on" manually? |
im getting: "bluepy-helper: command not found" |
I guess you are not so familiar with linux command line. If the program complains about permissions, try it again with super user rights: |
thanks for your explanation, i learned something new :) same with sudo |
if you type 'help' you will see all possibilities. |
for some reason "help" also doesnt give me any result...just blinking |
i'm using it in python 2.7 but i'll set up a 3.5 to test |
(venv) ~/python_sandbox/test_bluepy3/venv/lib/python3.5/site-packages/bluepy $sudo ./bluepy-helper 0 It seems to work on my computer. I also have a blinking cursor, but if i type help, i do get this help message. |
Just to be sure, you have to start the program with |
Same error, but when doing multiple calls in quick succession. 2018-02-20 17:23:54.673 Error: (Mi Flower Mate) ----> Line 55 in /home/pi/domoticz/plugins/mi_flower_mate/miflora/backends/bluepy.py, function connect (working on a plugin that uses this library: https://github.com/flatsiedatsie/Mi_Flower_mate_plugin) |
I typed 'le on' on bluepy-helper, and I got 'rsp=$mgmt code=$protoerr'. |
now im able to run and getting same message: rsp=$mgmt code=$protoerr |
i also get the protoerr if i'm not running as superuser (sudo ./bluepy-helper 0).
If you have problems, please post the commands you used and the output. |
i ran it before with sudo.
im on mint (ubuntu 16.04), python 3.5.2 |
In that case i don't have an explanation, my solution was the capabilities.. |
thanks again for all your help |
Here the issue still persists if there are multiple calls in a row: https://www.domoticz.com/forum/viewtopic.php?f=65&t=22281 on Domoticz plugins are run an root, so that's not an issue. |
Hi, was anyone able to solve this problem? I have been stuck on it for a while and I still get the same error |
Failed to execute mgmt cmd 'le on'. |
I'm still testing, but this works [EDITED]:
|
Ran @PrzemoF 's post and got rsp=$mgmt�code=$mgmterr�estat=h11�emsg='Invalid Index on 16.04, py 3.7 Help us Obiwon Kanobi! You're our only hope! |
I tried the same and I got: What should I do next? |
Hi.
But without sudo it wont:
Are there any plans to fix it. I want to use bt-mqtt-gateway to get a connection to an nrf52840 running circuitpython. |
Note that when running python scripts with sudo, When using sudo with running a python script you may need to specify the full system path to the version of python you inteend to run |
I'm running on Rasbian PC. and getting
please suggest what might be wrong? |
Re: #218 (comment)
$ sudo setcap cap_net_raw,cap_net_admin+ep bluepy-helper
$ getcap bluepy-helper
bluepy-helper = cap_net_admin,cap_net_raw+ep
$ bluepy-helper
# bluepy-helper.c version 1.3.0 built at 06:27:58 on Jul 16 2019
le on
rsp=$mgmtcode=$success
$ uname -r
5.10.17-v7l+ |
Firstly, make sure that your BLE device is existing, using following command
If the device is existing, it will like this
Your error is because that the BLE device is not activated. You can use this command to activate it.
|
Hello @EricRongkai,
I installed Now, when I run |
Hello,
I'm trying to run you sample code (http://ianharvey.github.io/bluepy-doc/scanner.html#sample-code) on my orangepi with a bluetoot v4 dongle, but it doesn"t work.
root@orangepipcplus:~# lsusb
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
root@orangepipcplus:~# hcitool dev
Devices:
hci0 00:1A:7D:DA:71:13
root@orangepipcplus:~# python test.py
Traceback (most recent call last):
File "test.py", line 14, in
devices = scanner.scan(10.0)
File "/usr/local/lib/python2.7/dist-packages/bluepy/btle.py", line 679, in scan
self.start(passive=passive)
File "/usr/local/lib/python2.7/dist-packages/bluepy/btle.py", line 617, in start
self._mgmtCmd("le on")
File "/usr/local/lib/python2.7/dist-packages/bluepy/btle.py", line 276, in _mgmtCmd
"Failed to execute mgmt cmd '%s'" % (cmd))
bluepy.btle.BTLEException: Failed to execute mgmt cmd 'le on'
Any idea of what's wrong ?
The text was updated successfully, but these errors were encountered: