Giter VIP home page Giter VIP logo

blueapp.io's Introduction

BlueApp.io

Blueapp.io is fast, easy to use and feature-rich Web Bluetooth library. It is based on Web Bluetooth spec, and enables developers to create apps for web and mobile for discovering, connecting, and listening for advertisement of bluetooth devices. You can use this library to create apps for the Blueapp platform or for your personal bluetooth needs.

To get started, check out instructions page.

To look at the current feature support, and comparison between different platforms check implementation status page.

Quick start

  • Add source to index.html:
<script src="https://blueappio.github.io/blueapp.io/blueapp.io.min.js"></script>
  • Install via bower:
bower install blueapp.io --save
  • Install via npm:
npm install blueapp.io --save

Quick Overview:

Device discovery

Feature Supported functions
requestDevice() navigator.bluetooth.requestDevice(options)

Scanning

Feature Supported functions
requestLEScan() navigator.bluetooth.requestLEScan(options)

BluetoothDevice

Bluetooth device object retured in promise from requestDevice(). Available functions:

Supported functions Description
watchAdvertisement() listening for advertisement of devices found
unwatchAdvertisement() stops listening for advertisement
gatt.connect() connecting to the device from gattServer
watchAdvertisement() listening for advertisement of devices found
unwatchAdvertisement() stops listening for advertisement

Server

Server object returned in promise from gatt.connect(). Available functions:

Supported functions Description
getPrimaryService(uuid) promise returns passed service from server if available

Service

Service object returned in promise from getPrimaryService(). Abaliable functions:

Supported functions Description
getCharacteristic(uuid) promise returns passed characteristic from service if available
getCharacteristics(uuids) promise returns array from passed characteristics from service if available

Characteristic

Characteristic object returned in promise from getCharacteristic(). Avaliable functions:

Supported functions Description
getDescriptor(uuid) promise returns passed descriptor from characteristic if available
getDescriptors(uuids) promise returns array of passed descriptors from characteristic if available
readValue() promise returns DataView containing the data
writeValue() Bytes to be written Uint8Array
startNotifications() start notifying for value changes
stopNotifications() stop notifying for value changes

Descriptor

Descriptor object returned in promise from getDescriptor(). Available functions:

Supported functions Description
readValue() promise returns DataView containing the data
writeValue() Bytes to be written Uint8Array

Events

Supported events fired on
advertisementreceived BluetoothDevice object
gattserverdisconnected BluetoothDevice object
characteristicvaluechanged Characteristic object

Extra Material

Check the other repos for examples.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.