org.bluez...iaEndpoint(5)
π NAME π
okay so bestie, this is the whole rundown on org.bluez.MediaEndpoint β it's the BlueZ D-Bus MediaEndpoint API documentation, and yes it's a lot but we're gonna get through it together π«Ά (also hi, this page is org.bluez...iaEndpoint(5), the MediaEndpoint one β don't @ me about the truncated name, that's just how the man page shows up, iykyk π
)
β¨ INTERFACE β¨
okay so this interface is giving very much "here's who you are and where you live" energy. Three things, note them down π
- Service β unique name (Server role)
org.bluez(Client role) - Interface β
org.bluez.MediaEndpoint1 - Object path β freely definable (Server role)
[variable prefix]/{hci0,hci1,...}/dev_{BDADDR}/sep#(Client role) - Used by β
bluetoothctl-endpoint(1)
π METHODS π
these are the actual mood of the page, so like, pay attention bestie π
πΈ void SetConfiguration(object transport, dict properties)
Sets configuration for the transport. Like, that's the whole vibe. β¨
object transportβ Configured transport object.dict propertiesβ Configuredorg.bluez.MediaTransport(5)properties.
For client role, transport must be set with a server endpoint object which will be configured, and the properties must contain the following properties:
array{byte} Capabilities[Mandatory] β See Capabilities property.array{byte} Metadata[ISO only] β See Metadata property.dict QoS[ISO only] β Seeorg.bluez.MediaTransport(5)QoS property.
bestie. there are SO many possible errors for A2DP endpoints. buckle up, no cap. π (all of them, exactly as they are, because I do not skip details ever)
Possible errors for A2DP endpoints:
org.bluez.Error.A2DP.InvalidCodecTypeorg.bluez.Error.A2DP.NotSupportedCodecTypeorg.bluez.Error.A2DP.InvalidSamplingFrequencyorg.bluez.Error.A2DP.NotSupportedSamplingFrequencyorg.bluez.Error.A2DP.InvalidChannelModeorg.bluez.Error.A2DP.NotSupportedChannelModeorg.bluez.Error.A2DP.InvalidSubbandsorg.bluez.Error.A2DP.NotSupportedSubbandsorg.bluez.Error.A2DP.InvalidAllocationMethodorg.bluez.Error.A2DP.NotSupportedAllocationMethodorg.bluez.Error.A2DP.InvalidMinimumBitpoolValueorg.bluez.Error.A2DP.NotSupportedMinimumBitpoolValueorg.bluez.Error.A2DP.InvalidMaximumBitpoolValueorg.bluez.Error.A2DP.NotSupportedMaximumBitpoolValueorg.bluez.Error.A2DP.InvalidLayerorg.bluez.Error.A2DP.NotSupportedLayerorg.bluez.Error.A2DP.NotSupportedCRCorg.bluez.Error.A2DP.NotSupportedMPForg.bluez.Error.A2DP.NotSupportedVBRorg.bluez.Error.A2DP.InvalidBitRateorg.bluez.Error.A2DP.NotSupportedBitRateorg.bluez.Error.A2DP.InvalidObjectTypeorg.bluez.Error.A2DP.NotSupportedObjectTypeorg.bluez.Error.A2DP.InvalidChannelsorg.bluez.Error.A2DP.NotSupportedChannelsorg.bluez.Error.A2DP.InvalidVersionorg.bluez.Error.A2DP.NotSupportedVersionorg.bluez.Error.A2DP.NotSupportedMaximumSULorg.bluez.Error.A2DP.InvalidBlockLengthorg.bluez.Error.A2DP.InvalidCPTypeorg.bluez.Error.A2DP.InvalidCPFormatorg.bluez.Error.A2DP.InvalidCodecParameterorg.bluez.Error.A2DP.NotSupportedCodecParameterorg.bluez.Error.A2DP.InvalidDRCorg.bluez.Error.A2DP.NotSupportedDRC
Examples:
bluetoothctl
> endpoint.config <endpoint> <local endpoint> [preset]
π array{byte} SelectConfiguration(array{byte} capabilities)
Picks the preferable configuration from the supported capabilities. It's giving choose-your-own-adventure but for codecs π¦
Returns a configuration which can be used to setup a transport β see org.bluez.MediaTransport(5) for possible values.
Note: There is no need to cache the selected configuration since on success the configuration is send back as parameter of SetConfiguration. bestie do NOT waste your time caching it, I'm begging π
π dict SelectProperties(dict capabilities)
Select BAP unicast configuration from the supported capabilities:
objectEndpointarray{byte}Capabilitiesarray{byte}Metadatauint32Locationsuint32_tChannelAllocationdictQoSbyteFramingbytePHYuint16MaximumLatencyuint32MinimumDelayuint32MaximumDelayuint32PreferredMinimumDelayuint32PreferredMaximumDelay
See MediaEndpoint Properties for their possible values.
Returns a configuration which can be used to setup a transport:
array{byte}Capabilitiesarray{byte}Metadata [optional]dictQoS
See SetConfiguration for their possible values.
Note: There is no need to cache the selected properties since on success the configuration is send back as parameter of SetConfiguration. (again!! don't cache!! I said what I said π
)
π void ClearConfiguration(object transport)
Clears transport configuration. Very "we're so over" energy.
Server role: [ISO only]
Close the stream associated with the given transport. If the path given is the path of this endpoint, all its streams are closed. (like, ALL of them, bestie β it's not subtle π)
π¦ void Reconfigure(dict properties)
[ISO only]
Reconfigures a BAP unicast endpoint. This closes all existing streams of the endpoint, and restarts the configuration selection flow which e.g. triggers calls to SelectProperties allowing the sound server to modify the configuration. It's giving main character restart arc β¨
The following arguments are taken in properties:
boolean Defer[optional] β IfTrue, mark endpoint for reconfiguration, but postpone it until a non-deferredReconfigure()operation is made on an endpoint of the same device. This is necessary to use when reconfiguring source and sink streams with the intention that they be combined into the same CIG, possibly forming bidirectional CIS. (iykyk π₯)
β void Release()
This method gets called when bluetoothd(8) unregisters the endpoint.
An endpoint can use it to do cleanup tasks. There is no need to unregister the endpoint, because when this method gets called it has already been unregistered. so like, don't do the work twice bestie, it's already done π«Ά
π¦ MEDIAENDPOINT PROPERTIES π¦
the properties section, aka the accessories of this interface π
π string UUID [readonly, optional]
UUID of the profile which the endpoint is for.
π byte Codec [readonly, optional]
Assigned number of codec that the endpoint implements.
The values should match the profile specification which is indicated by the UUID.
π uint32_t Vendor [readonly, Optional]
Vendor-specific Company ID, Codec ID tuple that the endpoint implements.
It shall be set to appropriate value when Vendor Specific Codec (0xff) is used.
π array{byte} Capabilities [readonly, optional]
Capabilities blob, it is used as it is so the size and byte order must match. (fr fr, do not touch it, it will not forgive you π)
π array{byte} Metadata [readonly, Optional]
Metadata blob, it is used as it is so the size and byte order must match. (same deal, hands off π«Ά)
π object Device [readonly, optional]
Device object which the endpoint is belongs to.
π bool DelayReporting [readonly, optional]
Indicates if endpoint supports Delay Reporting.
π uint32 Locations [readonly, optional, ISO only, experimental]
Indicates endpoint supported locations.
π uint16 SupportedContext [readonly, optional, ISO only, experimental]
Indicates endpoint supported audio context.
π uint16 Context [readonly, optional, ISO only, experimental]
Indicates endpoint available audio context.
π dict QoS [readonly, optional, ISO only, experimental]
Indicates QoS capabilities.
byte Framingβ Indicates endpoint support framing. Possible Values:0x00β Unframed PDUs supported.0x01β Unframed PDUs not supported.
byte PHYβ Indicates endpoint preferred PHY. Possible values:- bit 0 β LE 1M preferred.
- bit 1 β LE 2M preferred.
- bit 2 β LE Coded preferred.
byte Retransmissionsβ Indicates endpoint preferred number of retransmissions.uint16 MaximumLatencyβ Indicates endpoint maximum latency.uint32 MinimumDelayβ Indicates endpoint minimum presentation delay.uint32 MaximumDelayβ Indicates endpoint maximum presentation delay.uint32 PreferredMinimumDelayβ Indicates endpoint preferred minimum presentation delay.uint32 PreferredMaximumDelayβ Indicates endpoint preferred maximum presentation delay.
π dict SupportedFeatures [readonly, ISO only, experimental]
Dictionary representing supported features for different services. Keys are service UUIDs, values arrays of strings.
Services:
array{string} 00001855-0000-1000-8000-00805f9b34fbβ TMAP Features. Possible items:"cg"β Call Gateway"ct"β Call Terminal"ums"β Unicast Media Sender"umr"β Unicast Media Receiver"bms"β Broadcast Media Sender"bmr"β Broadcast Media Receiver
array{string} 00001858-0000-1000-8000-00805f9b34fbβ GMAP Features. Possible items:"ugg"β Unicast Game Gateway"ugt"β Unicast Game Terminal"bgs"β Broadcast Game Sender"bgr"β Broadcast Game Receiver"ugg-multiplex"β UGG Multiplex feature support"ugg-96kbps-source"β UGG 96 kbps Source feature support"ugg-multisink"β UGG Multisink feature support"ugt-source"β UGT Source feature support"ugt-80kbps-source"β UGT 80 kbps Source feature support"ugt-sink"β UGT Sink feature support"ugt-64kbps-sink"β UGT 64 kbps Sink feature support"ugt-multiplex"β UGT Multiplex feature support"ugt-multisink"β UGT Multisink feature support"ugt-multisource"β UGT Multisource feature support"bgs-96kbps"β BGS 96 kbps feature support"bgr-multisink"β BGR Multisink feature support"bgr-multiplex"β BGR Multiplex feature support
and that's the whole page bestie!! you ate that π β¨ this one's from BlueZ, dated September 2023 β go forth and configure your endpoints, you gorgeous genius ππ¦π
π¦ where this page comes from
- arch rolling: bluez-utils 5.87-2 Β· GPL-2.0-only
- nixpkgs unstable: bluez 5.87
- ubuntu stonking: bluez 5.87-4 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms