scan_connect.py error on ubuntu
Sorry, I assume this is a newbie issue, but I haven't found an obvious solution in the docs:
when running "sudo python3 scan_connect.py" I get
scanning for devices...
error 1578224918.101709: Error disabling scan:: Input/output error
terminate called after throwing an instance of 'BLEPP::HCIScanner::IOError'
what(): Error disabling scan:: Input/output error
Aborted
- As background info i'm running Ubuntu 18.04.3, and using Python 3.6.9
- the install of metawear seemed to be fine
sudo -H pip3 install metawear
Collecting metawear
Collecting warble<2.0,>=1.1 (from metawear)
Using cached https://files.pythonhosted.org/packages/5e/ac/56e3b66c494c367de6ac2a78524e67dc536b16352350e35565955a799464/warble-1.2.0.tar.gz
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from metawear)
Building wheels for collected packages: warble
Running setup.py bdist_wheel for warble ... done
Stored in directory: /root/.cache/pip/wheels/dd/bd/d2/54c5007fd4af8226dc697f751e98513f60688a5e7790e9c27e
Successfully built warble
Installing collected packages: warble, metawear
Successfully installed metawear-0.7.0 warble-1.2.0
- Running "sudo lsusb |grep Bluetooth" gives
Bus 002 Device 006: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Any help/suggestions are appreciated!!!!
Comments
does it work with python2.7 or have you tried python3 on another machine?
Ive tried on another machine (with python3) and have exactly the same problem
What about the other python scripts? Have you tried those? Try the led one.
Im guessing the led one wont work because i'm not providing an address.
When i try it it states
IndexError: list index out of range
i thought I need scan_connect.py to work in order to determine the address to use with led.py?
scan_connect and led now work. Ive bought a new usb dongle (I thought the one i had was linux compatible but changing to a different dongle works, so clearly my first dongle wasn't working properly). Also, I had permission issues, so i had to 'sudo - s' before running the python commands or use sudo for each command.
I am having the exact same issue now.
scan_connect.py
doesn't work. I have tried with both Bluez 5.48 (throughsudo apt-get install bluez
) and Bluez 5.54 (through manually installing the.tar.xz
file from here). In version 5.54 I don't even findhcitool
. Under default Bluez 5.48 it always returnsInput/output error
no matter how I turn the hcitool up/down/reset. I am using ThinkPad built-in bluetooth, so I cannot replace the dongle either.led.py
works if I specify the MAC address. I am not sure ifscan_connect.py
andled.py
uses different scanners; otherwise I don't get why one works and the other doesn't.Some more background info: under Bluez 5.54, in terminal, when I tried
hcitool lescan
it's telling mecommand not found
, butbluetoothctl
can scan just fine. Under Bluez 5.46, in terminal,hcitool lescan
returnsInput/output error
.Did you run it with sudo?
hello, i am running python 3.10 and having this same error