Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
bleacon-fork
Advanced tools
Readme
A Node.js library for creating, discovering, and configuring iBeacons
npm install bleacon
var Bleacon = require('bleacon');
"Create" an iBeacon
var uuid = 'e2c56db5dffb48d2b060d0f5a71096e0';
var major = 0; // 0 - 65535
var minor = 0; // 0 - 65535
var measuredPower = -59; // -128 - 127 (measured RSSI at 1 meter)
Bleacon.startAdvertising(uuid, major, minor, measuredPower);
Stop your iBeacon
Bleacon.stopAdvertising();
var uuid = 'e2c56db5dffb48d2b060d0f5a71096e0';
var major = 0; // 0 - 65535
var minor = 0; // 0 - 65535
Bleacon.startScanning([uuid], [major], [minor]);
Examples
Bleacon.startScanning(); // scan for any bleacons
Bleacon.startScanning(uuid); // scan for bleacons with a particular uuid
Bleacon.startScanning(uuid, major); // scan for bleacons with a particular uuid and major
Bleacon.startScanning(uuid, major, minor); // scan for bleacons with a particular uuid. major, and minor
Bleacon.stopScanning();
Bleacon.on('discover', function(bleacon) {
// ...
});
bleacon
properties:
Note: not official, determined using noble, and the AirLocate example.
Following data is in the manufacturer data section of the advertisment data
<company identifier (2 bytes)> <type (1 byte)> <data length (1 byte)> <uuid (16 bytes)> <major (2 bytes)> <minor (2 bytes)> <RSSI @ 1m>
Example:
4C00 02 15 585CDE931B0142CC9A1325009BEDC65E 0000 0000 C5
585CDE931B0142CC9A1325009BEDC65E
0000
0000
0xc5
= -59
FAQs
A Node.js library for creating, discovering, and configuring iBeacons
The npm package bleacon-fork receives a total of 53 weekly downloads. As such, bleacon-fork popularity was classified as not popular.
We found that bleacon-fork demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.