Deno-WebBluetooth

Tags Documentation Checks License

WebBluetooth wrapper for Deno using the excellent SimpleBLE library.

Status

Most of the WebBluetooth standard is working.

Some things are not compatible with the WebBluetooth standard, particularly requestDevice. The standard calls for the user to select a device manually, which is not possible here. Instead, callbacks are used to select which device(s) to connect to.

This adds a bluetooth.requestDevices() method to return multiple devices, and a bluetooth.scan() method that returns an AsyncIterableIterator.

Documentation

Check out the latest documentation at doc.deno.land: https://doc.deno.land/https://deno.land/x/webbluetooth/mod.ts

Building

Before building SimpleBLE, make sure the submodules are checked out.

git submodule init
git submodule update

To build SimpleBLE, first run the appropriate configure script:

deno task configure-linux
# OR
deno task configure-macos
# OR
deno task configure-windows

After that, build SimpleBLE:

deno task build

Running

After building SimpleBLE, run one of the examples:

deno run -A --unstable ./examples/simpleble-scan.ts

License

Released under the MIT License.