# Dual-Sim, choose SIM for bluetooth HFP connection

Is there anyway on a dual sim device, e.g. JollaC, to choose which SIM will be used over a bluetooth hands free connection, e.g. car?

edit retag close delete

Sort by » oldest newest most voted

BT will connect to first-activated SIM. Require a PIN on SIM2 only, which should ensure that PIN1 connects first.

more

1

With the help of my auto-enter-pin script, you can automate the activation of SIMs in the order you wish at boot. This means you can use DaveRo's workaround while keeping a pin lock on SIM 1.

( 2018-12-01 22:13:49 +0300 )edit

This workround does not, in fact, work - or not reliably, or not any more on my Jolla C 3.0.1.11 Yesterday the car connected to SIM2 despite SIM1 having been activated first. On the previous occasion I had connected SIM2 to the car by disabling SIM1. Maybe it 'remembered' that.

( 2019-02-12 09:56:28 +0300 )edit

My car always uses SIM 1 as main SIM. But there is no way to select. you only can deactivate the SIM you dont want to use for the connection process. In that case SIM 2 is the main card for this ride.

more

1

In my case I use SIM1 for calls and texts, and SIM2 is for data, so I cannot disable second sim.

( 2017-10-08 11:56:16 +0300 )edit

you can reactivate your data sim after the car is connected. connected sim will remain the activated one during the pairing process

( 2017-10-11 02:54:57 +0300 )edit

For the first time ever the car connected to SIM2 - they're set to 'always ask' and people always ring me on SIM1. I think this might have been because I'd last used SIM2, which was unusual - I sent a service message.

I had to stop the car, deactivate SIM2, reconnect to the car, and reactivate SIM1.

An option - which SIM to pair - would be useful.

How do other phones do this?

( 2017-10-17 14:34:13 +0300 )edit

I came accross this:
https://talk.sonymobile.com/t5/Xperia-M4-Aqua/Xperia-M4-Dual-auto-SIM-selection-for-hands-free-calls/td-p/1008473
which suggests that Sony/Android has or had a similar problem - but at least you can choose. Any other experience?

An option in SFOS to select which SIM to use for HFP would be best, or just connect to SIM 1 always.

My VW seems to connect randomly to SIM 1 or 2 - at least I can't see a pattern. It should NOT use the one with the best signal - my main SIM (3UK) has the worst signal.

BTW - although this question is 'answered' the underlying feature request is not.

more

I use Sailfish X with bluez5. If you have bluez4 it might be different issue but if first is the case, perhaps look into bluetoothctl (if you are familiar with command line tools) there is more flexibility.

I don't have this same problem (single sim here), but I looked a lot into the HFT stuff and sometimes it helps to delete the .pulse or .config/pulse directory and reboot, so that it may recreate properly.

I then would tell pulse audio which is the source to connect to - I did it for A2DP, but should be similar for HFT. It looks like PA is picking whatever source available. It sounds like you have bluez5

good luck

( 2018-05-25 01:09:04 +0300 )edit

Thanks. I'm very familiar with BT CLI tools (unfortunately - having struggled to get A2DP working on a BananaPi!). There's more to it than fiddling with pulseaudio, though. The sound might go through PA but the operator/signal/contacts obviously don't. But maybe it's possible to disable HFP on SIM 2. BT and pairing applies to the whole phone, though, not each SIM AFAIK.

Ideally the UI should be in the car, when you connect - or perhaps pair; it should ask which SIM to use. I wondered if anyone has a car that does that?

( 2018-05-25 09:41:56 +0300 )edit

On further investigation, SIM selection (as described in my link above) is probably part of Sim Access Profile (SAP). initial support for SIM Access Profile was added in BlueZ 4.91.

( 2018-05-25 11:56:12 +0300 )edit

Still not clear what bluez version you have. If it is bluez5 the HFT is in ofono. So those 3 must play together. It looks like ofono is offering HFT for second sim, because perhaps 2nd sim is discovered later.

Try disable/enable sim1 and see if it gets connected.

I don't know exactly how it works - you need to look into the code to get it right or track the behavior and ask for bug resolution.

I had to always do following on my PC to be able to get A2DP working from phone to pc

pactl list short


regards

( 2018-05-25 19:39:53 +0300 )edit

In my case (SFOS 3.0.3.9, VW Golf 7) it seems, that the car uses the SIM which connected first with the network and therefore is used by hfp/bluetooth. I have the impression, that this 'first connected SIM priority' consist until the next reboot of the phone.

So my modification of the workaround is to disable the unwanted SIM, boot up the phone and activate the unwanted SIM only after the preferred SIM has connection to the network.

more

1

If I recall correctly HFP is registered to bluetooth via ofono - so disable the sim and restart ofono should be enough. I'm not sure how you can easily restart ofono though - I was thinking there were an option under utilities, but just checked and there is none.

( 2019-06-17 22:48:27 +0300 )edit