ORG.BLUEZ.DEVICE(5) | Linux System Administration | ORG.BLUEZ.DEVICE(5) |
NAME¶
org.bluez.Device - BlueZ D-Bus Device API documentation
INTERFACE¶
- Service
- org.bluez
- Interface
- org.bluez.Device1
- Object path
- [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX
Methods¶
void Connect()¶
If at least one profile was connected successfully this method will indicate success.
For dual-mode devices only one bearer is connected at time, the conditions are in the following order:
- 1.
- Connect the disconnected bearer if already connected.
2. Connect first the bonded bearer. If no bearers are bonded or both are skip and check latest seen bearer.
3. Connect last seen bearer, in case the timestamps are the same BR/EDR takes precedence.
Possible errors:
void Disconnect()¶
ACL connection will be terminated even if some profiles were not disconnected properly e.g. due to misbehaving device.
This method can be also used to cancel a preceding Connect call before a reply to it has been received.
For non-trusted devices connected over LE bearer calling this method will disable incoming connections until Connect method is called again.
Possible errors:
void ConnectProfile(string uuid)¶
Possible errors:
void DisconnectProfile(string uuid)¶
There is no connection tracking for a profile, so as long as the profile is registered this will always succeed.
Possible errors:
void Pair()¶
If the application has registered its own agent, then that specific agent will be used. Otherwise it will use the default agent.
Only for applications like a pairing wizard it would make sense to have its own agent. In almost all other cases the default agent will handle this just fine.
In case there is no application agent and also no default agent present, this method will fail.
Possible errors:
void CancelPairing()¶
Possible errors:
Properties¶
string Address [readonly]¶
string AddressType [readonly]¶
Possible values:
- "public"
- Public address
- "random"
- Random address
string Name [readonly, optional]¶
This value is only present for completeness. It is better to always use the Alias property when displaying the devices name.
If the Alias property is unset, it will reflect this value which makes it more convenient.
string Icon [readonly, optional]¶
uint32 Class [readonly, optional]¶
uint16 Appearance [readonly, optional]¶
array{string} UUIDs [readonly, optional]¶
boolean Paired [readonly]¶
boolean Bonded [readonly]¶
boolean Connected [readonly]¶
boolean Trusted [readwrite]¶
boolean Blocked [readwrite]¶
boolean WakeAllowed [readwrite]¶
string Alias [readwrite]¶
In case no alias is set, it will return the remote device name. Setting an empty string as alias will convert it back to the remote device name.
When resetting the alias with an empty string, the property will default back to the remote name.
object Adapter [readonly]¶
boolean LegacyPairing [readonly]¶
Note that this property can exhibit false-positives in the case of Bluetooth 2.1 (or newer) devices that have disabled Extended Inquiry Response support.
string Modalias [readonly, optional]¶
int16 RSSI [readonly, optional]¶
int16 TxPower [readonly, optional]¶
dict ManufacturerData [readonly, optional]¶
dict ServiceData [readonly, optional]¶
bool ServicesResolved [readonly]¶
array{byte} AdvertisingFlags [readonly, experimental]¶
dict AdvertisingData [readonly, experimental]¶
Note: Only types considered safe to be handled by application are exposed.
Possible values:
- <type>
- <byte array>
Example:
array{object, dict} Sets [readonly, experimental]¶
- byte Rank
- Rank of the device in the Set.
October 2023 | BlueZ |