Bluetooth Remote GATT Server class

Hierarchy

  • BluetoothRemoteGATTServer

Implements

  • W3CBluetoothRemoteGATTServer

Index

Constructors

constructor

Properties

Readonly device

device: BluetoothDevice = null

The device the gatt server is related to

Accessors

connected

  • get connected(): boolean
  • Whether the gatt server is connected

    Returns boolean

Methods

connect

disconnect

  • disconnect(): void
  • Disconnect the gatt server

    Returns void

getPrimaryService

  • Gets a single primary service contained in the gatt server

    Parameters

    • service: string | number

      service UUID

    Returns Promise<BluetoothRemoteGATTService>

    Promise containing the service

getPrimaryServices

  • Gets a list of primary services contained in the gatt server

    Parameters

    • Optional service: string | number

      service UUID

    Returns Promise<Array<BluetoothRemoteGATTService>>

    Promise containing an array of services