BluetoothLEDevice 클래스

정의

Bluetooth LE 디바이스를 나타냅니다.

코드 예제는 Bluetooth 저에너지 샘플디바이스 열거형 및 페어링 샘플을 참조하세요.

public ref class BluetoothLEDevice sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class BluetoothLEDevice final : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class BluetoothLEDevice : System.IDisposable
Public NotInheritable Class BluetoothLEDevice
Implements IDisposable
상속
Object IInspectable BluetoothLEDevice
특성
구현

Windows 요구 사항

디바이스 패밀리
Windows 10 (10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v1.0에서 도입되었습니다.)
앱 기능
bluetooth

설명

버전 기록

Windows 버전 SDK 버전 추가된 값
1511 10586 모양
1511 10586 BluetoothAddressType
1511 10586 DeviceInformation
1511 10586 FromBluetoothAddressAsync(UInt64,BluetoothAddressType)
1511 10586 GetDeviceSelectorFromAppearance
1511 10586 GetDeviceSelectorFromBluetoothAddress(UInt64)
1511 10586 GetDeviceSelectorFromBluetoothAddress(UInt64,BluetoothAddressType)
1511 10586 GetDeviceSelectorFromConnectionStatus
1511 10586 GetDeviceSelectorFromDeviceName
1511 10586 GetDeviceSelectorFromPairingState
1703 15063 DeviceAccessInformation
1703 15063 GetGattServicesAsync
1703 15063 GetGattServicesAsync(BluetoothCacheMode)
1703 15063 GetGattServicesForUuidAsync(Guid)
1703 15063 GetGattServicesForUuidAsync(Guid,BluetoothCacheMode)
1703 15063 RequestAccessAsync
1709 16299 BluetoothDeviceId
1803 17134 WasSecureConnectionUsedForPairing

속성

Appearance

BluetoothLEAppearance Bluetooth LE 디바이스의 개체를 가져옵니다.

BluetoothAddress

디바이스 주소를 가져옵니다.

BluetoothAddressType

Bluetooth LE 디바이스의 주소 유형을 가져옵니다.

BluetoothDeviceId

Bluetooth 디바이스 ID를 가져옵니다.

ConnectionStatus

디바이스의 연결 상태를 가져옵니다.

DeviceAccessInformation

DeviceAccessInformation을 가져옵니다.

DeviceId

디바이스 ID를 가져옵니다.

DeviceInformation

Bluetooth LE 디바이스에 대한 디바이스 정보를 가져옵니다.

GattServices

디바이스에서 지원하는 GATT 서비스의 읽기 전용 목록을 가져옵니다.

중요

GattServices API는 더 이상 사용되지 않으며 이후 버전의 Windows에서는 사용할 수 없습니다. 대신 GetGattServicesAsync를 사용합니다.

Name

Bluetooth LE 디바이스의 이름을 가져옵니다.

WasSecureConnectionUsedForPairing

보안 연결을 사용하여 BluetoothLEDevice가 페어링되었는지 여부를 나타내는 부울을 가져옵니다.

메서드

Close()

이 Bluetooth LE 디바이스를 닫습니다. 연결이 있는 유일한 앱인 경우 디바이스에 대한 연결을 닫을 수 있습니다.

FromBluetoothAddressAsync(UInt64)

지정된 주소가 있는 BluetoothLEDevice 피어 Bluetooth LE 디바이스를 나타내는 개체를 반환합니다. 설명(이 멤버 항목에서)을 참조하세요.

FromBluetoothAddressAsync(UInt64, BluetoothAddressType)

BluetoothLEDevice 지정된 주소 및 주소 유형이 있는 피어 디바이스를 나타내는 개체를 반환합니다. 설명(이 멤버 항목에서)을 참조하세요.

FromIdAsync(String)

BluetoothLEDevice 지정된 ID에 대한 개체를 반환합니다. 멤버 항목의 비고 를 참조하세요.

GetConnectionParameters()

원격 디바이스에 대한 연결 매개 변수를 검색합니다. 여러 앱 또는 다른 시스템 시나리오에서도 이러한 매개 변수를 요청하는 경우 시스템은 시스템 우선 순위에 따라 호환되는 매개 변수를 자동으로 결합합니다.

참고

디바이스가 연결되지 않은 경우 연결 매개 변수가 잘못되었습니다(모두 0).

GetConnectionPhy()

Bluetooth LE 물리적 계층(PHY)에 대한 정보를 검색합니다.

참고

디바이스가 연결되지 않은 경우 연결 PHY가 잘못되었습니다(모두 false).

GetDeviceSelector()

모든 Bluetooth LE(저에너지) 디바이스를 식별하기 위한 AQS(고급 쿼리 구문) 문자열을 가져옵니다. 이 문자열은 Bluetooth LE 디바이스 목록을 가져오기 위해 FindAllAsync 또는 CreateWatcher 메서드에 전달됩니다.

GetDeviceSelectorFromAppearance(BluetoothLEAppearance)

개체에서 AQS(고급 쿼리 구문) 필터 문자열을 BluetoothLEAppearance 만듭니다. AQS 문자열은 지정된 모양으로 CreateWatcher 개체 컬렉션을 DeviceInformation 반환하기 위해 메서드에 전달됩니다.

GetDeviceSelectorFromBluetoothAddress(UInt64)

Bluetooth LE 디바이스를 나타내는 64비트 주소에서 AQS(고급 쿼리 구문) 필터 문자열을 만듭니다. AQS 문자열은 개체 컬렉션을 DeviceInformation 반환하기 위해 메서드에 CreateWatcher 전달됩니다.

GetDeviceSelectorFromBluetoothAddress(UInt64, BluetoothAddressType)

Bluetooth LE 디바이스를 나타내는 64비트 주소 및 주소 유형에서 AQS(고급 쿼리 구문) 필터 문자열을 만듭니다. AQS 문자열이 메서드에 CreateWatcher 전달됩니다.

GetDeviceSelectorFromConnectionStatus(BluetoothConnectionStatus)

표시된 BluetoothConnectionStatusBluetooth LE 디바이스에 대한 쿼리를 포함하는 AQS(고급 쿼리 구문) 필터 문자열을 만듭니다. AQS 문자열은 표시된 Bluetooth 연결 상태의 DeviceInformation 개체 컬렉션을 반환하기 위해 메서드에 전달 CreateWatcher 됩니다.

GetDeviceSelectorFromDeviceName(String)

Bluetooth LE 디바이스 이름에 대한 쿼리를 포함하는 AQS(고급 쿼리 구문) 필터 문자열을 만듭니다. AQS 문자열은 지정된 Bluetooth LE 디바이스 이름을 포함하는 개체 컬렉션을 DeviceInformation 반환하기 위해 메서드에 전달 CreateWatcher 됩니다.

GetDeviceSelectorFromPairingState(Boolean)

쌍을 이루거나 짝을 이루지 않는 Bluetooth LE 디바이스에 대한 쿼리를 포함하는 AQS(고급 쿼리 구문) 필터 문자열을 만듭니다. AQS 문자열은 개체 컬렉션을 DeviceInformation 반환하기 위해 메서드에 CreateWatcher 전달됩니다.

GetGattService(Guid)

지정된 서비스 ID를 사용하여 GATT 서비스를 반환합니다.

중요

GetGattService API는 더 이상 사용되지 않으며 이후 버전의 Windows에서는 사용할 수 없습니다. 대신 GetGattServicesAsync를 사용합니다.

GetGattServicesAsync()

이 Bluetooth LowEnergy 디바이스에 대한 GattDeviceServices를 가져옵니다.

GetGattServicesAsync(BluetoothCacheMode)

지정된 캐시 모드를 사용하여 이 Bluetooth LowEnergy 디바이스에 대한 GattDeviceServices를 반환합니다.

GetGattServicesForUuidAsync(Guid)

지정된 UUID를 사용하여 Bluetooth LowEnergy 디바이스에 대한 GattDeviceServices를 반환합니다.

GetGattServicesForUuidAsync(Guid, BluetoothCacheMode)

지정된 UUID를 사용하여 Bluetooth LowEnergy 디바이스에 대한 GattDeviceServices를 반환합니다.

RequestAccessAsync()

Bluetooth LowEnergy 디바이스에 대한 액세스를 요청합니다.

RequestPreferredConnectionParameters(BluetoothLEPreferredConnectionParameters)

지정된 Bluetooth LE 기본 설정 연결 매개 변수 개체에 대한 Bluetooth LE 기본 설정 연결 매개 변수 요청 개체를 검색합니다.

이벤트

ConnectionParametersChanged

디바이스에 대한 현재 연결 매개 변수가 변경될 때 발생하는 이벤트입니다. 매개 변수는 디바이스에 대한 연결이 설정된 후에만 업데이트됩니다.

ConnectionPhyChanged

디바이스의 현재 PHY가 변경될 때 발생하는 이벤트입니다. PHY는 디바이스에 대한 연결이 설정된 후에만 업데이트됩니다.

ConnectionStatusChanged

디바이스의 연결 상태가 변경될 때 발생합니다.

GattServicesChanged

디바이스에서 지원하는 GATT 서비스 목록이 변경되었을 때 발생합니다.

NameChanged

디바이스의 이름이 변경되면 발생합니다.

적용 대상

추가 정보