BluetoothRemoteGATTServer

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

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

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
BluetoothRemoteGATTServer
Experimental
connect
Experimental
connected
Experimental
device
Experimental
disconnect
Experimental
getPrimaryService
Experimental
getPrimaryServices
Experimental

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
No support
No support
Experimental. Expect behavior to change in the future.
See implementation notes.
Has more compatibility info.