BluetoothRemoteGATTServer
The GATT server of a remote Bluetooth LE device.
See
https://developer.mozilla.org/docs/Web/API/BluetoothRemoteGATTServer
Accessors
connected
get connected(): boolean
Returns
boolean
device
get device(): BluetoothDevice
Returns
Methods
connect()
connect(): Promise<BluetoothRemoteGATTServer>
Connects to the device's GATT server and waits for the system to complete service discovery.
Returns
Promise<BluetoothRemoteGATTServer>
See
https://developer.mozilla.org/docs/Web/API/BluetoothRemoteGATTServer/connect
disconnect()
disconnect(): void
Disconnects from the device's GATT server.
Returns
void
See
https://developer.mozilla.org/docs/Web/API/BluetoothRemoteGATTServer/disconnect
getPrimaryService()
getPrimaryService(service): Promise<BluetoothRemoteGATTService>
Returns the primary GATT service matching service.
Parameters
| Parameter | Type |
|---|---|
service | string | number |
Returns
Promise<BluetoothRemoteGATTService>
See
https://developer.mozilla.org/docs/Web/API/BluetoothRemoteGATTServer/getPrimaryService
getPrimaryServices()
getPrimaryServices(service?): Promise<BluetoothRemoteGATTService[]>
Returns the primary GATT services, optionally filtered by UUID.
Parameters
| Parameter | Type |
|---|---|
service? | string | number |
Returns
Promise<BluetoothRemoteGATTService[]>
See
https://developer.mozilla.org/docs/Web/API/BluetoothRemoteGATTServer/getPrimaryServices