Rudis1261 / blink-server

This is the server you would need to be able to run the Blink Android Application.
MIT License
34 stars 7 forks source link

Server not starting #3

Closed falkartis closed 5 years ago

falkartis commented 7 years ago

Hi, I'm getting the same error as described for fedora. I'm running ubuntu 16.04. when I try to start the server I get:

Traceback (most recent call last): File "/home/artis/.blink/bluetooth_server.py", line 25, in <module> profiles = [ SERIAL_PORT_PROFILE ] File "/usr/lib/python2.7/dist-packages/bluetooth/bluez.py", line 176, in advertise_service raise BluetoothError (str (e)) bluetooth.btcommon.BluetoothError: (2, 'No such file or directory')

This happens when I run sudo ~/.blink/bluetooth_server.py and also when I run sudo /usr/bin/python2.7 ~/.blink/bluetooth_server.py any idea?

Energizer328 commented 7 years ago

Got the same error running Debian Jessie. Managed to fix it by following the instructions in the Permissions Issues section of the README.md file. The only catch was that the bluetooth.service file wasn't located at /usr/lib/systemd/system/. In my system I ended up editing the file:

/lib/systemd/system/bluetooth.service

jjpe commented 5 years ago

Just ran into this very same issue on Fedora 27. It's a little disconcerting that this bug has been around for almost 2 friggin years...

EDIT: also, the link in the README.md about this issue is basically dead, so that's no help.

Rudis1261 commented 5 years ago

Got the same error running Debian Jessie. Managed to fix it by following the instructions in the Permissions Issues section of the README.md file. The only catch was that the bluetooth.service file wasn't located at /usr/lib/systemd/system/. In my system I ended up editing the file:

/lib/systemd/system/bluetooth.service

@Energizer328 Can you recall what the change was?

jcklpe commented 5 years ago

Chiming in here, running into the same problem.

Rudis1261 commented 5 years ago

Yeah, sorry guys there isn't much I can do about this. It comes down to the default permissions for Bluetooth on Linux. It is fairly restrictive, and for good reason. Linux systems do not grant permissions to scripts that try to access it by default.

You will most likely need to find the service file and update it with the mentioned value.

Most Linux distro's you can use locate to find the file for your system. locate bluetooth.service, which should reveal the directory the file can be found in.