This library has been deprecated in favour of webbluetooth.
Please upgrade your Node.js applications accordingly. Evothings users should continue to use bleat as a legacy library.
Bleat has 2 APIs:
- The Extended Web Bluetooth API specification developed for use in browsers
- The Classic API, originally developed for this project
To install the library, either clone or copy the files to your project or use a package manager:
$ npm install bleat
$ bower install bleat
bluetooth.helpers.js file contains general helper objects and functions.
api.<api>.js files each offer a BLE API.
adapter.<platform>.js files each represent an adapter targetting a specific BLE engine, the
adapter-template.js file is an empty template to ease creation of a new adapter.
<api>.<adapter>.min.js files are minified versions of the BLE APIs including the helpers and a single adapter.
Refer to the
example_<adapter>_<api> files and folders for simple examples of how to use each combination.
Simply require it up, specifying the api you wish to use:
var bleat = require('bleat').classic;
var bleat = require('bleat').webbluetooth;
To use bleat with RequireJS, set the
requirejs.config to load your API of choice as
bleat and add a dependency on your adapter of choice:
You can then use bleat as follows:
bluetooth.helpers.js file, then the bleat api file you wish to use and finally the adapter file you wish to use:
Alternatively, you can just include the minified file which contains the API and adapter you wish to use:
A global object
root.bleat will then be available to use.