An open API service indexing awesome lists of open source software.

https://github.com/jitsi/node-ibeacons

iBeacons emitter for Node
https://github.com/jitsi/node-ibeacons

Last synced: 4 months ago
JSON representation

iBeacons emitter for Node

Awesome Lists containing this project

README

          

# node-ibeacons

ibeacon emitting for Node.

**NOTE**: only macOS is supported at the moment.

## Overview

This package allows the user to emit an ibeacon with their device, proven it
has support for it.

### API

The API has been with simplicity in mind. Checkout an example [here](./example.js).

#### beaconEmitter.start(uuid, [major, [minor, [measuredPower]]])

Starts emitting an ibeacon with the given proximity UUID, major, minor at the
given measured power.

This function may be called multiple times and the last one will prevail,
previous advertisementts will be cancelled.

The `started` event will be emitted when the advertising starts. The `stopped`
and `error` events may also occur. If Bluetooth is stopped while advertising,
the `stopped` event will be emitted, but adverttising will be automatically
resumed when Bluetooth is started.

#### beaconEmitter.stop()

Stops advertising ibeacons. No further events will be emitted.

## License

Apache Licence 2.0.