Quote:
Originally Posted by rosshadden
No, Richard. This article, like most I have found, assumes that the headphones show up as an audio sink to begin with. Mine connects perfectly fine through bluetoothctl, but it never shows up as an audio output device. I tried connecting to it with Blueman based on the article and it didn't work when I tried to connect to it as an Audio Sink. The error it gives is a general one with no helpful details within, even in the stacktrace.
|
Hmm. I assume that you've already looked at
https://www.freedesktop.org/wiki/Sof...User/Bluetooth as well.
Does blueman show them as headphones? You can run this command...
Code:
dbus-send --system --dest=org.bluez --type=method_call --print-reply /org/bluez/hci0 org.freedesktop.DBus.Introspectable.Introspect
...which will return a horrible blob that looks similar to...
Code:
method return time=1551413059.480506 sender=:1.0 -> destination=:1.192 serial=290 reply_serial=2
string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node><interface name="org.freedesktop.DBus.Introspectable"><method name="Introspect"><arg name="xml" type="s" direction="out"/>
</method></interface><interface name="org.bluez.Adapter1"><method name="StartDiscovery"></method><method name="SetDiscoveryFilter"><arg name="properties" type="a{sv}" direction="in"/>
</method><method name="StopDiscovery"></method><method name="RemoveDevice"><arg name="device" type="o" direction="in"/>
</method><method name="GetDiscoveryFilters"><arg name="filters" type="as" direction="out"/>
</method><property name="Address" type="s" access="read"></property><property name="Name" type="s" access="read"></property><property name="Alias" type="s" access="readwrite"></property><property name="Class" type="u" access="read"></property><property name="Powered" type="b" access="readwrite"></property><property name="Discoverable" type="b" access="readwrite"></property><property name="DiscoverableTimeout" type="u" access="readwrite"></property><property name="Pairable" type="b" access="readwrite"></property><property name="PairableTimeout" type="u" access="readwrite"></property><property name="Discovering" type="b" access="read"></property><property name="UUIDs" type="as" access="read"></property><property name="Modalias" type="s" access="read"></property></interface><interface name="org.freedesktop.DBus.Properties"><method name="Get"><arg name="interface" type="s" direction="in"/>
<arg name="name" type="s" direction="in"/>
<arg name="value" type="v" direction="out"/>
</method><method name="Set"><arg name="interface" type="s" direction="in"/>
<arg name="name" type="s" direction="in"/>
<arg name="value" type="v" direction="in"/>
</method><method name="GetAll"><arg name="interface" type="s" direction="in"/>
<arg name="properties" type="a{sv}" direction="out"/>
</method><signal name="PropertiesChanged"><arg name="interface" type="s"/>
<arg name="changed_properties" type="a{sv}"/>
<arg name="invalidated_properties" type="as"/>
</signal>
</interface><interface name="org.bluez.GattManager1"><method name="RegisterApplication"><arg name="application" type="o" direction="in"/>
<arg name="options" type="a{sv}" direction="in"/>
</method><method name="UnregisterApplication"><arg name="application" type="o" direction="in"/>
</method></interface><interface name="org.bluez.Media1"><method name="RegisterEndpoint"><arg name="endpoint" type="o" direction="in"/>
<arg name="properties" type="a{sv}" direction="in"/>
</method><method name="UnregisterEndpoint"><arg name="endpoint" type="o" direction="in"/>
</method><method name="RegisterPlayer"><arg name="player" type="o" direction="in"/>
<arg name="properties" type="a{sv}" direction="in"/>
</method><method name="UnregisterPlayer"><arg name="player" type="o" direction="in"/>
</method></interface><interface name="org.bluez.NetworkServer1"><method name="Register"><arg name="uuid" type="s" direction="in"/>
<arg name="bridge" type="s" direction="in"/>
</method><method name="Unregister"><arg name="uuid" type="s" direction="in"/>
</method></interface><node name="dev_00_0D_44_D1_7D_CE"/><node name="dev_24_C6_96_0C_11_D2"/><node name="dev_48_C1_AC_D5_CE_61"/><node name="dev_75_07_92_4F_63_00"/><node name="dev_A0_9E_1A_32_92_59"/></node>
(You've got different stuff than I, so the nodes will be different.)
One of those nodes is your headset. You can ask for details about each one. I'll use the first node of my list to show you...
Code:
dbus-send --system --dest=org.bluez --type=method_call --print-reply /org/bluez/hci0/dev_00_0D_44_D1_7D_CE org.freedesktop.DBus.Properties.GetAll string:org.bluez.Device1
...which returned for me...
Code:
method return time=1551413206.469935 sender=:1.0 -> destination=:1.193 serial=291 reply_serial=2
array [
dict entry(
string "Address"
variant string "00:0D:44:D1:7D:CE"
)
dict entry(
string "Name"
variant string "H800 Logitech Headset"
)
dict entry(
string "Alias"
variant string "H800 Logitech Headset"
)
dict entry(
string "Class"
variant uint32 2360324
)
dict entry(
string "Icon"
variant string "audio-card"
)
dict entry(
string "Paired"
variant boolean true
)
dict entry(
string "Trusted"
variant boolean false
)
dict entry(
string "Blocked"
variant boolean false
)
dict entry(
string "LegacyPairing"
variant boolean false
)
dict entry(
string "Connected"
variant boolean false
)
dict entry(
string "UUIDs"
variant array [
string "0000110b-0000-1000-8000-00805f9b34fb"
string "0000110c-0000-1000-8000-00805f9b34fb"
string "0000110d-0000-1000-8000-00805f9b34fb"
string "0000110e-0000-1000-8000-00805f9b34fb"
string "0000111e-0000-1000-8000-00805f9b34fb"
]
)
dict entry(
string "Adapter"
variant object path "/org/bluez/hci0"
)
dict entry(
string "ServicesResolved"
variant boolean false
)
]
The UUIDs array define what the device is capable of doing. You can find a list of them at
https://github.com/pauloborges/bluez...er/lib/uuid.h; my device is a thingy that can be any of: A2DP_SINK, AVRCP_TARGET, ADVANCED_AUDIO, AVRCP_REMOTE, or HFP_HS. I have a cheap-ass bluetooth headset with the same list of UUIDs that works as well.
Bluetoothd saves information about what it discovered about a device in
/var/lib/bluetooth/<address_of_interface>/<address_of_device>/info as well.