Bluetooth keyboard/mouse peripheral support

Hello all,

Been using Sailfish for probably around 3-4 months now and I’ve just been using it as a daily driver. Have occasionally lurked on the forums but I am going to try and contribute more.

One thing that I am keen on is enhancing my productivity with my phone. For this I have bought two mini bluetooth keyboards with trackpads. Unfortunately neither work via bluetooth on Sailfish OS.

They do both work as keyboards when plugged in. However lose their trackpad feature - which I can live with if it was working wirelessly.

I have tried another OTG dongle type wireless keyboard and mouse pair. They work on the phone - although I couldn’t see the cursor.

They also do work on my Linux, Android and Windows devices.

I wasn’t sure where to raise this. Im happy to do my own tinkering to try and get it to work but unsure where to start.

Thank you

3 Likes

What Bluetooth version are you using? I got an Akko 3068B Plus keyboard, that works with Xperia 10 II running Sailfish OS through BT 3.0 but not through BT5.0(?). Similarly I couldn’t get my Cooler Master SK622 to work with Sailfish OS through its BT 4.0 though the pairing kind of seems to happen. The device would not be recognized as an keyboard but as some sort of general device.

And now that I try with my Keychron K4 with its BT5.1, that connection seems to work ok. Ditto with Keychron K4 Pro with also BT5.1. So at least some Bluetooth keyboards do function with Sailfish OS, and the decisive factor apparently is the version of the Bluetooth.

As a curious tidbit, any of those Bluetooth keyboards work in my native Finnish in the native Sailfish OS apps and I get my Ös and Äs, but the language of the keyboard input reverts to English (I presume) when writing in Android apps.

edit: actually when looking up the information, 3068B Plus seem to support BT5.0/4.0/3.0 and from what I can gather the 3.0 version works properly but I don’t know for sure if the other BT connection that Sailfish OS finds from the keyboard is 5.0 or 4.0.

And here is what’s different in the pairing informations of the working BT3.0 connection and non-working BT connection:

3.0 is recognized as “keyboard” with a corresponding icon and has the profiles HID and DID for use

The non-working connection (either 4.0 or 5.0) is not recognised as keyboard and has the profiles GAP and GATT for use and low powered services of DIS, BAS and HIDS

The pairing does succeed for both, but only the 3.0 connection actually works to the extent that the input on the physical keyboard ends up on the screen of the phone.

The bluetooth requirement for the keyboard is 5.0.

Can you pair your keyboard with your phone, and is the outcome the same as in my lower picture?

It’s a bit silly situation if 3.0 and 5.1 work, but 5.0 doesn’t.

Yes exactly the same as lower picture

I can only uneducatedly guess that there may be something rotten in bluez5 (?) and its human interface device (HID) support on BT5.0 which is causing issues that are not dependent on the keyboard device.

What I know for a fact is that I got BT keyboards that work properly with a Sailfish OS device (except for the language support for the Android side) but they do that on a connection other than 5.0.

1 Like

Do you know how I may be able to modify the bluez config?

Or whether I could raise this as an issue for someone to look into?

I guess one would have to make a bug report out of it, BT5.0 will pair but won’t properly work with a HID device.

I’m a total beginner in the Terminal stuff myself, but I would start by trying to manually connect the Bluetooth through the command line and see what kind of error messages I get. Or as a superuser run

journalctl --follow

while trying to connect the keyboard through the Settings - Bluetooth.

edit:
screenshots of my Terminal when:

  1. successfully connecting to my keyboard through BT3.0

sf_bt1

  1. managing to pair but not being able to connect to my keyboard through either BT4.0 or BT5.0

sf_bt2

Apparently HOG profile (HID over GATT) is the culprit.

Maybe if you disable HoG profile as instructed below, would it fall back to using HID? Or does the HoG need some passcode which the procedure here fails to ask? I’m not sure but shouldn’t Sailfish side generate a PIN code that you would the have to input on the physical keyboard in order to pair the devices?

1 Like

I’ll do this, thank you.