BluetoothRemoteGATTServer
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.
Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.
TheBluetoothRemoteGATTServer
interface of theWeb Bluetooth API represents a GATTServer on a remote device.
In this article
Instance properties
BluetoothRemoteGATTServer.connected
Read onlyExperimentalA boolean value that returns true while this script execution environment isconnected to
this.device
. It can be false while the user agent isphysically connected.BluetoothRemoteGATTServer.device
Read onlyExperimentalA reference to the
BluetoothDevice
running the server.
Instance methods
BluetoothRemoteGATTServer.connect()
ExperimentalCauses the script execution environment to connect to
this.device
.BluetoothRemoteGATTServer.disconnect()
ExperimentalCauses the script execution environment to disconnect from
this.device
.BluetoothRemoteGATTServer.getPrimaryService()
ExperimentalReturns a promise to the primary
BluetoothRemoteGATTService
offered by theBluetooth device for a specifiedBluetoothServiceUUID
.BluetoothRemoteGATTServer.getPrimaryServices()
ExperimentalReturns a promise to a list of primary
BluetoothRemoteGATTService
objectsoffered by the Bluetooth device for a specifiedBluetoothServiceUUID
.
Specifications
Specification |
---|
Web Bluetooth> # bluetoothgattremoteserver-interface> |
Browser compatibility
Loading…