Have ideas to improve npm?Join in the discussion! »

    webbluetooth
    TypeScript icon, indicating that this package has built-in type declarations

    2.1.0 • Public • Published

    Node Web Bluetooth

    Node.js implementation of the Web Bluetooth Specification

    Circle CI npm Licence MIT

    Prerequisites

    Node.js > v8.14.0, which includes npm.

    Installation

    $ npm install webbluetooth

    Getting Started

    See the examples or view the API documentation at:

    https://thegecko.github.io/webbluetooth/

    Specification

    The Web Bluetooth specification can be found here:

    https://webbluetoothcg.github.io/web-bluetooth/

    Implementation Status

    bluetooth

    • referringDevice - specification unstable
    • getAvailability() - specification unstable
    • requestDevice()
    • RequestDeviceOptions.name
    • RequestDeviceOptions.namePrefix
    • RequestDeviceOptions.services
    • RequestDeviceOptions.optionalServices
    • RequestDeviceOptions.acceptAllDevices
    • RequestDeviceOptions.manufacturerData - specification unstable
    • RequestDeviceOptions.serviceData - specification unstable

    BluetoothDevice

    • id
    • name
    • gatt
    • watchingAdvertisements - specification unstable
    • watchAdvertisements() - specification unstable
    • unwatchAdvertisements() - specification unstable

    BluetoothRemoteGATTServer

    • connected
    • device
    • connect()
    • disconnect()
    • getPrimaryService()
    • getPrimaryServices()

    BluetoothRemoteGATTService

    • device
    • uuid
    • isPrimary
    • getCharacteristic()
    • getCharacteristics()
    • getIncludedService()
    • getIncludedServices()

    BluetoothRemoteGATTCharacteristic

    • service
    • uuid
    • properties
    • value
    • getDescriptor()
    • getDescriptors()
    • readValue()
    • writeValue()
    • writeValueWithResponse()
    • writeValueWithoutResponse()
    • startNotifications()
    • stopNotifications()

    BluetoothRemoteGATTDescriptor

    • characteristic
    • uuid
    • value
    • readValue()
    • writeValue()

    Events

    Bluetooth

    • availabilitychanged

    Bluetooth Device

    • gattserverdisconnected
    • advertisementreceived - specification unstable

    Bluetooth Service

    • serviceadded
    • servicechanged - unsupported in noble
    • serviceremoved - unsupported in noble

    Bluetooth Characteristic

    • characteristicvaluechanged

    Other

    • Device selector hook
    • Lookups for known services, characteristics and descriptors
    • Canonical UUID helper
    • Examples
    • API Documentation

    Install

    npm i webbluetooth

    DownloadsWeekly Downloads

    55

    Version

    2.1.0

    License

    MIT

    Unpacked Size

    1.4 MB

    Total Files

    57

    Last publish

    Collaborators

    • avatar