Bluetooth headset supported?

Hello,

I checked Bluetooth headset profile on rockpi4 android9.
Now, Bluetooth headset service not running.

Because, headset settings is disabled by overlay settings.

    device/rockchip/common/overlay/packages/apps/Bluetooth/res/values/config.xml
 <resources>
    <bool name="profile_supported_a2dp_sink">false</bool>
    <bool name="profile_supported_hdp">false</bool>
    <bool name="profile_supported_hs_hfp">false</bool>
    <bool name="profile_supported_hfpclient">false</bool>
   ...

I tried to test by custom build image with above change settings( false -> true ).
But Headset don’t work(Service is avaiable but don’t work).

Has it been disabled for some reason?

In a different thread, the Radxa Team says that the BT Headset Profile is not yet supported.

Hi
Please test the following firmware (Android10):
ROCKPI 4B
ROCKPI 4C

Open Bluetooth Sink:
enable : TunerSettings -> Bluetooth -> Bluetooth Sink.

If Wait... dialog not dismiss, you can enable bluetooth in status bar, or reboot rockpi4.
You can pair Rockpi on your phone and play music to Rockpi, which will play audio via HDMI.

1 Like

Thank you.
I’ll try it.

Hi,
I tried it.

As a result, the BT devices can be paired, but they are disconnected shortly thereafter.

I’ll share the log as well.

2020-10-13 17:45:25.808 616-1169/com.android.bluetooth D/a2dp_codec: init
2020-10-13 17:45:25.808 616-1169/com.android.bluetooth D/a2dp_codec: createCodec: codec SBC
2020-10-13 17:45:25.808 616-1169/com.android.bluetooth D/a2dp_codec: createCodec: codec AAC
2020-10-13 17:45:25.808 616-1169/com.android.bluetooth D/a2dp_codec: createCodec: codec aptX
2020-10-13 17:45:25.810 616-1169/com.android.bluetooth E/a2dp_vendor_aptx_encoder: A2DP_VendorLoadEncoderAptx: cannot open aptX encoder library libaptX_encoder.so: dlopen failed: library "libaptX_encoder.so" not found
2020-10-13 17:45:25.810 616-1169/com.android.bluetooth E/a2dp_vendor_aptx: init: cannot load the encoder
2020-10-13 17:45:25.811 616-1169/com.android.bluetooth D/a2dp_codec: createCodec: codec aptX-HD
2020-10-13 17:45:25.812 616-1169/com.android.bluetooth E/a2dp_vendor_aptx_hd_encoder: A2DP_VendorLoadEncoderAptxHd: cannot open aptX-HD encoder library libaptXHD_encoder.so: dlopen failed: library "libaptXHD_encoder.so" not found
2020-10-13 17:45:25.812 616-1169/com.android.bluetooth E/a2dp_vendor_aptx_hd: init: cannot load the encoder
2020-10-13 17:45:25.812 616-1169/com.android.bluetooth D/a2dp_codec: createCodec: codec LDAC
2020-10-13 17:45:25.812 616-1169/com.android.bluetooth D/a2dp_codec: createCodec: codec SBC SINK
2020-10-13 17:45:25.812 616-1169/com.android.bluetooth D/a2dp_codec: createCodec: codec AAC SINK
2020-10-13 17:45:25.812 616-1169/com.android.bluetooth D/a2dp_codec: createCodec: codec LDAC SINK
2020-10-13 17:45:25.814 616-1169/com.android.bluetooth E/a2dp_vendor_ldac_decoder: A2DP_VendorLoadDecoderLdac: cannot open LDAC decoder library libldacBT_dec.so: dlopen failed: library "libldacBT_dec.so" not found
2020-10-13 17:45:25.814 616-1169/com.android.bluetooth E/a2dp_vendor_ldac: init: cannot load the decoder
2020-10-13 17:45:25.814 616-1169/com.android.bluetooth I/a2dp_codec: init: initialized Source codec LDAC
2020-10-13 17:45:25.814 616-1169/com.android.bluetooth I/a2dp_codec: init: initialized Source codec AAC
2020-10-13 17:45:25.814 616-1169/com.android.bluetooth I/a2dp_codec: init: initialized Source codec SBC
2020-10-13 17:45:25.814 616-1169/com.android.bluetooth I/a2dp_codec: init: initialized Sink codec AAC SINK
2020-10-13 17:45:25.814 616-1169/com.android.bluetooth I/a2dp_codec: init: initialized Sink codec SBC SINK
2020-10-13 17:45:25.814 616-1169/com.android.bluetooth W/bt_avp: AVDT_DisconnectReq: address=50:1a:a5:bf:5a:1c
2020-10-13 17:45:25.870 616-1169/com.android.bluetooth I/bt_stack: [INFO:btsnoop.cc(323)] clear_l2cap_whitelist: Clearing whitelist from l2cap channel. conn_handle=11 cid=66:5696
2020-10-13 17:45:25.871 616-1169/com.android.bluetooth I/bt_bta_av: bta_av_conn_cback: conn_cback bd_addr: 50:1a:a5:bf:5a:1c
2020-10-13 17:45:25.871 616-1169/com.android.bluetooth W/bt_btif: bta_av_str_closed: peer 50:1a:a5:bf:5a:1c handle:65 open_status:3 chnl:64 co_started:0
2020-10-13 17:45:25.871 616-1169/com.android.bluetooth W/bt_btif: bta_dm_rm_cback:0, status:1
2020-10-13 17:45:25.872 616-1169/com.android.bluetooth I/bt_bta_av: bta_av_cleanup peer 50:1a:a5:bf:5a:1c
2020-10-13 17:45:25.872 616-1169/com.android.bluetooth D/bt_bta_av: SetAvdtpVersion: AVDTP version for 50:1a:a5:bf:5a:1c set to 0x0
2020-10-13 17:45:25.872 616-1169/com.android.bluetooth D/bt_bta_av: SetAvdtpVersion: AVDTP version for 00:00:00:00:00:00 set to 0x0
2020-10-13 17:45:25.872 616-1169/com.android.bluetooth W/bt_btif: bta_av_rc_create: Skipping RC creation for the old AVRCP profile
2020-10-13 17:45:25.872 616-1169/com.android.bluetooth I/btif_av: virtual bool BtifAvStateMachine::StateOpening::ProcessEvent(uint32_t, void *): Peer 50:1a:a5:bf:5a:1c : event=BTA_AV_OPEN_EVT(0x2) flags=0x0(None) status=3(FAILED) edr=0x62
2020-10-13 17:45:25.872 616-1169/com.android.bluetooth E/bt_btif: get_connected_device: returning NULL
2020-10-13 17:45:25.872 616-1169/com.android.bluetooth I/chatty: uid=1002(bluetooth) bt_main_thread identical 4 lines
2020-10-13 17:45:25.872 616-1169/com.android.bluetooth E/bt_btif: get_connected_device: returning NULL
2020-10-13 17:45:25.873 616-1169/com.android.bluetooth I/btif_av: btif_report_connection_state: peer_address=50:1a:a5:bf:5a:1c state=0
2020-10-13 17:45:25.873 616-1169/com.android.bluetooth I/bt_btif_a2dp: btif_a2dp_on_idle: ## ON A2DP IDLE ## peer_sep = 0
2020-10-13 17:45:25.873 616-1169/com.android.bluetooth I/bt_btif_a2dp_sink: btif_a2dp_sink_on_idle
2020-10-13 17:45:25.873 616-1169/com.android.bluetooth I/bt_btif_a2dp_sink: btif_a2dp_sink_audio_handle_stop_decoding
2020-10-13 17:45:25.873 616-1169/com.android.bluetooth I/bt_btif_a2dp_sink: btif_a2dp_sink_audio_rx_flush_req
2020-10-13 17:45:25.873 616-1169/com.android.bluetooth D/bt_btif_avrcp_audio_track: BtifAvrcpAudioTrackPause handle is null.
2020-10-13 17:45:25.873 616-1169/com.android.bluetooth I/bt_btif_a2dp_sink: btif_a2dp_sink_clear_track_event_req
2020-10-13 17:45:25.873 616-1169/com.android.bluetooth I/bt_stack: [INFO:btif_av.cc(598)] bool BtifAvSink::SetActivePeer(const RawAddress &, std::promise<void>): peer: 00:00:00:00:00:00
2020-10-13 17:45:25.873 616-1240/com.android.bluetooth I/bt_btif_a2dp_sink: btif_a2dp_sink_clear_track_event
2020-10-13 17:45:25.873 616-1169/com.android.bluetooth I/bt_btif_a2dp_sink: btif_a2dp_sink_end_session: peer_address=50:1a:a5:bf:5a:1c
2020-10-13 17:45:25.873 616-1240/com.android.bluetooth D/bt_btif_avrcp_audio_track: BtifAvrcpAudioTrackStop handle is null.
2020-10-13 17:45:25.873 616-1169/com.android.bluetooth I/bt_btif_a2dp_sink: btif_a2dp_sink_shutdown
2020-10-13 17:45:25.873 616-1240/com.android.bluetooth D/bt_btif_avrcp_audio_track: BtifAvrcpAudioTrackDelete handle is null.
2020-10-13 17:45:25.874 616-1240/com.android.bluetooth I/bt_btif_a2dp_sink: btif_a2dp_sink_end_session_delayed
2020-10-13 17:45:25.874 616-1169/com.android.bluetooth I/btif_av: DeleteIdlePeers: Deleting idle peer: 50:1a:a5:bf:5a:1c bta_handle=0x41
2020-10-13 17:45:25.874 616-1240/com.android.bluetooth I/bt_btif_a2dp_sink: btif_a2dp_sink_shutdown_delayed
2020-10-13 17:45:25.876 616-817/com.android.bluetooth I/BluetoothA2dpSinkServiceJni: bta2dp_connection_state_callback
2020-10-13 17:45:25.880 616-616/com.android.bluetooth D/AdapterProperties: PROFILE_CONNECTION_STATE_CHANGE: profile=11, device=50:1A:A5:BF:5A:1C, 1 -> 0
2020-10-13 17:45:25.881 636-932/com.android.systemui I/LocalBluetoothProfileManager: Failed to connect A2DPSink device
2020-10-13 17:45:25.881 636-932/com.android.systemui D/CachedBluetoothDevice: onProfileStateChanged: profile A2DPSink, device=50:1A:A5:BF:5A:1C, newProfileState 0
2020-10-13 17:45:25.882 616-616/com.android.bluetooth D/AdapterProperties: ADAPTER_CONNECTION_STATE_CHANGE: 50:1A:A5:BF:5A:1C: 1 -> 0
2020-10-13 17:45:25.883 781-781/com.android.settings I/LocalBluetoothProfileManager: Failed to connect A2DPSink device
2020-10-13 17:45:25.883 781-781/com.android.settings D/CachedBluetoothDevice: onProfileStateChanged: profile A2DPSink, device=50:1A:A5:BF:5A:1C, newProfileState 0
2020-10-13 17:45:25.891 781-781/com.android.settings D/AdaptiveHomepageIcon: Setting background color -1453315
2020-10-13 17:45:27.950 616-1169/com.android.bluetooth I/bt_btm_sec: btm_sec_disconnected clearing pending flag handle:11 reason:19
2020-10-13 17:45:27.950 616-817/com.android.bluetooth I/btif_av: btif_av_acl_disconnected: Peer 50:1a:a5:bf:5a:1c : ACL Disconnected
2020-10-13 17:45:27.950 616-1169/com.android.bluetooth I/btif_av: BtifAvPeer *BtifAvSink::FindOrCreatePeer(const RawAddress &, tBTA_AV_HNDL): Create peer: peer_address=50:1a:a5:bf:5a:1c bta_handle=0x41 peer_id=0
2020-10-13 17:45:27.951 616-1169/com.android.bluetooth W/bt_btif: btif_av_get_peer_sep: No active peer found
2020-10-13 17:45:27.951 616-1169/com.android.bluetooth I/bt_btif_a2dp: btif_a2dp_on_idle: ## ON A2DP IDLE ## peer_sep = 1
2020-10-13 17:45:27.951 616-1169/com.android.bluetooth W/bt_btif: btif_av_get_peer_sep: No active peer found
2020-10-13 17:45:27.951 616-1169/com.android.bluetooth I/bt_btif_a2dp_source: btif_a2dp_source_on_idle: state=STATE_OFF
2020-10-13 17:45:27.951 616-1169/com.android.bluetooth I/bt_btif_a2dp: btif_a2dp_on_idle: ## ON A2DP IDLE ## peer_sep = 0
2020-10-13 17:45:27.951 616-1169/com.android.bluetooth I/bt_btif_a2dp_sink: btif_a2dp_sink_on_idle
2020-10-13 17:45:27.951 616-1169/com.android.bluetooth I/bt_btif_a2dp_sink: btif_a2dp_sink_audio_handle_stop_decoding
2020-10-13 17:45:27.951 616-1169/com.android.bluetooth I/bt_btif_a2dp_sink: btif_a2dp_sink_audio_rx_flush_req
2020-10-13 17:45:27.951 616-1169/com.android.bluetooth D/bt_btif_avrcp_audio_track: BtifAvrcpAudioTrackPause handle is null.
2020-10-13 17:45:27.951 616-1169/com.android.bluetooth I/bt_btif_a2dp_sink: btif_a2dp_sink_clear_track_event_req
2020-10-13 17:45:27.951 616-1240/com.android.bluetooth I/bt_btif_a2dp_sink: btif_a2dp_sink_clear_track_event
2020-10-13 17:45:27.951 616-1169/com.android.bluetooth I/bt_stack: [INFO:btif_av.cc(598)] bool BtifAvSink::SetActivePeer(const RawAddress &, std::promise<void>): peer: 00:00:00:00:00:00
2020-10-13 17:45:27.951 616-1240/com.android.bluetooth D/bt_btif_avrcp_audio_track: BtifAvrcpAudioTrackStop handle is null.
2020-10-13 17:45:27.951 616-1240/com.android.bluetooth D/bt_btif_avrcp_audio_track: BtifAvrcpAudioTrackDelete handle is null.
2020-10-13 17:45:27.951 616-1169/com.android.bluetooth I/bt_btif_a2dp_sink: btif_a2dp_sink_end_session: peer_address=50:1a:a5:bf:5a:1c
2020-10-13 17:45:27.952 616-1169/com.android.bluetooth I/bt_btif_a2dp_sink: btif_a2dp_sink_shutdown
2020-10-13 17:45:27.952 616-1240/com.android.bluetooth I/bt_btif_a2dp_sink: btif_a2dp_sink_end_session_delayed
2020-10-13 17:45:27.952 616-1169/com.android.bluetooth I/btif_av: DeleteIdlePeers: Deleting idle peer: 50:1a:a5:bf:5a:1c bta_handle=0x41
2020-10-13 17:45:27.952 616-1240/com.android.bluetooth I/bt_btif_a2dp_sink: btif_a2dp_sink_shutdown_delayed

Please provide a more detailed logcat

2020-10-13 17:45:25.880 616-616/com.android.bluetooth D/AdapterProperties: PROFILE_CONNECTION_STATE_CHANGE: profile=11, device=50:1A:A5:BF:5A:1C, 1 -> 0
2020-10-13 17:45:25.881 636-932/com.android.systemui I/LocalBluetoothProfileManager: Failed to connect A2DPSink device
2020-10-13 17:45:25.881 636-932/com.android.systemui D/CachedBluetoothDevice: onProfileStateChanged: profile A2DPSink, device=50:1A:A5:BF:5A:1C, newProfileState 0
2020-10-13 17:45:25.882 616-616/com.android.bluetooth D/AdapterProperties: ADAPTER_CONNECTION_STATE_CHANGE: 50:1A:A5:BF:5A:1C: 1 -> 0
2020-10-13 17:45:25.883 781-781/com.android.settings I/LocalBluetoothProfileManager: Failed to connect A2DPSink device
2020-10-13 17:45:25.883 781-781/com.android.settings D/CachedBluetoothDevice: onProfileStateChanged: profile A2DPSink, device=50:1A:A5:BF:5A:1C, newProfileState 0

I’m more inclined to say your phone can’t connect.

I’ll try again and take the logcat.

I have re-filed the log.
The situation is that the Headset device has been deleted once, paired again, and then connected and disconnected repeatedly.
Just to be sure, I launched the recording app and ran it.

I couldn’t find any useful information, I tested phones from all three brands that could play music properly. What device do you use.

Is it a Headset Profile?

Sure, Headset Profile

I’m connecting a generic Headset, not a mobile phone.
I’m trying it out by connecting my Jabra Talk v2.

https://www.jabra.com/bluetooth-headsets/jabra-talk2

Note that when I paired the handset, I could hear the sound on the phone with the RockPi4C.
(Banana20 is test phone’s name)

On the other hand, with Jabra’s Headset, when paired, the profile shows nothing like the one below and is immediately disconnected.