gartnera / headunit

Headunit for Android Auto
GNU Affero General Public License v3.0
348 stars 90 forks source link

Connect BT to phone connected to AA #139

Open marcusds opened 6 years ago

marcusds commented 6 years ago

If multiple devices are paired to the headunit using Bluetooth, it would be nice if the Android Auto app was smart enough to get the headunit to connect Bluetooth to the device connect to AA.

Keeps happening to me where my phone is connected to AA, but BT is connected to my wife's phone.

lmagder commented 6 years ago

I haven't run into this since I only have one paired device, but yeah it would be nice to have for completeness.

Frustratingly it seems like the phone never sends it's BT address to the car, only the other way around. We just get the phone's name. Maybe that's enough?

There is a com.jci.bca DBus interface on the car which seems to support the BT pairing operations but I haven't done much investigation. It seems from the method names it should be possible to enumerate the paired devices and select one, but it would take some experimentation to find out exactly how this works.