1BTKBDD(1) System management commands BTKBDD(1)
2
3
4
6 btkbdd - Bluetooth Keyboard Daemon
7
9 btkbdd [-s addr] [-t addr] [-c file] [-d] device
10
12 This tool starts a Bluetooth HID Keyboard service, serving keystrokes
13 obtained via Linux Input subsystem's event device (evdev). In
14 practical terms, it turns your Linux box with a physical keyboard into
15 a Bluetooth keyboard, which can be used by various Bluetooth HID
16 capable devices, including desktop or tablet computers, smart phones,
17 game consoles and so on.
18
19 It implements most of the important HID protocol features, including
20 robust connection restores (virtual cabling) and report protocol (as
21 required by Apple's Darwin-based devices). It is possible and
22 encouraged to use the tool from udev, starting it when event devices
23 appear after a keyboard is plugged in.
24
26 -s addr
27 Accept connections on given Bluetooth address. Useful when your
28 computer has multiple Bluetooth Host Controller Interfaces (HCI).
29
30 Class of this device is changed into keyboard while the program is
31 running and restored upon termination.
32
33 Defaults to accepting connections on any interface, while changing
34 the class only of the first interface hci0, which is a sane default
35 for computers with a single HCI.
36
37 -t addr
38 Attempt connecting to given address upon key press, if no
39 connection has been estabilished yet. This can be used to
40 effectively "hardwire" the keyboard to a given host.
41
42 Once an incoming connection is estabilished and terminated, btkbdd
43 always tries to restore it upon a key press event.
44
45 -c file
46 Save the last connected remote address into given file upon
47 termination and restore it on startup.
48
49 Use this option if you want to remember last connected device
50 between btkbdd runs.
51
52 -d Become a daemon. Give up controlling terminal, open file
53 descriptors and double-fork to escape parent process control.
54
55 While breaking process hierarchy has certain disadvantages and is
56 deprecated with modern service control daemons such as systemd(8)),
57 it is necessary to do so with udevd(8), otherwise btkbdd would
58 block the whole worker process.
59
60 device
61 Linux input subsystem event device to use as source for key
62 presses.
63
65 Use with udev(7) and systemd(1) is recommended. Look into
66 90-btkbdd.rules and btkbdd@.service files distributed with btkbdd for
67 examples.
68
69 btkbdd /dev/input/event8
70 Most basic usage -- just open a keyboard device and listen for
71 incoming connections. When in doubt about which physical device
72 corresponds to an event device node, use "udevadm info
73 --attribute-walk --name=file" to identify the device and its
74 connection details.
75
76 btkbdd /dev/input/event8 -s EC:55:F9:EF:12:34 -c
77 /var/lib/btkbdd/keyboard.cable
78 Only accept connections on given HCI and remember the connected
79 device. You can discover your HCI device addresses with "hcitool
80 dev" command.
81
82 btkbdd /dev/input/event8 -t EC:55:F9:EF:56:78
83 Initiate a connection to given Bluetooth host. You can discover
84 available devices with "hcitool scan".
85
87 Bluez bluetoothd(8) daemon is likely to listen for HID events. For
88 btkbdd to accept connection you need to disable the Bluez input plugin
89 by setting "DisablePlugins = input" in /etc/bluetooth/main.conf.
90
91 Nothing but errors is logged and when in daemon mode even the error
92 output is lost. Attach strace(1) or launch btkbdd manually to
93 troubleshoot errors.
94
95 Only a common 101-key keyboard is supported.
96
97 To estabilish pairing with iPad, iPod Touch or iPhone, connection must
98 be initiated and authenticated via bluetooth-applet(1) before starting
99 btkbdd. Otherwise the device will initiate a PIN-based authentication
100 that is not supported. Once trust is estabilished, connections will
101 work without a need for any other hassle.
102
104 · Lubomir Rintel <lkundrak@v3.sk>
105
106 · Collin R. Mulliner <collin@betaversion.net>
107
108 <http://www.mulliner.org/bluetooth/>
109
110 Parts of code were taken from were taken from xkbd-bthid project.
111
112 btkbdd can be redistributed under the same terms and conditions as
113 xkbd-bthid itself: GNU General Public License (any version at your
114 option).
115
116 The source code repository can be obtained from
117 <https://github.com/lkundrak/virtkbd>. Bug fixes and feature
118 ehancements licensed under same conditions as btkbdd are welcome via
119 GIT pull requests.
120
122 udev(7), systemd(1), systemd.service(5), systemd.unit(5),
123 bluetoothd(8), hcitool(1), USB Device Class Definition for Human
124 Interface Devices (HID), Bluetooth HID Profile.
125
126
127
1281.5 2015-10-13 BTKBDD(1)