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

REPRODUCIBILITY: 100%
BUILD ID = OS VERSION: 4.3.0.12
HARDWARE: X10II
UI LANGUAGE: Finnish
REGRESSION: Yes; at least in 4.1 and/or 4.0 pairing was possible

DESCRIPTION:

I have a Ford Audio system (by Sony), which pairs Bluetooth devices by showing a changing PIN code on the HUD during the pairing process. This worked with 4.0.0 (possibly with 4.1.0, too, but not with 4.2.0 nor 4.3.0. I can’t pair the audio system, because the phone never asks for the PIN code, but the process errors out instead.

PRECONDITIONS:

  1. Have a device that pairs with a changing PIN code
  2. Remove the existing pairing information

STEPS TO REPRODUCE:

  • Search for Bluetooth devices from the phone
  • Find the device and start pairing
  • PIN code is shown on the other device

EXPECTED RESULT:

  • The phone asks for the PIN code shown
  • PIN is entered
  • Pairing is completed

ACTUAL RESULT:

  • Phone doesn’t ask for the PIN code (it just spins)
  • The process timeouts

ADDITIONAL INFORMATION:

I was able to pair the audio system using bluez5-tools after which the GUI can be used to disconnect and connect the device.

3 Likes

I get a similar response when trying to pair my e-mtb to my Xperia 10 ii. It fails immediately and gives this error notification;

“Problem with pairing authentication. The passcodes did not match” - I never got asked for a code.

It seems everything I own, will not and does not pair with anything running Sailfish, headphones/laptop/gps/and more. Sad, especially with the feeling most of it will likely never get fixed.

You must use Bluetoothctl via terminal . this works for me :slight_smile:

2 Likes

Yeah, the workaround seems to be in many places :slight_smile:

For me, the only issue is this, and during 4.1 and 4.2 my JBL speaker and headphones, but they, uh, work. Let’s not go into call audio quality in this thread :joy:

My JBL speakers also pair without issue with 4.3. For what it’s worth. But I don’t recall entering a PIN, ever.

This is still issue with X10III on 4.4.0.64

@pherjung Perhaps this bug could be added to the list?

2 Likes

Another workaround is to configure the other BT device to send PIN code 0000, not ideal but worked for me.

1 Like

Thanks for the tip! My car audio system randomizes the PIN code, so it can’t be used in this case unfortunately.

Thank you to flag it.

In order to not overload flypig, it has been decided to provide a list of maximum 10 bug reports.
Because I’ll be away for the next weeks I provided this list the fastest I could. Unfortunately, I can’t add this bug report for the coming Community Meeting this 9th June.

Don’t worry, your bug report won’t be forgotten.

1 Like

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.