Makes a Raspberry Pi emulate a bluetooth keyboard. This is based on Emulating a Bluetooth Keyboard with Raspberry Pi and Python.
Run raspi-config and disable the serial-over-Bluetooth UART thing in
interfaces.
$ sudo cp btkeyboard/dbus/org.yaptb.btkkbservice.conf /etc/dbus-1/system.d
$ sudo apt-get install python3-pip python3-bluez python3-pyqt4 python3-dbus.mainloop.qt
$ pip3 install evdevSet up Bluetooth:
$ sudo hciconfig hci0 upRun hciconfig and copy the the Bluetooth MAC address and edit the
MY_ADDRESS binding in btkeyboard/server/btk_server.py.
TODO: Pull the address from the interface itself.
Pairing:
$ sudo /usr/bin/bluetoothctl
> agent on
> default-agent
> scan on
> discoverable onPair from the host computer; type yes to accept the pairing request
on the pi.
Run the bluetooth daemon attached to a console with only the "time" plugin:
$ sudo /etc/init.d/bluetooth stop
$ sudo /usr/sbin/bluetoothd --nodetach --debug -p timeHow to restart Bluetooth:
sudo systemctl daemon-reload; sudo systemctl restart bluetooth; systemctl status bluetooth -l