Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

advlib

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

advlib

Library for Decoding Wireless Advertising Packets. We believe in an open Internet of Things.

  • 1.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
147
increased by234.09%
Maintainers
1
Weekly downloads
 
Created
Source

advlib

Library for wireless advertising packet decoding. advlib is protocol-agnostic and currently supports the following processor modules:

  • advlib-ble for Bluetooth Low Energy

and the following interpreter modules:

The purpose of advlib is to extract all potentially relevant information from ambient data packets and to organise this information in a consistent manner, regardless of the radio protocol.

The objective of advlib v1.x is to support and to make accessible the broadest array of use cases by being highly modular and by facilitating contributions to its continuous development.

advlib is a lightweight Node.js package that can run on resource-constrained edge devices as well as on powerful cloud servers and anything in between. It is a key element in Pareto Anywhere open source software of the reelyActive technology platform.

Installation

npm install advlib

Hello advlib

For example, process several raw packets received from a beacon by selecting Bluetooth Low Energy as the processor (advlib-ble) and including any relevant processor and interpreter libraries (don't forget to first install these using npm).

const advlib = require('advlib');

const PROCESSORS = [
    { processor: require('advlib-ble'),
      libraries: [ require('advlib-ble-services'),
                   require('advlib-ble-manufacturers') ],
      options: { ignoreProtocolOverhead: true } }
];
const INTERPRETERS = [ require('advlib-interoperable') ];

let packets = [
    'c21d04acbe55daba16096164766c6962206279207265656c79416374697665',
    'c21904acbe55daba1216aafe10fc017265656c7961637469766507',
    'c21804acbe55daba1116aafe20000c4815200000004500000258'
];
let processedPackets = advlib.process(packets, PROCESSORS, INTERPRETERS);
console.log(processedPackets);

Packets will be combined, in order of precedence, into a single JSON:

{ name: "advlib by reelyActive",
  txPower: -4,
  uri: "https://www.reelyactive.com",
  batteryVoltage: 3.144,
  temperature: 21.125,
  txCount: 69,
  uptime: 60000 }

Standard Properties

advlib observes the following standard properties to represent the information extracted from ambient data packets. New standard properties are added whenever new data cannot be effectively represented using the existing properties. Once established, a standard property should not change (unless otherwise noted).

PropertyTypeNotes
accelerationArray of Number[ x, y, z ] In g
angleOfRotationNumberIn degrees
appearanceStringFrom Bluetooth
batteryPercentageNumber0 to 100 (%)
batteryVoltageNumberIn volts
deviceIdsArray of String
elevationNumberIn m
headingNumberIn degrees
heartRateNumberIn beats per minute
illuminanceNumberIn lx
interactionDigestArray of Object
isButtonPressedArray of Boolean
isContactDetectedArray of Boolean
isMotionDetectedArray of Boolean
magneticFieldArray of Number[ x, y, z ] In G
nameString
nearestArray of Object
positionArray of Number[ lon, lat, ele ]
pressureNumberIn Pa
relativeHumidityNumber0 to 100 (%)
speedNumberIn m/s
temperatureNumberIn Celcius
txCountNumber
txPowerNumberIn dBm
uptimeNumberIn milliseconds
uriString
uuidsArray of String
versionStringFormat pending

Properties are intended to be as flat as possible to facilitate data manipulation, especially with respect to database schemas.

Project History

The advlib project began in 2015 and was published in a scientific paper entitled Low-Power Wireless Advertising Software Library for Distributed M2M and Contextual IoT presented at the 2nd IEEE World Forum on Internet of Things (WF-IoT) in Milan, Italy that same year.

In 2020, advlib was redesigned and updated to v1.x which is modular, more efficient, protocol-agnostic and better supports the broad range of use cases that have emerged since its initial conception. The previous version remains available in the release-0.1 branch and as advlib@0.1.4 on npm.

Contributing

Discover how to contribute to this open source project which upholds a standard code of conduct.

Security

Consult our security policy for best practices using this open source software and to report vulnerabilities.

Known Vulnerabilities

License

MIT License

Copyright (c) 2015-2022 reelyActive

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Keywords

FAQs

Package last updated on 06 Feb 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc