Fired when a read request for an attribute is received.
Fired when a write request for an attribute is received.
Fired when the connection state changes.
ReadonlyservicesThe addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
Optionaloptions: boolean | AddEventListenerOptionsAdds a service to the GATT server.
The service to add.
Connects to a remote device.
The address of the remote device.
Disconnects from a remote device.
The address of the remote device.
The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
Notifies a client that a characteristic value has changed.
The address of the client.
The characteristic that changed.
Whether the client should confirm the notification (indication).
The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.
Optionaloptions: boolean | EventListenerOptionsRemoves a service from the GATT server.
The service to remove.
Sends a response to a read or write request.
The address of the client.
The status of the operation.
The request ID.
Starts advertising the GATT server.
OptionaladvData: BluetoothAdvertisingDataThe advertising data.
Stops advertising the GATT server.
Permissions
bluetooth