[4.3.0] [4.2.0] Can't pair Bluetooth to device asking PIN code

No worries :slight_smile: It has been wonderful to see a lot of old bugs being picked up already!

Could it be possible to set a PIN code to a Linux computer? Aim is to easily find a device with a PIN code and reproduce it without searching a specific device. If someone can try, describe all steps and is able to reproduce all conditions to reproduce this bug, I’ll be him thankful.

Thanks @direc85 for the nice and clear bug report (and the handy workaround), and to @pherjung for raising the bug for the meeting. I’ve created an internal report about it and tagged it as tracked.

1 Like

I have the same issue (and more, see below) with both X10 III and XA2 Ultra runnning OS 4.4.0.68. There is no request for entering the pairing code (which in case of my car kit is hardcoded “1234” which needs to be entered on the phone during the pairing process). The only solution is to use bluetoothctl which does request to enter the code, and so it results in successful pairing.

But even after successful pairing using bluetoothctl (the phone appears on the car kit’s list of paired devices), the phone cannot establish a successful connection with the car kit. There are connection attempts but they get dropped. Please see my bug report for details:

1 Like

Trying to connect my Sailfish OS device using the bluez5-tools (bluetoothctl) to my car kit as described as solution didn’t work for me.
I have paired a headset successful and my laptop (both without pin question).
But connecting my cat kit did not work.
The scan on shows the mac address only a short time when i enter the pin on the car kit ‘[NEW] message’, but within a second the scan shows a ‘[DEL] message’.

root@fp2-1:~ # bluetoothctl
Agent registered
[NEW] Device 04:76:6E:EA:60:36 MB-Bluetooth
[DEL] Device 04:76:6E:EA:60:36 MB-Bluetooth
[bluetooth]# info 04:76:6e:ea:60:36
Device 04:76:6e:ea:60:36 not available
[CHG] Controller 84:CF:CB:8C:9E:78 Class: 0x00000000
[CHG] Controller 84:CF:CB:8C:9E:78 Powered: no
[CHG] Controller 84:CF:CB:8C:9E:78 Discovering: no
[bluetooth]# exit

So it is not possible to enter any command on bluetoothctl to get some info or pair the phone with the car kit :thinking:
It seems that the phone answer the car kit request immediately, the car kit detect an error (or a wrong pin?) and shows a ‘connection failed’.

May be the phone has an invalid configuration?
Where i can check the configuration on the phone and is it possible to debug the agent started by bluetoothctl?

Many thanks for any hint :grinning: Gabs

There may be change to this with newer Bluez (hopefully with 4.5) but until then the command line thing ahould work. I can try it today with my car audio.

One thing you could try is clearing the Bluetooth cache. There’s a separate issue about it, with details: Removing Bluetooth device doesn't remove cache

Edit: The original bug is reproducible as-is with X10III running 4.4.0.72. Clearing the cache doesn’t affect the behavior. (Media controls and song info also works as before.)

1 Like

You have to scan on first, and when you see your target device, scan off and then (quickly?) pair or display info. I just used bluetoothctl successfully.

Hi. I have a new Sena M1 evo 2022 mountain bike helmet. Unfortunately I cannot connect it with the Sena cycling app. It requires BLE at least 4.0. Does any body know how to connect this helmet with the help of the Sena cycling app? I use a Sony Xperia 10 II with Sailfish os 4.4.0.72.

Android applications on Sailfish OS don’t support Bluetooth nor have access to it. There have been some thoughts of how to perhaps approach the issue, but AFAIK that’s it…

If the helmet works as a “normal” headset/handsfree, you don’t need the application. You should be able to pair it using Sailfish OS Settings. Worth a shot at least.

As I described in the other thread (bug report), linked above, I eventually managed to successfully pair multiple car kit units using bluetoothctl, and since then it’s been working perfectly fine (connection is always automatically established, contacts & call history are synchronized, can make and receive calls, caller ID is shown, etc.)

As @direc85 wrote above, you need to start from issuing scan on command, and after that it should discover your device. Then type pair [mac address] command and it should attempt to pair and then ask you for the PIN code.

In my case it looked as follows:

[defaultuser@Xperia10III ~]$ devel-su
Password:
[root@Xperia10III defaultuser]# bluetoothctl
Agent registered
[bluetooth]# scan on
Discovery started
[CHG] Controller 3C:38:F4:13:YY:YY Discovering: yes
[NEW] Device 00:03:19:01:XX:XX CITROEN
[bluetooth]# pair 00:03:19:01:XX:XX
Attempting to pair with 00:03:19:01:XX:XX
Request PIN code
[agent] Enter PIN code: 1234
[CHG] Device 00:03:19:01:XX:XX Connected: yes
[CHG] Device 00:03:19:01:XX:XX UUIDs: 00001107-0000-1000-8000-00805f9b34fb
[CHG] Device 00:03:19:01:XX:XX UUIDs: 00001108-0000-1000-8000-00805f9b34fb
[CHG] Device 00:03:19:01:XX:XX UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device 00:03:19:01:XX:XX ServicesResolved: yes
[CHG] Device 00:03:19:01:XX:XX Paired: yes
Pairing successful
[CHG] Device 00:03:19:01:XX:XX RSSI: -47
[bluetooth]# trust 00:03:19:01:XX:XX
Changing 00:03:19:01:XX:XX trust succeeded
1 Like

Problem solved :smiley:. At the directory /var/lib/bluetooth/ a file exist with the MAC Address of the car kit.
This file only contains:

[General]
Name=MB-Bluetooth

I delete the file and use the bluetoothctl command with ‘scan on’.
On my car kid i also start the search.
The car kit found my phone and after selecting the phone and entering the pin on the car kid, on the phone a pin request came on the terminal.
Entering the same pin successfully connected the phone and the cat kit.
I only have to enter the ‘trust xx:xx:…’ then :smiley:.
Now the phone always is connected to the cat kit when i switch bluetooth on on the phone …
So many thanks for your hints :clap:. Gabs
btw. there was no need to enter ‘pair xx:xx:…’ on the phone.

Xperia 10 III 4.4.0.72

I tried to connect to a “Jaguar F-Type” today. A Project 7 actually.

The car system gives two options, either to wait for a device to find the car, or for the car to search for the device. In both cases it fails. One outright with a mismatch PIN claim, the other asking for a code to be entered on the new device which never gets requested on the phone and it bounces back to failure.

Either way it’s a big fail.

So, bottom line, I can’t buy a Project 7 this week!

Bluetooth on SFOS has been trash from the start and is NOT getting any better. The entire technology through Sailfish is abysmal to say the least.

BT is crap everywhere since V1 and that hasn’t changed. For whatever reason, it’s flakey and SFOS implementation is as flakey as others.

I had another go yesterday and it connected. PIN codes appeared but I didn’t enter anything on the phone and despite what looked like some error, it connected and worked. It also automagically re-connected after being away from the powered off car.

So I guess I can buy a Project-7 after all :o

4.4.0.72 Same problem with my car handfree.
Car is expecting PIN 1212, phone doesn’t prompt for it.
(Paired happily back on 3.4)

I have to ask what brain dead moron would think it was a good idea to replace prompting for a pin, with silently using 0000, saying nothing, and failing. Another 15minutes of my life lost forever.
[Disappointing as it paired seamlessly yesterday with a Hyundai Kona, now displays all the music information, and uploaded call lists to the car]

Have you got a dealer, looks like I will have to sell mine and buy a Jag. Do they do trade ins?

That was the correct fix (mitsi outlander): Set the “PASSKEY” to 0000 at the bottom of the Bluetooth setting menu on the car. It only has to be during the register phase, once registered in the car it can be set back again, and continues to pair.

You have a Project 7? Since a Project 7 is a limited edition special version of the F-Type Jaguar, I’m not sure what you mean. :slight_smile:

A friend had a €20k solar system installed. I’ve been looking after the house and dogs for the last month.

The solar system is made by Victron and can be controlled via Wi-Fi and/or Bluetooth. I did try pairing with my device but was instantly rejected and does not ask for the 6 digit password (000000). The app is for Android but of course, it won’t run on Sailfish, it installs, it starts and promptly crashes back to a black cover…SailfishOS, is it secure?, YES, you cannot do anything with it, that’s why it is so secure!! {{{smh}}}.

if the app is for android, why you complain about not being able to use it on SailfishOS?
Sorry but please complain to the app manufacturer to release SFOS version instead.
If he won’t do that then sorry but Jolla can do nothing about it.
It’s like you’d complain here why you can’t have iOS apps working on SFOS - it’s just you can’t.
And having the ability to even install android apps on SFOS is from my point of view - the biggest mistake that has been done as now users comes here and constantly complain about it where there are much much bigger problems to fix.