We have moved to a new Sailfish OS Forum. Please start new discussions there.
8

Dual-Sim, choose SIM for bluetooth HFP connection

asked 2017-10-08 10:58:24 +0200

pmelas gravatar image

updated 2017-10-17 14:35:31 +0200

DaveRo gravatar image

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 flag offensive close delete

4 Answers

Sort by » oldest newest most voted
2

answered 2018-05-25 00:51:08 +0200

DaveRo gravatar image

updated 2018-05-25 09:48:37 +0200

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.

edit flag offensive delete publish link more

Comments

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

deloptes ( 2018-05-25 01:09:04 +0200 )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?

DaveRo ( 2018-05-25 09:41:56 +0200 )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.

DaveRo ( 2018-05-25 11:56:12 +0200 )edit
1

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
pactl load-module module-loopback source=bluez_source.xx_xx_xx_xx_xx_xx.a2dp_source sink=alsa_output.pci-0000_00_1b.0.analog-stereo

regards

deloptes ( 2018-05-25 19:39:53 +0200 )edit
2

answered 2018-10-28 23:33:47 +0200

DaveRo gravatar image

Workaround here:
https://together.jolla.com/question/191410/jollac-un-changelog-22118/

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

edit flag offensive delete publish link more

Comments

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.

slowcyclist ( 2018-12-01 22:13:49 +0200 )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.

DaveRo ( 2019-02-12 09:56:28 +0200 )edit
1

The connection will be don with the last activaed SIM. So after reboot the activation sequence is SIM1 then SIM2 and SIM2 will be connected via BT. If SIM1 is temporarily disabled, it's the last activated SIM after and will be connected via BT.

(reliable) workaround: disable and reactivate the preferred SIM before connecting to car, also to have the connected SIM displayed correctly. Otherwise the car display will switch to connected SIM with next call. It's a fiddling - even in 3.2.1 ...

fortify ( 2020-01-21 10:53:21 +0200 )edit
1

answered 2017-10-08 11:34:59 +0200

Dreej gravatar image

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.

edit flag offensive delete publish link more

Comments

1

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

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

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

Dreej ( 2017-10-11 02:54:57 +0200 )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?

DaveRo ( 2017-10-17 14:34:13 +0200 )edit
0

answered 2019-06-17 17:21:05 +0200

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.

edit flag offensive delete publish link more

Comments

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.

deloptes ( 2019-06-17 22:48:27 +0200 )edit
Login/Signup to Answer

Question tools

Follow
6 followers

Stats

Asked: 2017-10-08 10:58:24 +0200

Seen: 2,285 times

Last updated: Jun 17 '19