![]() |
#1 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Feb 2023
Device: Kobo Libra H2O, Kobo Clara 2E
|
Using a Bluetooth keyboard with recent Kobos
Recent Kobos have Bluetooth so we can use a physical keyboard. I'm using this to turn my Kobo into an eink writing device but you can also use it in the Nickel web browser, to turn pages, or even in X11
![]() I've only tested this with a Kobo Clara 2E and a Logitech POP KEYS keyboard, but I expect it would work for other Bluetooth devices. I'm guessing even a mouse would work in X11. Setup Setup is quite technical! If you're not familiar with the linux command line, you might have a tough time. 1. You'll need SSH access to your device e.g. using the SSH server built into KOReader. I like to do it over USB because it's more stable than WiFi https://www.mobileread.com/forums/sh...d.php?t=254214 2. Download the uhid.ko kernel module for your device from https://github.com/jmacindoe/kobo-kernel-modules/ 3. Copy it to your device by plugging your Kobo into your computer, or use SSH to copy it wirelessly Code:
scp uhid.ko root@192.168.2.2:/mnt/onboard/ Code:
insmod /mnt/onboard/uhid.ko Code:
bluetoothctl [bluetooth]# power on Changing power on succeeded [bluetooth]# discoverable on Changing discoverable on succeeded [bluetooth]# pairable on Changing pairable on succeeded [bluetooth]# agent NoInputNoOutput Agent registered Code:
[bluetooth]# agent off Agent unregistered [bluetooth]# agent NoInputNoOutput Agent registered Code:
[bluetooth]# default-agent Default agent request successful Code:
[bluetooth]# scan on Code:
[bluetooth]# pair 59:A0:E4:69:24:7B [replace with your address] Pairing successful You can check if your device is paired and connected using Code:
info 59:A0:E4:69:24:7B [replace with your address] Code:
Paired: yes Connected: yes Once paired, you should never need to do this pairing process again, but you will need to 'connect' each time. In Bluetooth terminology, pairing is the thing you do once so the devices know about each other, connecting is what you need to do everytime you use the device. You should be able to connect using Nickel, or in the bluetoothctl prompt, run Code:
connect 59:A0:E4:69:24:7B [replace with your address] 6. Once paired and connected, you should get a new input event device at /dev/input/event3. Try running `cat /dev/input/event3` and press some keys on your keyboard. You should see some random output. It's working! Press Ctrl-C to exit that. You can also see info about your device by running `cat /proc/bus/input/devices`. 7. Once everything is looking good, let's set it up so uhid.ko loads on start up. Otherwise you'll have to run `insmod uhid.ko` after every restart. First we will move the module onto the root filesystem. The onboard storage may not be mounted yet during startup, so it's safer this way. Code:
mkdir /usr/local/modules mv /mnt/onboard/uhid.ko /usr/local/modules/uhid.ko Code:
echo KERNEL==\"loop0\", RUN+=\"/bin/sh -c \'insmod /usr/local/modules/uhid.ko\'\" > /etc/udev/rules.d/99-modules.rules Code:
KERNEL=="loop0", RUN+="/bin/sh -c 'insmod /usr/local/modules/uhid.ko'" Using it in Nickel It seems like the keyboard "just works" in Nickel 🎉. I don't use Nickel much so I haven't tested it a lot but it worked for me in search, the browser, the reader, etc. Using it in KOReader KOReader kills the bluetooth on launch here and here. But even if we remove that, it seems KOReader still doesn't make use of the keyboard. No doubt this could be fixed. I'll update this section if anyone gets it working! Using it in X You can set up X on you Kobo by following the instructions here. These commands will get the keyboard working (thanks to elinkser for first posting about this here). 1. Install udev Code:
apk add eudev apk add eudev-hwids Code:
udevd -d udevadm trigger 4. Hopefully the keyboard is working! If not, check /dev/input/event3 exists and check libinput can see it by running `DISPLAY=:0 libinput debug-events` Keyboard on non-Bluetooth Kobos I haven't tested this myself, but I think you could get the above instructions working on non-Bluetooth Kobos by having a keyboard plugged into another computer (e.g. Rasberry Pi) and then streaming the keyboard events over WiFi as detailed here It also looks like you can theoretically use a USB keyboard, but the Kobo USB port isn't powered, so powering the keyboard is tricky, and you'll also need to compile a new kernel. So it's not very practical. See https://github.com/olup/kobowriter if interested. inkvt also has some nice tricks for streaming keyboard events over the network. |
![]() |
![]() |
![]() |
#2 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 191
Karma: 146236
Join Date: Oct 2022
Device: Kobo Clara HD
|
Nice instructions!
On the subject of the non-bluetooth kobos, here are some additional approaches, depending on if one's priority is entering data on the Kobo vs entering data anywhere while watching it unfold on a beautiful paper-like display! This project also may have "keyboard potential"? https://github.com/tylpk1216/KoboPageTurner https://www.mobileread.com/forums/sh...=345507&page=4 Last edited by elinkser; 02-19-2023 at 10:06 PM. |
![]() |
![]() |
![]() |
#4 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,492
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
The OTG workflow is automated in KOReader for supported devices, FWIW (as long as you didn't disable the "External keyboard" plugin).
I have yet to find time to play with bluetooth myself... |
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Feb 2023
Device: Kobo Libra 2
|
My pageturner is paired and connected but I don't see `/dev/input/event3`.. any idea what I can try?
|
![]() |
![]() |
![]() |
#6 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Feb 2023
Device: Kobo Libra 2
|
output of my `info`
``` Device XX:XX:XX:XX:XX:XX (public) Name: S18 Alias: S18 Appearance: 0x03c1 Icon: input-keyboard Paired: yes Trusted: no Blocked: no Connected: yes LegacyPairing: no UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb) UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb) UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb) UUID: Battery Service (0000180f-0000-1000-8000-00805f9b34fb) UUID: Human Interface Device (00001812-0000-1000-8000-00805f9b34fb) UUID: Unknown (0000ae40-0000-1000-8000-00805f9b34fb) Modalias: usb:v05ACp022Cd011B RSSI: -56 Battery Percentage: 0x61 (97) ``` |
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Feb 2023
Device: Kobo Libra 2
|
my logread
``` Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) initializing 'BluetoothPageTurner' (version: 26e344c-dirty) Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) ... desc: Turn pages with Bluetooth device Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) creating failsafe Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) ... failsafe: info: allocating memory Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) ... failsafe: info: finding filenames Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) ... failsafe: info: ensuring own lib remains in memory even if it is dlclosed after being loaded with a dlopen Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) ... failsafe: info: renaming /usr/local/Kobo/imageformats/libbtpt.so to /usr/local/Kobo/imageformats/libbtpt.so.failsafe Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) checking config Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) checking for uninstall flag '/mnt/onboard/.btpt//uninstall' Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) loading libraries Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) resolving symbols Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) info: nh_dlsym: loading symbol '_ZN18BluetoothHeartbeatC1Ex' from RTLD_DEFAULT to 0x6f2633e8 Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) info: nh_dlsym: loading symbol '_ZN18BluetoothHeartbeat4beatEv' from RTLD_DEFAULT to 0x6f2633ec Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) info: nh_dlsym: loading symbol '_ZN20MainWindowController14sharedInstanceEv' from RTLD_DEFAULT to 0x6f2633f0 Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) info: nh_dlsym: loading symbol '_ZNK20MainWindowController11currentViewEv' from RTLD_DEFAULT to 0x6f2633f4 Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) info: nh_dlsym: loading symbol '_ZN9TimeEvent9eventTypeEv' from RTLD_DEFAULT to 0x6f2633f8 Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) info: nh_dlsym: loading symbol '_ZN12PowerManager14sharedInstanceEv' from RTLD_DEFAULT to 0x6f2633fc Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) info: nh_dlsym: loading symbol '_ZN12PowerManager6filterEP7QObjectP6QEvent' from RTLD_DEFAULT to 0x6f263400 Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) applying hooks Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) calling next init Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) destroying failsafe Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) ... failsafe: info: scheduling restore Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) done init Mar 1 14:08:01 nickel: (BluetoothPageTurner) starting Mar 1 14:08:01 nickel: (BluetoothPageTurner) waiting for input devices Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) ... failsafe: info: restoring after 0 seconds Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) ... failsafe: info: renaming /usr/local/Kobo/imageformats/libbtpt.so.failsafe to /usr/local/Kobo/imageformats/libbtpt.so Mar 1 14:08:01 nickel: (BluetoothPageTurner) (NickelHook) ... failsafe: info: freeing memory Mar 1 14:08:01 nickel: (NickelMenu) cfg(NM_CONFIG_TYPE_MENU_ITEM) : 1:Bluetooth Patch (toggle) (src/config.c:367) Mar 1 14:09:54 nickel: (NickelMenu) adding item 'Bluetooth Patch (toggle)'... (src/nickelmenu.cc:348) Mar 1 14:11:45 nickel: (NickelMenu) adding item 'Bluetooth Patch (toggle)'... (src/nickelmenu.cc:348) Mar 1 14:12:52 nickel: (NickelMenu) adding item 'Bluetooth Patch (toggle)'... (src/nickelmenu.cc:348) Mar 1 14:12:53 nickel: (NickelMenu) adding item 'Bluetooth Patch (toggle)'... (src/nickelmenu.cc:348) Mar 1 14:15:04 nickel: ( 330.999 @ 0x372f7f0 / libraryLayout.warning) void AbstractLibraryController<C>::layout(bool) [with C = BluetoothDevice] view is null Mar 1 14:15:04 nickel: ( 331.049 @ 0x372f7f0 / libraryLayout.warning) void AbstractLibraryController<C>::layout(bool) [with C = BluetoothDevice] source has no rows Mar 1 14:15:04 nickel: ( 331.050 @ 0x372f7f0 / libraryLayout.warning) void AbstractLibraryController<C>::layout(bool) [with C = BluetoothDevice] source has no rows Mar 1 14:15:07 bluetoothd[1825]: Bluetooth daemon 5.63 Mar 1 14:15:07 bluetoothd[1825]: Bluetooth management interface 1.9 initialized ``` |
![]() |
![]() |
![]() |
#8 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Jul 2024
Device: kobo clara 2e
|
Followed this guide and the keyboard works!!!
Now I am looking for a way to take notes, or write documents. Something basic would do... Any ideas? I guess running a whole X would do, but seems overkill. Just a simple nano/vi would be great. |
![]() |
![]() |
![]() |
#9 |
the rook, bossing Never.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,224
Karma: 89531599
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
A BT KB works on my Sage or Elipsa anywhere a Touch keyboard would popup, so can be used to type an annotation, but not used to input text in Notebooks (only type file names). I didn't try any other Kobos.
No need to follow any guide or install anything. Possibly KOReader install includes something to edit text files? I installed Jota on my Android eink and decided that while eink is great to read novels, it's rubbish for text editing, email (K9 mail), or a browser. Last edited by Quoth; 07-22-2024 at 06:50 AM. |
![]() |
![]() |
![]() |
#10 |
Member
![]() ![]() Posts: 14
Karma: 190
Join Date: Sep 2023
Device: Kobo Libra 2
|
Which bluetooth keyboard model did you guys use? Were you able to get it to work in nickel without installing anything?
Edit: Tried connecting my Logitech G715 to my KLC, and it connects out of the box with no issues. But the timeout for wifi/bluetooth is exactly 1 minute so you need to force it on by going to /mnt/onboard/.kobo/Kobo/Kobo eReader.conf file, finding the [DeveloperSettings] heading and adding "ForceWifiOn=true" beneath it Doesn't work for Libra 2 out of the box, might try OP's setup Last edited by 1ily; 07-27-2024 at 05:39 PM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
The recent Kobos seem to have darker backgrounds! | gottogetout | Kobo Reader | 6 | 03-06-2019 05:12 PM |
Bluetooth keyboard getting old | NickyWithNook | Apple Devices | 0 | 10-16-2013 08:53 PM |
HD Fire HD Keyboard and Bluetooth Keyboard? | Doc109 | Kindle Fire | 18 | 01-29-2013 09:54 AM |
Bluetooth keyboard | Gunnerp245 | enTourage eDGe | 0 | 08-13-2011 08:56 PM |
Bluetooth Keyboard | jgray | Android Devices | 6 | 08-01-2011 12:42 PM |