Bluetooth keyboard not pairing

I have a BT keyboard (chinese) that require a pin code to pair, worked on UT mobile, ipados, android, all same method:
You turn on BT in device, set keyboard to BT discoverable, scan on device, you click the shown BT keyboard a pop up window ask you to enter a pin code (6 randomized digits) that is shown on the device and must be entered using the BT keyboard and voila keyboards works.
On SFOS that is not the case:
The pop up show to enter the pin code but does not show the pin digits, typing randomly on the BT keyboard does not type anything in that window.
Any help would be appreciated and frankly am kinda disapointed that such issue exist.
Thank you for your time.

It’s a bit hard to follow what you are saying.
But it would appear that you expect the BT Keyboard to work for input when it is not yet fully paired… surely that’s not what you really meant?

Have you tried inputting the same code on both ends?

On any other device, you would type the shown pin code on the keyboard itself before getting a succeful pair.
On SFOS that pin code don’t pop, so the 1st issue is here and it is a random 6 digit number (i tried to insert one from anotger pair it did not work) what pop is a window that want you to add that pin code using the virtual keyboard, and here is the 2nd issue, the pin code must be typed on the keyboard and not on the Vidtual device keyboard. I will try to add a screenshot once i have a time to make what am saying more obvious.

Here is a video showing how it is different connecting with android vs sailfish.

Yes. The virtual keyboard, not the physical one.

So what you have is both sides thinking that they are the one that should ask for a pin. Your explanation sounds so backwards.

And, again, did you try just inputting made-up matching codes on both sides?

Anyway; maybe look into pairing from command line and/or how it should be handshaked which side that should ask for a pin. And with some more info this sounds like a bug report in the making. Sure, you could open one already now, but in order to make it a bit more solvable outside your specific situation, some more info on where it goes wrong probably helps a lot.

Check the video link and you will see the difference, remember that the asked pin is random, and on sfos it is not showing, while on other osses it clearly show it…

Yes; SFOS thinks it can or should ask for the code instead of generating one. Something is wrong, and a technical description of it makes for a great bug report.

(And, for a third time, it might just work if you input matching codes on both sides).


And, for a third time, it might just work if you input matching codes on both sides


Nothing wrong in trying, but doubt it will work, it is not a fixed code key it is random

Following your suggestion, i was able to pair the keyboard, but cannot connect to it.
For reference:
Once the key code popped i entered 123456 on it using the virtual keyboard, and then on the BT keyboard i pressed the 123456 and enter.
The keyboard is pair but so far cannot make a connection to it, even tried with bluetoothctl it shows paired, trusted, bonded, LegacyPairing all yes.
Blocked, Connected no.
connect (mac address)
failed to connect org.bluez.Error.NotAvailable br-connection-profile-unavailable
will add a screeshot later.

Hope this will help someone later.

I am not sure if keyboards are supported in Sailfish, because of Android layer compatibility. I remember someone said it is only the Audio and some other devices.

What is obvious here is that in the Android case you get a request to confirm on both sides, which is the newer authentication method. The one with the PIN that needs to be entered seems like the old method. The PIN should match both sides to pair, so you correctly did this part.

You could pay attention to “failed to connect org.bluez.Error.NotAvailable br-connection-profile-unavailable” and see if you find something useful here [SOLVED] Bluetooth connect failed: br-connection-profile-unavailable. / Newbie Corner / Arch Linux Forums

Why would this have anything to do with the Android runtime?
SFOS itself should support keyboards just fine.

Indeed it does.

I successfully paired my XA2 with a Jelly Comb keyboard (B003B, if memory serves me right).

Ok, if it works, then OP is may be missing something.
But are you also sure it worked with bluez5?

I’m on the latest Struven Ketju ( right now, so that would be “yes”, I guess.

$ rpm -qa | grep bluez
lists 5 packages with “bluez5” in their name and none with “bluez4”.

Will try what work on SFOS from those many different suggestions, although i find this kinda disappointing in these days, i mean why would a simple thing as connecting BT device that worked on multiple different OS to be a hustle on SFOS and apparently on Arch linux too lol.
Thank you for your input and actually taking the time to look into the error and search it.

Better don’t ask this. There are different manufacturers hardware and software version and too many differences and places where it can fail. But Jolla could do better work on the BT side. Although I must admit that the Audio part is working fine now. I hope it does so also in the future. I had an experience that N9 and the AquaFish that had bluez4 worked perfectly well with the older Honda Navigation System, but the SFOS > 3.2 stopped working because of some issue with bluez5.
Now the newer Honda is working fine with bluez5. AFAIR the old one had bluetooth 2.0 hardware version.

Which SFOS version are you using and on what device? I couldn’t conclude in the video. Perhaps you could just edit your first post, so that one could get the information instantly

Yeah i did not add the SFOS version and device because i don’t think it is specific.

I have two Bluetooth keyboards, of which only other one works. Akko 3068B Plus connects and works just fine, but Cooler Master SK622 allows pairing and even looks like connecting but my SK622 doesn’t get recognized as a keyboard by Sailfish OS and the input doesn’t go through.

I understand the reason is that my Akko has both Bluetooth 3.0 and 5.0 and it’s specifically on 3.0 where my Akko gets recognized as keyboard and works. On 5.0 I fail to pair my Akko similarly to what you describe. I can’t get Sailfish to recognize the Akko bluetooth device as a keyboard and Sailfish doesn’t generate the pin code to be input from the keyboard to finish the pairing.

My SK622 I believe has only Bluetooth 5.0 and it doesn’t work.

My guess would be that your Bluetooth keyboard has only Bluetooth 5.0 and for some reason Sailfish doesn’t want to play properly with 5.0.

I have an Xperia 10iii and a bluetooth keyboard BLOW-BK100 Klawiatura BLOW BLUETOOTH BK100 - Produkty - BLOW | Sklep internetowy

The solution suggested by @attah works for me. When SFOS asks “Please enter the code below ______”, I enter 123456 in SFOS and choose “Pair”, then type the same code on the physical keyboard followed by physical Enter. The keyboard immediately works. It will also disconnect/reconnect smoothly if I deactivate/activate again bluetooth on the phone.

The downsides of the implementation are:

  1. Keyboard layout is fixed. (My keyboard has a generic English layout, I can’t confirm if a national layout would enable diacritics.)
  2. No predictive input since the SFOS virtual keyboard and its suggestion bar disappear when the BT keyboard is connected.