Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 1.25 KB

README.md

File metadata and controls

32 lines (20 loc) · 1.25 KB

NodeJS Physical Web Beacon Example

Requires NodeJS and Linux

Install the dependencies

npm install

Create a beacon

$ sudo node
> uriBeacon = require ('uri-beacon')
> uriBeacon.advertise('http://example.com')

Create a beacon and specify the txPowerLevel in dBm

$ sudo node
> uriBeacon = require ('uri-beacon')
> uriBeacon.advertise('http://example.com', { txPowerLevel: -22 })

See the examples

You can only create beacons on Linux. You need to run as sudo. See bleno for more info.

The uriEncoder and tests will run on OS X. You can install on non-Linux platforms with npm install --force.

Have an older machine or Raspberry Pi? Add a Bluetooth 4.0 USB Adapter.