BluetoothLEDevice.FromBluetoothAddressAsync Method

Definition

Overloads

FromBluetoothAddressAsync(UInt64)

Returns a BluetoothLEDevice object representing the peer Bluetooth LE device with the given address. See Remarks in the member topic.

FromBluetoothAddressAsync(UInt64, BluetoothAddressType)

Returns a BluetoothLEDevice object representing the peer device with the given address and address type. See Remarks in the member topic.

FromBluetoothAddressAsync(UInt64)

Returns a BluetoothLEDevice object representing the peer Bluetooth LE device with the given address. See Remarks in the member topic.

public:
 static IAsyncOperation<BluetoothLEDevice ^> ^ FromBluetoothAddressAsync(unsigned long long bluetoothAddress);
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<BluetoothLEDevice> FromBluetoothAddressAsync(uint64_t bluetoothAddress);
/// [Windows.Foundation.Metadata.RemoteAsync]
/// [Windows.Foundation.Metadata.Overload("FromBluetoothAddressAsync")]
 static IAsyncOperation<BluetoothLEDevice> FromBluetoothAddressAsync(uint64_t bluetoothAddress);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<BluetoothLEDevice> FromBluetoothAddressAsync(ulong bluetoothAddress);
[Windows.Foundation.Metadata.RemoteAsync]
[Windows.Foundation.Metadata.Overload("FromBluetoothAddressAsync")]
public static IAsyncOperation<BluetoothLEDevice> FromBluetoothAddressAsync(ulong bluetoothAddress);
function fromBluetoothAddressAsync(bluetoothAddress)
Public Shared Function FromBluetoothAddressAsync (bluetoothAddress As ULong) As IAsyncOperation(Of BluetoothLEDevice)

Parameters

bluetoothAddress
UInt64

A BluetoothAddress value containing the 64-bit address of the peer Bluetooth LE device.

Returns

IAsyncOperation<BluetoothLEDevice>

Returns an object representing an asynchronous operation. When that object completes, it contains a BluetoothLEDevice object representing the peer Bluetooth LE device with the given address.

Attributes

Windows 10 requirements

App capabilities
bluetooth

Remarks

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 inclue 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 seven (7) seconds before it times out. If there are other pending requests, then each of the requests in the queue can take seven (7) seconds to process, so the further yours is toward the back of the queue, the longer you'll wait.

Currently, you can't cancel the connection process.

See also

Applies to

FromBluetoothAddressAsync(UInt64, BluetoothAddressType)

Returns a BluetoothLEDevice object representing the peer device with the given address and address type. See Remarks in the member topic.

public:
 static IAsyncOperation<BluetoothLEDevice ^> ^ FromBluetoothAddressAsync(unsigned long long bluetoothAddress, BluetoothAddressType bluetoothAddressType);
/// [Windows.Foundation.Metadata.Overload("FromBluetoothAddressWithBluetoothAddressTypeAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<BluetoothLEDevice> FromBluetoothAddressAsync(uint64_t bluetoothAddress, BluetoothAddressType bluetoothAddressType);
[Windows.Foundation.Metadata.Overload("FromBluetoothAddressWithBluetoothAddressTypeAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<BluetoothLEDevice> FromBluetoothAddressAsync(ulong bluetoothAddress, BluetoothAddressType bluetoothAddressType);
function fromBluetoothAddressAsync(bluetoothAddress, bluetoothAddressType)
Public Shared Function FromBluetoothAddressAsync (bluetoothAddress As ULong, bluetoothAddressType As BluetoothAddressType) As IAsyncOperation(Of BluetoothLEDevice)

Parameters

bluetoothAddress
UInt64

A BluetoothAddress value containing the 64-bit address of the peer Bluetooth LE device.

bluetoothAddressType
BluetoothAddressType

A BluetoothAddressType value containing the address type of the peer Bluetooth LE device.

Returns

IAsyncOperation<BluetoothLEDevice>

Returns an object representing an asynchronous operation. When that object completes, it contains a BluetoothLEDevice object representing the peer device with the given address and address type.

Attributes

Windows 10 requirements

Device family
Windows 10 (introduced in 10.0.10586.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced in v2.0)
App capabilities
bluetooth

Remarks

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 inclue 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 seven (7) seconds before it times out. If there are other pending requests, then each of the requests in the queue can take seven (7) seconds to process, so the further yours is toward the back of the queue, the longer you'll wait.

Currently, you can't cancel the connection process.

See also

Applies to