Platforms to show: All Mac Windows Linux Cross-Platform
Back to WindowsBluetoothLEDeviceMBS class.
WindowsBluetoothLEDeviceMBS.FromBluetoothAddress(bluetoothAddress as UInt64) as WindowsBluetoothLEDeviceMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Bluetooth | MBS WinFrameworks Plugin | 23.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Synchronous version, which may blocks the application until the function finished.
See also:
Some examples using this method:
WindowsBluetoothLEDeviceMBS.FromBluetoothAddress(bluetoothAddress as UInt64, BluetoothAddressType as Integer) as WindowsBluetoothLEDeviceMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Bluetooth | MBS WinFrameworks Plugin | 23.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Synchronous version, which may blocks the application until the function finished.
See also:
WindowsBluetoothLEDeviceMBS.FromBluetoothAddressAsync(bluetoothAddress as UInt64, BluetoothAddressType as Integer, delegateHandler as DeviceFromBluetoothAddressAsyncCompletedMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Bluetooth | MBS WinFrameworks Plugin | 22.2 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
bluetoothAddress: A BluetoothAddress value containing the 64-bit address of the peer Bluetooth LE device.
bluetoothAddressType: A BluetoothAddressType value containing the address type of the peer Bluetooth LE device.
The returned BluetoothLEDevice is set to nil if FromBluetoothAddressAsync can't find the device identified by bluetoothAddress. Specifically, if the device isn't paired and it isn't found in the system cache. You can populate the cache for a non-paired device using either the LE advertisement watcher APIs (BluetoothLEAdvertisementWatcher) or the device enumeration APIs (GetDeviceSelectorFromPairingState) to scan for the Bluetooth devices before the FromBluetoothAddressAsync can be successfully used.
Calls delegate later when we have a result.
Creating a BluetoothLEDevice object by calling this method alone doesn't (necessarily) initiate a connection. To initiate a connection, set GattSession.MaintainConnection to true, or call an uncached service discovery method on BluetoothLEDevice, or perform a read/write operation against the device.
If GattSession.MaintainConnection is set to true, then the system waits indefinitely for a connection, and it will connect when the device is available. There's nothing for your application to wait on, since GattSession.MaintainConnection is a property.
For service discovery and read/write operations in GATT, the system waits a finite but variable time. Anything from instantaneous to a matter of minutes. Factors include the traffic on the stack, and how queued up the request is. If there are no other pending request, and the remote device is unreachable, then the system will wait for 7 seconds before it times out. If there are other pending requests, then each of the requests in the queue can take 7 seconds to process, so the further yours is toward the back of the queue, the longer you'll wait.
You can't cancel the connection process.
See also:
Some examples using this method:
WindowsBluetoothLEDeviceMBS.FromBluetoothAddressAsync(bluetoothAddress as UInt64, delegateHandler as DeviceFromBluetoothAddressAsyncCompletedMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Bluetooth | MBS WinFrameworks Plugin | 22.2 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
bluetoothAddress: A BluetoothAddress value containing the 64-bit address of the peer Bluetooth LE device.
The returned BluetoothLEDevice is set to nil if FromBluetoothAddressAsync can't find the device identified by bluetoothAddress. Specifically, if the device isn't paired and it isn't found in the system cache. You can populate the cache for a non-paired device using either the LE advertisement watcher APIs (BluetoothLEAdvertisementWatcher) or the device enumeration APIs (GetDeviceSelectorFromPairingState) to scan for the Bluetooth devices before the FromBluetoothAddressAsync can be successfully used.
Calls delegate later when we have a result.
Creating a BluetoothLEDevice object by calling this method alone doesn't (necessarily) initiate a connection. To initiate a connection, set GattSession.MaintainConnection to true, or call an uncached service discovery method on BluetoothLEDevice, or perform a read/write operation against the device.
If GattSession.MaintainConnection is set to true, then the system waits indefinitely for a connection, and it will connect when the device is available. There's nothing for your application to wait on, since GattSession.MaintainConnection is a property.
For service discovery and read/write operations in GATT, the system waits a finite but variable time. Anything from instantaneous to a matter of minutes. Factors include the traffic on the stack, and how queued up the request is. If there are no other pending request, and the remote device is unreachable, then the system will wait for 7 seconds before it times out. If there are other pending requests, then each of the requests in the queue can take 7 seconds to process, so the further yours is toward the back of the queue, the longer you'll wait.
You can't cancel the connection process.
See also:
WindowsBluetoothLEDeviceMBS.FromId(Id as String) as WindowsBluetoothLEDeviceMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Bluetooth | MBS WinFrameworks Plugin | 23.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Id: The Id of the Bluetooth LE device.
Synchronous version, which may blocks the application until the function finished.
WindowsBluetoothLEDeviceMBS.FromIdAsync(Id as String, delegateHandler as DeviceFromIdAsyncCompletedMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Bluetooth | MBS WinFrameworks Plugin | 22.2 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Id: The Id of the Bluetooth LE device.
Calls delegate later when we have a result.
WindowsBluetoothLEDeviceMBS.GetDeviceSelector as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Bluetooth | MBS WinFrameworks Plugin | 22.2 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
This string is passed to the FindAllAsync or CreateWatcher method in order to get a list of Bluetooth LE devices.
WindowsBluetoothLEDeviceMBS.GetDeviceSelectorFromAppearance(Appearance as WindowsBluetoothLEAppearanceMBS) as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Bluetooth | MBS WinFrameworks Plugin | 22.2 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
The AQS string is passed into the CreateWatcher method to return a collection of DeviceInformation objects with the specified appearance.
The items on this page are in the following plugins: MBS WinFrameworks Plugin.