3.0.12 • Published 5 years ago

blueapp.io v3.0.12

Weekly downloads
58
License
Copyright 2017 Ve...
Repository
github
Last release
5 years ago

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

FeatureSupported functions
requestDevice()navigator.bluetooth.requestDevice(options)

Scanning

FeatureSupported functions
requestLEScan()navigator.bluetooth.requestLEScan(options)

BluetoothDevice

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

Supported functionsDescription
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 functionsDescription
getPrimaryService(uuid)promise returns passed service from server if available

Service

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

Supported functionsDescription
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 functionsDescription
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 functionsDescription
readValue()promise returns DataView containing the data
writeValue()Bytes to be written Uint8Array

Events

Supported eventsfired on
advertisementreceivedBluetoothDevice object
gattserverdisconnectedBluetoothDevice object
characteristicvaluechangedCharacteristic object

Extra Material

Check the other repos for examples.

3.0.12

5 years ago

3.0.11

5 years ago

3.0.10

5 years ago

3.0.9

6 years ago

3.0.8

6 years ago

3.0.7

6 years ago

3.0.6

6 years ago

3.0.5

6 years ago

3.0.4

6 years ago

3.0.3

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

1.2.0

7 years ago

1.1.9

7 years ago