Broken pairing, no connection with Bluetooth car kit [10 III, 4.4.0.68]

REPRODUCIBILITY: 100%
OS VERSION: 4.4.0.68
HARDWARE: X10 III
UI LANGUAGE: Polish, English
REGRESSION:

DESCRIPTION:

OS 4.4.0.68 has broken pairing with older Bluetooth car kits from the UI (request to enter the pairing code does not appear, so pairing fails). Those car kits have a hardcoded “1234” pairing code which has to be entered on the phone, or else pairing fails. I had to pair it manually via the terminal using bluetoothctl (which worked fine as it did request me to input the pairing code) and only this way I was able to pair it. But even when paired (the phone appears in the car kit’s list of paired devices), the phone is then unable to connect to the car kit. All attempts to establish the connection (initiated from either the phone’s and the car kit’s side) fail. They connect for a fraction of second and disconnect. See bluetoothctl output below.

There shouldn’t be such problems with such a simple car kit (only HFP, HSP, SYNC and PBAP profiles). This is the ONLY case of a device that’s unable to connect, all other smartphones of mine (ranging from as old as the Nokia N900, Blackberry Z10, Blackberry Passport, to recent iPhones) pair and connect just fine with it.

I have two Citroen cars with two identical car kits, tried with both, same result. In one of them I have XA2 Ultra with SFOS paired and actively used, but pairing was done when the phone was on 4.3 OS. Now with 4.4.0.68 OS, I cannot pair the XA2 with the other identical car kit, either. So it’s not a X10 III problem but rather 4.4 OS problem.

As I also have 3 more spare car kit units (as spare parts, each of them having different HW and SW version, and even different manufacturers: Siemens and Continental), I tested it with all three of them, too. Same results, on five units in total.

PRECONDITIONS:

STEPS TO REPRODUCE:

  • Have a Bluetooth car kit, like the one that I have (Citroen/Peugeot KML, which is Parrot based)

  • Have a SFOS 4.4.0.68 phone like the XA2U or the X10 III

  • Try to pair them

  • You can’t because the Bluetooth Settings UI isn’t asking you to enter the required pairing code (i.e. 1234 which is hardcoded in those car kit units).

  • Use bluetoothctl in the Terminal instead, which does allow entering the pairing code, so pairing succeeds and your phone is now listed on your car kit’s list of paired devices

  • Try to connect. Failure each single time. Bluetoothctl output shows that it does connect for a fraction of second, but connection is instantly dropped tike this:

    [CHG] Device 00:03:19:01:DE:2D Connected: yes
    [CHG] Device 00:03:19:01:DE:2D Connected: no
    [CHG] Device 00:03:19:01:DE:2D Connected: yes
    [CHG] Device 00:03:19:01:DE:2D ServicesResolved: yes
    [CHG] Device 00:03:19:01:DE:2D ServicesResolved: no
    [CHG] Device 00:03:19:01:DE:2D Connected: no

EXPECTED RESULT:

It should be asking for the pairing code via the UI or else it is not possible to pair it without using bluetoothctl via the terminal. And then it should normally connect.

ACTUAL RESULT:

It doesn’t ask for the pairing code, so pairing via Bluetooth Settings UI always fails and one has to use bluetoothctl via the terminal to pair it. But even when successfully paired this way, it is then unable to connect.

MODIFICATIONS:

None. Fresh X10 III.

ADDITIONAL INFORMATION:

I attach output from bluetoothctl showing pairing progress and then failed connection attempts.

[root@Xperia10III defaultuser]# bluetoothctl
Agent registered
[bluetooth]# scan on
Discovery started
[CHG] Controller 3C:38:F4:13:86:7C Discovering: yes
[NEW] Device 00:03:19:01:DE:2D CITROEN
[bluetooth]# pair 00:03:19:01:DE:2D
Attempting to pair with 00:03:19:01:DE:2D
Request PIN code
[agent] Enter PIN code: 1234
[CHG] Device 00:03:19:01:DE:2D Connected: yes
[CHG] Device 00:03:19:01:DE:2D UUIDs: 00001107-0000-1000-8000-00805f9b34fb
[CHG] Device 00:03:19:01:DE:2D UUIDs: 00001108-0000-1000-8000-00805f9b34fb
[CHG] Device 00:03:19:01:DE:2D UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device 00:03:19:01:DE:2D ServicesResolved: yes
[CHG] Device 00:03:19:01:DE:2D Paired: yes
Pairing successful
[CHG] Device 00:03:19:01:DE:2D ServicesResolved: no
[CHG] Device 00:03:19:01:DE:2D Connected: no
[CHG] Device 00:03:19:01:DE:2D Connected: yes
[CHG] Device 00:03:19:01:DE:2D Connected: no
[CHG] Device 00:03:19:01:DE:2D Connected: yes
[CHG] Device 00:03:19:01:DE:2D ServicesResolved: yes
[CHG] Device 00:03:19:01:DE:2D ServicesResolved: no
[CHG] Device 00:03:19:01:DE:2D Connected: no
[CHG] Device 00:03:19:01:DE:2D Trusted: yes
[CHG] Device 00:03:19:01:DE:2D Connected: yes
[CHG] Device 00:03:19:01:DE:2D Connected: no
[bluetooth]# trust 00:03:19:01:DE:2D
Changing 00:03:19:01:DE:2D trust succeeded
[CHG] Device 00:03:19:01:DE:2D RSSI: -39
[bluetooth]# pair 00:03:19:01:DE:2D
Attempting to pair with 00:03:19:01:DE:2D
Failed to pair: org.bluez.Error.AlreadyExists
[bluetooth]# connect 00:03:19:01:DE:2D
Attempting to connect to 00:03:19:01:DE:2D
[CHG] Device 00:03:19:01:DE:2D Connected: yes
[CHG] Device 00:03:19:01:DE:2D ServicesResolved: yes
Failed to connect: org.bluez.Error.NotAvailable
[CHG] Device 00:03:19:01:DE:2D ServicesResolved: no
[CHG] Device 00:03:19:01:DE:2D Connected: no
[bluetooth]# connect 00:03:19:01:DE:2D
Attempting to connect to 00:03:19:01:DE:2D
[CHG] Device 00:03:19:01:DE:2D Connected: yes
[CHG] Device 00:03:19:01:DE:2D ServicesResolved: yes
Failed to connect: org.bluez.Error.NotAvailable
[CHG] Device 00:03:19:01:DE:2D ServicesResolved: no
[CHG] Device 00:03:19:01:DE:2D Connected: no
[bluetooth]# connect 00:03:19:01:DE:2D
Attempting to connect to 00:03:19:01:DE:2D
[CHG] Device 00:03:19:01:DE:2D RSSI: -47
[CHG] Device 00:03:19:01:DE:2D Connected: yes
[CHG] Device 00:03:19:01:DE:2D ServicesResolved: yes
Failed to connect: org.bluez.Error.NotAvailable
[CHG] Device 00:03:19:01:DE:2D ServicesResolved: no
[CHG] Device 00:03:19:01:DE:2D Connected: no
[CHG] Device 00:03:19:01:DE:2D Connected: yes
[CHG] Device 00:03:19:01:DE:2D Connected: no
[CHG] Device 00:03:19:01:DE:2D Connected: yes
[CHG] Device 00:03:19:01:DE:2D Connected: no
[CHG] Device 00:03:19:01:DE:2D Connected: yes
[CHG] Device 00:03:19:01:DE:2D ServicesResolved: yes
[CHG] Device 00:03:19:01:DE:2D ServicesResolved: no
[CHG] Device 00:03:19:01:DE:2D Connected: no
[CHG] Device 00:03:19:01:DE:2D Connected: yes
[CHG] Device 00:03:19:01:DE:2D Connected: no
[CHG] Device 00:03:19:01:DE:2D RSSI is nil
[CHG] Controller 3C:38:F4:13:86:7C Class: 0x00000000
[CHG] Controller 3C:38:F4:13:86:7C Powered: no
[CHG] Controller 3C:38:F4:13:86:7C Discovering: no
[CHG] Controller 3C:38:F4:13:86:7C Class: 0x001c020c
[CHG] Controller 3C:38:F4:13:86:7C Powered: yes
[CHG] Device 00:03:19:01:DE:2D Connected: yes
[CITROEN]# trust 00:03:19:01:DE:2D
Changing 00:03:19:01:DE:2D trust succeeded
[CITROEN]# connect 00:03:19:01:DE:2D
Attempting to connect to 00:03:19:01:DE:2D
[CHG] Device 00:03:19:01:DE:2D Connected: no
Failed to connect: org.bluez.Error.Failed
[CHG] Device 00:03:19:01:DE:2D Connected: yes
[CITROEN]# scan on
Discovery started
[CHG] Controller 3C:38:F4:13:86:7C Discovering: yes
[CHG] Device 00:03:19:01:DE:2D Connected: no
[CHG] Device 00:03:19:01:DE:2D RSSI: -44
[CHG] Device 00:03:19:01:DE:2D Connected: yes
[CHG] Device 00:03:19:01:DE:2D Connected: no
[CHG] Device 00:03:19:01:DE:2D Connected: yes
[CHG] Device 00:03:19:01:DE:2D Connected: no
[CHG] Device 00:03:19:01:DE:2D Connected: yes
[CHG] Device 00:03:19:01:DE:2D Connected: no
[CHG] Device 00:03:19:01:DE:2D Trusted: no
[CHG] Device 00:03:19:01:DE:2D Trusted: yes
[CHG] Controller 3C:38:F4:13:86:7C Alias: Xperia 10 III
[CITROEN]# connect 00:03:19:01:DE:2D
Attempting to connect to 00:03:19:01:DE:2D
[CHG] Controller 3C:38:F4:13:86:7C Class: 0x00000000
[CHG] Device 00:03:19:01:DE:2D ServicesResolved: yes
Failed to connect: org.bluez.Error.Failed
[CHG] Controller 3C:38:F4:13:86:7C Powered: no
[CHG] Controller 3C:38:F4:13:86:7C Discovering: no
[CHG] Device 00:03:19:01:DE:2D ServicesResolved: no
[CHG] Device 00:03:19:01:DE:2D Connected: no
[CHG] Device 00:03:19:01:DE:2D RSSI is nil
[CHG] Controller 3C:38:F4:13:86:7C Class: 0x001c020c
[CHG] Controller 3C:38:F4:13:86:7C Powered: yes
[CHG] Device 00:03:19:01:DE:2D Connected: yes
[CHG] Controller 3C:38:F4:13:86:7C Class: 0x00000000
[CHG] Device 00:03:19:01:DE:2D ServicesResolved: yes
[CHG] Device 00:03:19:01:DE:2D ServicesResolved: no
[CHG] Device 00:03:19:01:DE:2D Connected: no
[CHG] Controller 3C:38:F4:13:86:7C Powered: no
[CHG] Controller 3C:38:F4:13:86:7C Discovering: no
[bluetooth]#


Controller 3C:38:F4:13:86:7C (public)
        Name:
        Alias: Xperia 10 III
        Class: 0x001c020c
        Powered: yes
        Discoverable: yes
        DiscoverableTimeout: 0x00000000
        Pairable: yes
        UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
        UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)
        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
        UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
        UUID: Phonebook Access Server   (0000112f-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
        UUID: OBEX Object Push          (00001105-0000-1000-8000-00805f9b34fb)
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: Device Information        (0000180a-0000-1000-8000-00805f9b34fb)
        Modalias: usb:v1D6Bp0246d053A
        Discovering: no
        Roles: central
        Roles: peripheral
Advertising Features:
        ActiveInstances: 0x00 (0)
        SupportedInstances: 0x05 (5)
        SupportedIncludes: tx-power
        SupportedIncludes: appearance
        SupportedIncludes: local-name
        SupportedSecondaryChannels: 1M
        SupportedSecondaryChannels: 2M


Device 00:03:19:01:DE:2D (public)
        Name: CITROEN
        Alias: CITROEN
        Class: 0x00300408
        Icon: audio-card
        Paired: yes
        Trusted: yes
        Blocked: no
        Connected: yes
        LegacyPairing: yes
        UUID: IrMC Sync Command         (00001107-0000-1000-8000-00805f9b34fb)
        UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
        UUID: Handsfree                 (0000111e-0000-1000-8000-00805f9b34fb)

Device 00:80:37:1F:4C:F6 (public)
        Name: C2
        Alias: C2
        Class: 0x00200408
        Icon: audio-card
        Paired: yes
        Trusted: yes
        Blocked: no
        Connected: yes
        LegacyPairing: yes
        UUID: IrMC Sync Command         (00001107-0000-1000-8000-00805f9b34fb)
        UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
        UUID: Handsfree                 (0000111e-0000-1000-8000-00805f9b34fb)
3 Likes

Please advise if I can take any further logs or use any other tools to trace the connection and find what’s exactly causing it to fail…

No one is able to help? :worried:

This sounds like a very probable duplicate of this report, which is under investigation: [4.3.0] [4.2.0] Can't pair Bluetooth to device asking PIN code

1 Like

Well, not really a duplicate, because in my case it is not just no request for PIN, but then also no connection. For no request to enter the PIN code there is a simple workaround - using bluetoothctl via the terminal, which does request entering the code and so it results in successful pairing. But then, after successful pairing, the phone can’t sustain connection with the car kit, anyway, despite being paired and listed on the car kit’s list of paired devices. As my bluetoothctl output shows, there are several connection attempts but they only last a short while and get dropped.

If I knew where to look, I might be able to collect some further logs which might show what exactly is causing the connection to drop…

On the old forum site, I wrote this in 2017…not sure if it still works

If the car requires a PIN, then it is using legacy pairing from BT <= 2.0. If you are using bluez5 (which you would have actively had to change to on a Jolla 1 i think), then it comes with an autopair plugin, but only tries the code 0000, so if the code is something other than that, then the pairing will fail (i have this on my parrot ck3100).

The solution for me is to disable the autopair plugin. This involves editing /usr/lib/systemd/system/bluethoothd.service and adding the parameter “-P autopair” and rebooting.

If you dont want to edit the file, you can override it by copying it to /etc/systemd/system, and doing the mod there.

1 Like

Well, pairing is no longer a problem as I was able to work it around using bluetoothctl, which asks for the PIN code, resulting in a successful pairing. Bluetoothctl correctly discovers and reports “LegacyPairing: yes” in both those car kits I tried it with.

The problem is that despite successful pairing, it is then impossible to establish connection… Bluetoothctl output shows that there are several attempts to connect but they get disconnected. It is not clear, though, which side drops the connection…

As for bluez5, in December 2021 when my XA2 had SFOS 4.2 or 4.3, I was able to normally pair it with that same car kit. The phone did ask me to enter the PIN code, and since then it’s been autoconnecting every single time. Phone book and call log get correctly synced, too.

So it must be something different…

After I updated the XA2 Ultra to OS 4.4, I then tried to pair it with an identical car kit in my wife’s car, and it turned out to be impossible. No request for the PIN code, and even if I manage to pair it using bluetoothctl then the phone isn’t able to connect to the car kit, anyway.

And now, I cannot use the newly bought X10 III with either of those car kits. No pairing due to no request for PIN code (solved by using bluetoothctl, which results in successful pairing), but then no connection.

So it looks as if something got broken in one of the recent OS upgrades, as it worked fine with 4.2 OS.

I don’t drive that much anymore, so I’d better actually check if I hit this bug, too.

I’m happy to announce that I was able to pair (and then successfully connect, including full sync of phone book, call log, etc.) both the X10 III and the XA2 Ultra (both running 4.4.0.68) with all the car kit units I own, i.e. 5 units in total (2 mounted in two cars, and three as spare parts).

It had to be done entirely via the terminal using bluetoothctl. The important part was that after issuing the pair command and entering the PIN code upon request, one has to either patiently wait for the device to reconnect or connect it manually using connect [mac address] command, and as soon as it is connected quickly issue the trust [mac address] command. Then, after successful trust'ing, if devices disconnect, it takes quickly issuing connect [mac address] command again to promptly reconnect, after which the devices start exchanging information about available Bluetooth profiles, which makes the whole pairing process complete and correct. After that, synchronising phone book and call log starts automatically.

Clearly, is all about correct order and correct timing, which (in addition to no request for the PIN code) doing it from the Settings / Bluetooth screen clearly doesn’t provide. So it is necessary to do it using bluetoothctl via the terminal, and with very precise order and timing. Not too quickly (because the car kit doesn’t seem to be a speed champion and if it gets a new command before completing the previous operation then pairing breaks) but also not to slowly or else there are clearly some timeouts which break pairing, too.

Anyway, now I have both my SFOS phones correctly paired and fully working with all my units. And they even autoconnect each time without any issues. Hooray!!!

1 Like

I’m currently facing this problem, I’ve successfully paired before but can not gain pir the device. Which package contains bluetoothctl as it’s not available on my iii nd zypper se --provides bluetoothctl returns no packages.

It is in bluez5-tools. Install with

devel-su
pkcon install bluez5-tools

Then start it (with root priviledges, i.e. after devel-su) with bluetoothctl

Then use the following commands:

scan on - to start scanning

When the car kit is discovered (its MAC address and name will be shown) type

pair [MAC address] to start pairing

then

trust [MAC address] to make the car kit a trusted device

and finally, if it disconnects and does not reconnect automatically

connect [MAC address] to reconnect, at which point it should discover and list UUIDs of your car kit’s Bluetooth profiles.

Then just leave it for a few minutes to synchronize data. Check after a few minutes in the car kit if there is phone book synced, if not, turn off the car kit (e.g. by removing the key in your car) or Bluetooth on the phone, then turn it on again and let them reconnect and do the sync by themselves.

As I wrote, in my case it required proper order and timing, so you may need to give it a few tries. Monitor blutoothctl’s output for whether the devices connect and stay connected during the process. If they disconnect, quickly reconnect them using connect [MAC address] before the car kit assumes timeout and cancels the pairing…

1 Like

Thank you.
strange that searching for what provides didn’t return that.

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

i have had this problem (or a similar problem) with my ancient car stereo for ages, and i fixed it today.

in the UI, i get a brief PIN prompt, which disappears in less than a second.
same thing in bluetoothctl with pair MAC. it briefly connects, attempts to pair, and immediately fails.
hcitool fails similarly (hcitool cc MAC && hcitool auth MAC fails with Input/output error).
pair MAC and then immediate trust MAC does not help.

what DID fix it for me was forcing EDR instead of EDR+LE. if i edit /etc/bluetooth/main.conf, and set ControllerMode=bredr, then pairing works just fine. it works in the ui, in bluetoothctl pair, and hcitool auth. after pairing is complete, i can then set ControllerMode back to dual, and everything works including my car stereo and my LE devices.

my stereo is the JVC KD-T900BTS, and my phone is Xperia 10 III, and i am still on SFOS=4.4.0.72

putting my soln here because this is the thread i always find when i google it

1 Like

As I don’t use any LE devices with my phone, I disabled it. In addition to the conf change, and restarting bluetoothd I also had to run devel-su rfkill unblock bluetooth so I could use Bluetooth in Settings again. Not sure what that was about, because running plain rfkill said it was already unblocked, so…

I’ll try pair my Ford Audio system again with this change, let’s see how it goes!