⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dbus-api.txt

📁 Linux的蓝牙操作工具。配合bluez-lib使用
💻 TXT
📖 第 1 页 / 共 3 页
字号:
			Returns a list of available minor classes for the			currently used major class. At the moment this should			only return a list of minor classes if the major			class is set to "computer".			If the major class is not "computer" an error should			be returned.			Possible errors: org.bluez.Error.InvalidArguments					 org.bluez.Error.UnsupportedMajorClass		string GetMinorClass()			Returns the current minor class value for this			system where the default major class is "computer".			If the major class is not "computer" an error should			be returned.			Valid values: "uncategorized", "desktop", "server",			              "laptop", "handheld", "palm", "wearable"			The default value is "uncategorized".			Possible errors:org.bluez.Error.InvalidArguments					org.bluez.Error.UnsupportedMajorClass		void SetMinorClass(string minor)			Sets the local minor class and on success it sends			a MinorClassChanged signal.			If the major class is not "computer" an error should			be returned.			Possible errors: org.bluez.Error.NotReady					 org.bluez.Error.InvalidArguments					 org.bluez.Error.NoSuchAdapter					 org.bluez.Error.Failed					 org.bluez.Error.UnsupportedMajorClass		array{string} GetServiceClasses()			Returns the current set of service classes.			In the case no service classes are set (when no			service has been registered) an empty list should			be returned.			Valid values: "positioning", "networking", "rendering",			              "capturing", "object transfer", "audio",			              "telephony", "information"			Possible errors: org.bluez.Error.NotReady					 org.bluez.Error.NoSuchAdapter					 org.bluez.Error.Failed		string GetName()			Returns the local adapter name (friendly name) in UTF-8.			Possible errors: org.bluez.Error.Failed		void SetName(string name)			Sets the local adapter name. If EIR is supported by			the local hardware this modifies also the extended			response data value.			Possible errors: org.bluez.Error.InvalidArguments					 org.bluez.Error.Failed			Questions: What to do (in case of EIR) if one			           low-level API call fails.		dict GetRemoteInfo(string address)			Returns the properties for a remote device.		string GetRemoteVersion(string address)			Get the version info for a remote device. This request			returns always this information based on its cached			data. The base for this string is the LMP version			value and the features for EDR support.			Not available can be received if the remote device was			not contacted(connected) previously. Remote data is			automatically retrieved in the first connection.			Example: "Bluetooth 2.0 + EDR"			Possible errors: org.bluez.Error.InvalidArguments					 org.bluez.Error.NotAvailable		string GetRemoteRevision(string address)			Get the revision of the Bluetooth chip. This is a			vendor specific value and in most cases it represents			the firmware version. This derives only from the LMP			subversion value.			Example: "HCI 19.2"			Possible errors: org.bluez.Error.InvalidArguments					 org.bluez.Error.NotAvailable		string GetRemoteManufacturer(string address)			Get the manufacturer of the chip for a remote device.			Example: "Nokia Mobile Phones"			Possible errors: org.bluez.Error.InvalidArguments					 org.bluez.Error.NotAvailable		string GetRemoteCompany(string address)			Get the company name from the OUI database of the			Bluetooth device address. This function will need a			valid and up-to-date oui.txt from the IEEE. This value			will be different from the manufacturer string in the			most cases.			Example: "Microsoft Corporation"			Possible errors: org.bluez.Error.InvalidArguments					 org.bluez.Error.NotAvailable		string GetRemoteMajorClass(string address)			Get the major device class of the specified device.			Example: "computer"			Possible errors: org.bluez.Error.InvalidArguments					 org.bluez.Error.NotAvailable		string GetRemoteMinorClass(string address)			Get the minor device class of the specified device.			Example: "laptop"			Possible errors: org.bluez.Error.InvalidArguments					 org.bluez.Error.NotAvailable		array{string} GetRemoteServiceClasses(string address)			Get the service classes of the specified device.			Example: ["networking", "object transfer"]			Possible errors: org.bluez.Error.InvalidArguments					 org.bluez.Error.NotAvailable		uint32 GetRemoteClass(string address)			Get the remote major, minor, and service classes			encoded as 32 bit integer.			Possible errors: org.bluez.Error.InvalidArguments					 org.bluez.Error.NotAvailable		array{byte} GetRemoteFeatures(string address)			Get the remote features encoded as bit mask.			Possible errors: org.bluez.Error.InvalidArguments					 org.bluez.Error.NotAvailable		string GetRemoteName(string address)			Get the remote device's name. This request returns always			a cached name. The service daemon is responsible for			updating the cache.			NotAvailable error is returned if the name is not in			the cache. But if there is a discovery running, then			this function will return RequestDeferred.  In this			case the service daemon will queue the request and			it will try to resolve the name at the next possible			opportunity. On success a RemoteNameUpdated signal will			be send and if a failure happens it will be indicated by			a RemoteNameFailed signal.			If this is an empty string, the UI might want to			display the BD_ADDR instead.			Example: "00:11:22:33:44:55", "Nokia 770"			Possible errors: org.bluez.Error.InvalidArguments					 org.bluez.Error.NotAvailable					 org.bluez.Error.NotReady					 org.bluez.Error.RequestDeferred		string GetRemoteAlias(string address)			Returns alias name for remote device. If this is			an empty string value, the UI should show the			remote name instead.			An alias should supersede the remote name.			Possible errors: org.bluez.Error.InvalidArguments			                 org.bluez.Error.NotAvailable		void SetRemoteAlias(string address, string alias)			Sets alias name for remote device. If alias name is			empty, then no alias is set.			On success the SetRemoteAlias method will produce a			RemoteAliasChanged signal which applications can use			to update their current display of the remote device			name.			Possible errors: org.bluez.Error.Failed					 org.bluez.Error.InvalidArguments		void ClearRemoteAlias(string address)			Resets alias name for remote device. If there is no			alias set for the device this method will silently			succeed, but no RemoteAliasCleared signal has to be			sent in this case.			On success the ClearRemoteAlias method will produce			a RemoteAliasCleared signal.			Possible errors: org.bluez.Error.Failed					 org.bluez.Error.InvalidArguments		string LastSeen(string address)			Returns the date and time when the adapter has been			seen by a discover procedure.			Example: "2006-02-08 12:00:00 GMT"			Possible errors: org.bluez.Error.InvalidArguments					 org.bluez.Error.NotAvailable			Question: Can we find a better name?		string LastUsed(string address)			Returns the date and time of the last time when the			adapter has been connected.			Example: "2006-02-08 12:00:00 GMT"			Possible errors: org.bluez.Error.InvalidArguments					 org.bluez.Error.NotAvailable			Question: Can we find a better name?		void DisconnectRemoteDevice(string address)			This method disconnects a specific remote device by			terminating the low-level ACL connection. The use of			this method should be restricted to administrator			use.			A RemoteDeviceDisconnectRequested signal will be			sent and the actual disconnection will only happen 2			seconds later.  This enables upper-level applications			to terminate their connections gracefully before the			ACL connection is terminated.			Possible errors: org.bluez.Error.NotReady					 org.bluez.Error.Failed					 org.bluez.Error.NoSuchAdapter					 org.bluez.Error.InvalidArguments					 org.bluez.Error.NotConnected					 org.bluez.Error.InProgress		void CreateBonding(string address)			This method creates a bonding with a remote device.			If a link key for this adapter already exists, this			procedure should fail instead of trying to create a			new pairing.			If no connection to the remote device exists, a			low-level ACL connection must be created.			This function will block and the calling application			should take care of setting are higher timeout. This			might be needed in case of a page timeout from the			low-level HCI commands.			In case of success it will send a BondingCreated			signal.			Possible errors: org.bluez.Error.NotReady					 org.bluez.Error.Failed					 org.bluez.Error.InvalidArguments					 org.bluez.Error.AlreadyExists					 org.bluez.Error.InProgress					 org.bluez.Error.NoSuchAdapter					 org.bluez.Error.ConnectionAttemptFailed					 org.bluez.Error.AuthenticationFailed					 org.bluez.Error.AuthenticationTimeout					 org.bluez.Error.AuthenticationRejected					 org.bluez.Error.AuthenticationCanceled		void CancelBondingProcess(string address)			This method will cancel the CreateBonding process.			The CreateBonding method will return			AuthenticationCanceled to signal that an attempt to			create a bonding has been canceled.			Possible errors: org.bluez.Error.NotReady					 org.bluez.Error.Failed					 org.bluez.Error.InvalidArguments					 org.bluez.Error.NotInProgress					 org.bluez.Error.NotAuthorized		void RemoveBonding(string address)			This method removes the bonding with a remote device.			For security reasons this includes removing the actual			link key and also disconnecting any open connections			for the remote device.			If the link key was stored on the Bluetooth chip, it			must be removed from there, too.			After deleting the link key this method will send a			BondingRemoved signal.			Possible errors: org.bluez.Error.NotReady					 org.bluez.Error.Failed					 org.bluez.Error.InvalidArguments					 org.bluez.Error.NoSuchAdapter					 org.bluez.Error.DoesNotExist		boolean HasBonding(string address)			Returns true if the remote device is bonded and false			if no link key is available.			Possible errors: org.bluez.Error.InvalidArguments		array{string} ListBondings()			List device addresses of currently bonded adapter.			Possible errors: none		uint8 GetPinCodeLength(string address)			Returns the PIN code length that was used in the			pairing process.			Possible errors: org.bluez.Error.InvalidArguments			                 org.bluez.Error.DoesNotExist		uint8 GetEncryptionKeySize(string address)			Returns the currently used encryption key size.			This method will fail if no connection to the address			has been established.			Possible errors: org.bluez.Error.InvalidArguments			                 org.bluez.Error.Failed		void SetTrusted(string address)			Marks the remote device as trusted. Authorization			request will automatically succeed.			Possible errors: org.bluez.Error.InvalidArguments			                 org.bluez.Error.AlreadyExists		boolean IsTrusted(string address)			Returns true if the user is trusted or false otherwise.			The address parameter must match one of the remote			devices of the service.			Possible errors: org.bluez.Error.InvalidArguments		void RemoveTrust(string address)			Marks the remote device as not trusted.			Possible errors: org.bluez.Error.InvalidArguments					 org.bluez.Error.DoesNotExist		array{string} ListTrusts()			Returns a list of remote devices that are trusted.		void DiscoverDevices()			This method starts the device discovery procedure. This			includes an inquiry procedure and remote device name			resolving.			On start up this process will generate a DiscoveryStarted			signal and then return RemoteDeviceFound and also			RemoteNameUpdated signals. If the procedure has been			finished an DiscoveryCompleted signal will be sent.			Possible errors: org.bluez.Error.NotReady					 org.bluez.Error.Failed					 org.bluez.Error.InProgress					 org.bluez.Error.NoSuchAdapter		void DiscoverDevicesWithoutNameResolving()			This method starts the device discovery procedure. This			includes an inquiry and an optional remote device name			resolving. The remote names can be retrieved with			GetRemoteName and in the case a name doesn't exist it			will be queued for later resolving and GetRemoteName			will return an error.			While this procedure is running every found device			will be returned with RemoteDeviceFound. While			DiscoverDevices() automatically resolves unknown			devices names and sends RemoteNameUpdated in this			case it will only happen if GetRemoteName has been			called and no previously stored name is available.			Possible errors: org.bluez.Error.NotReady					 org.bluez.Error.Failed					 org.bluez.Error.InProgress					 org.bluez.Error.NoSuchAdapter		void CancelDiscovery()			This method will cancel any previous DiscoverDevices			or DiscoverDevicesWithoutNameResolving actions.			Possible errors: org.bluez.Error.NotReady					 org.bluez.Error.Failed					 org.bluez.Error.NotAuthorized					 org.bluez.Error.NoSuchAdapter		void StartPeriodicDiscovery()			This method starts a periodic discovery.			Possible errors: org.bluez.error.NotReady					 org.bluez.Error.Failed					 org.bluez.Error.InProgress					 org.bluez.Error.NoSuchAdapter		void StopPeriodicDiscovery()			This method stops a periodic discovery. If the			adapter is not in the periodic inquiry mode an			error(not authorized) is returned. Everyone can			request exit from this mode, it is not restricted			to start requestor.			Possible errors: org.bluez.Error.NotReady					 org.bluez.Error.Failed					 org.bluez.Error.NotAuthorized					 org.bluez.Error.NoSuchAdapter		boolean IsPeriodicDiscovery()			Returns true if the periodic inquiry is active and			false if it is switched off.			Possible errors: none		void SetPeriodicDiscoveryNameResolving(boolean resolve_names)			Enable or disable automatic remote name resolving for			periodic discovery.			Possible errors: org.bluez.Error.InvalidArguments		boolean GetPeriodicDiscoveryNameResolving()			Check if automatic remote name resolving is enabled or not			for periodic discovery.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -