quangthanh010290 / keyboard_mouse_emulate_on_raspberry

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

Error on startup #16

Open sarimarton opened 3 years ago

sarimarton commented 3 years ago

Hi,

I have encountered this error upon startup.

pi@raspberrypi:~/projects/keyboard_mouse_emulate_on_raspberry $ sudo ./boot.sh                                           
[ ok ] Starting bluetooth (via systemctl): bluetooth.service.
DC:A6:32:D4:1F:82
pi@raspberrypi:~/projects/keyboard_mouse_emulate_on_raspberry $ ./mouse/mouse_client.py                                  
detected mouse: /dev/input/event0
INFO:root:Connected MouseInput@/dev/input/event0 (Logitech USB Optical Mouse)                                            
ERROR:dbus.proxies:Introspect error on :1.26:/org/thanhle/btkbservice: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.                 
DEBUG:dbus.proxies:Executing introspect queue due to error
ERROR:dbus.connection:Unable to set arguments (0, b'\x00\xfe\xff\x00') according to signature None: <class 'ValueError'>:
embedded null byte
Traceback (most recent call last):
  File "./mouse/mouse_client.py", line 149, in <module>
    i.change_state(event)
  File "./mouse/mouse_client.py", line 116, in change_state
    self.send_current(self.state)
  File "./mouse/mouse_client.py", line 97, in send_current
    self.iface.send_mouse(0, bytes(ir))
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 70, in __call__                                            
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 145, in __call__                                           
    **keywords)
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 641, in call_blocking                                   
    message.append(signature=signature, *args)
ValueError: embedded null byte
pi@raspberrypi:~/projects/keyboard_mouse_emulate_on_raspberry $ 

The same happens when I start it with sudo. It's a Raspberry PI 4.

gabricgallo commented 3 years ago

Before starting mouse and keyboard client, you have to use this:

sudo ./server/btk_server.py

Let me know if it works.

sarimarton commented 3 years ago

The error message is still there.

FoxTimo commented 2 years ago

I have the issue. Has anyone found a fix?

I use a Raspberry Pi 3B+ with RaspberryPi OS 64bit and a Logitech G403