quangthanh010290 / keyboard_mouse_emulate_on_raspberry

Bluetooth Keyboard Mouse Emulator on Raspberry Pi
https://thanhlev.github.io/
MIT License
289 stars 98 forks source link

bluetoothd needs to be started with --compat flag #9

Closed hfmanson closed 4 years ago

hfmanson commented 5 years ago

After several hours experimenting it works perfectly when you start bluetoothd with the compatibility (--compat) flag sudo /usr/sbin/bluetoothd --compat --nodetach --debug -p time

When started without --compat this error appears:

pi@raspberrypi:~/BL_keyboard_RPI/server $ sudo python btk_server.py
PuTTY X11 proxy: Unsupported authorisation protocol
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
  warnings.warn(str(e), _gtk.Warning)
Setting up service
Setting up BT device
Configuring for name ThanhLe_Keyboard
Configuring Bluez Profile
Reading service record
Profile registered
Waiting for connections
Traceback (most recent call last):
  File "btk_server.py", line 214, in <module>
    myservice = BTKbService();
  File "btk_server.py", line 188, in __init__
    self.device.listen();
  File "btk_server.py", line 149, in listen
    self.scontrol.bind((self.MY_ADDRESS,self.P_CTRL))
  File "/usr/lib/python2.7/dist-packages/bluetooth/bluez.py", line 140, in bind
    return self._sock.bind (addrport)
_bluetooth.error: (98, 'Address already in use')
quangthanh010290 commented 4 years ago

thank you for your feedback, I've updated base on your infor