I am trying to connect my Raspberry Pi via Bluetooth to my car infotainment screen. When scanning for phones, it only recognizes devices with the correct Bluetooth class of device (CoD) for phones, so I changed it with:
sudo hciconfig hci0 class 0x5a020C
And now it is recognized and pairs with my car sucessfully. It asks me for the code and it matches. My Pi shows it as connected but it instantly disconnects after pairing. In my screen I see it as disconnected. Even if I trust the car screen Bluetooth MAC address.
With bluetoothctl info, I can see the profiles/services the car has over Bluetooth and it has the following UUIDs:
0x1101 AudioSource
0x110b AudioSink
0x110c A/V_RemoteControlTarget
0x110d AdvancedAudioDistribution
0x110e A/V_RemoteControl
0x111e Handsfree
0x1200 PnPInformation
After installing pulseaudio, pulseaudio-module-bluetooth and ofono, my Raspberry Pi has the following UUIDs:
0x1112 Headset AG
0x1801 Generic Attribute Profile
0x110e A/V Remote Control
0x1800 Generic Access Profile
0x1200 PnP Information
0x110c A/V Remote Control Target
0x110a Audio Source
0x110b Audio Sink Handsfree
0x111e Handsfree
0x1108 Headset
It does not have Advanced Audio Distribution Profile (A2DP) like my screen or my real smartphone does and is the only missing profile that the screen has that I can see.
When I select 'Connect' in my car screen, I get messages on bluetoothctl on my Pi to authorize services 0x110e and 0x110d and even if I do, it disconnects right afterwards. I see the
Do you need to have Bluetooth profile A2DP in the list of UUIDs of the Pi to connect?
1.1. Is it possible to install a package to add that profile on a Pi?
1.2. Would it be possible to act as a phone with an ESP32 instead? Since I read some can have A2DP?
Could there be another problem causing the instant disconnect?
I got UUIDs reference from p.65: https://btprodspecificationrefs.blob.core.windows.net/assigned-numbers/Assigned%20Number%20Types/Assigned_Numbers.pdf
I tested with Raspbian Buster Lite and full on both a Pi 3b+ and Pi 4.
Thank you.