BluetoothRemoteGATTServer

Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。

Web Bluetooth APIBluetoothRemoteGATTServer インターフェイスは、リモートデバイス上の GATT サーバーを表します。

インスタンスプロパティ

BluetoothRemoteGATTServer.connected 読取専用 Experimental

このスクリプト実行環境が this.device に接続されている間 true を返す論理値です。ユーザーエージェントが物理的に接続されていても false になる可能性があります。

BluetoothRemoteGATTServer.device 読取専用 Experimental

このサーバーを動かしている BluetoothDevice への参照です。

インスタンスメソッド

BluetoothRemoteGATTServer.connect() Experimental

このスクリプト実行環境を this.device に接続させます。

BluetoothRemoteGATTServer.disconnect() Experimental

このスクリプト実行環境を this.device から切断させます。

BluetoothRemoteGATTServer.getPrimaryService() Experimental

Bluetooth デバイスが提供している指定の BluetoothServiceUUID に対応するプライマリー BluetoothRemoteGATTService で解決するプロミスを返します。

BluetoothRemoteGATTServer.getPrimaryServices() Experimental

Bluetooth デバイスが提供している指定の BluetoothServiceUUID に対応するプライマリー BluetoothRemoteGATTService オブジェクトのリストで解決するプロミスを返します。

仕様書

Specification
Web Bluetooth
# bluetoothgattremoteserver-interface

ブラウザーの互換性

BCD tables only load in the browser