Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
ble-ad-parser
Advanced tools
This package will parse BLE slave advertisement packets into human readable/manipulatable objects. Based off of the BLE specification data types.
npm install ble-ad-parser
var parser = require('ble-ad-parser');
// Payload from your BLE device (make it into a buffer, if not already)
var payload = new Buffer([27, 2, 1, 6, 17, 6, 186, 86, 137, 166, 250, 191, 162, 189, 1, 70, 125, 110, 56, 88, 171, 173, 5, 22, 10, 24, 7, 4]);
// Parse (little-endian by default)
var packets = parser.parse(payload);
//
console.log(packets.length); // 3
console.log(packets[0].type); // Flags
console.log(packets[0].data); // [ 'LE Limited Discoverable Mode' ]
console.log(packets[1].type); // 'Incomplete List of 128-bit Service Class UUIDs'
console.log(packets[1].data); // [ '0xba5689a6fabfa2bd01467d6e3858abad' ]
The returned packets in the packet array have the following structure:
packet.type -> A string describing type of data (eg. "Flags", "Complete List of 16-bit UUIDs", etc.)
packet.data -> The data parsed into appropriate data type (eg. String, Array of Octet Strings, unsigned int, etc.)
packet.typeFlag -> the type flag parsed from packet
packet.raw -> The raw buffer that was parsed
You can specify the endianess that you want the buffers parsed with by using these functions:
parser.parseLE(buffer);
parse.parseBE(buffer);
MIT
FAQs
Parse Bluetooth Low Energy peripheral advertising packets
We found that ble-ad-parser 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.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.