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

advlib-ble-services

Package Overview
Dependencies
Maintainers
0
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

advlib-ble-services - npm Package Compare versions

Comparing version 1.4.2 to 1.5.0

lib/hewlettpackardenterprise.js

3

lib/advlibbleservices.js

@@ -10,2 +10,3 @@ /**

const gatt = require('./gatt');
const hewlettpackardenterprise = require('./hewlettpackardenterprise');
const minew = require('./minew');

@@ -56,2 +57,4 @@ const utils = require('./utils');

return wiliot.process(data);
case 'fd9f':
return hewlettpackardenterprise.process(data);
case 'fd6f':

@@ -58,0 +61,0 @@ return exposurenotification.process(data);

@@ -160,2 +160,47 @@ /**

/**
* Convert the given RFC6335 geocoordinate to a floating point Number.
* @param {Number} integer The 9-bit integer portion.
* @param {Number} fraction The 25-bit fraction portion.
* @return {Number} The floating point representation as a Number.
*/
function parseRfc6225Geocoordinate(integer, fraction) {
let isNegative = (integer & 0x100);
if(isNegative) {
integer = integer - 0x1ff;
fraction = fraction - 0x1ffffff;
}
return integer + (fraction / 0x1ffffff);
}
/**
* Convert the given RFC6335 altitude to a floating point Number.
* @param {Number} integer The 30-bit altitude representation.
* @param {Number} type The altitude type code.
* @return {Number} The floating point representation as a Number.
*/
function parseRfc6225Altitude(altitude, altitudeType) {
let isMetres = (altitudeType === 0x01);
let isFloor = (altitudeType === 0x02);
if(!isMetres && !isFloor) {
return null;
}
let integer = (altitude >> 8);
let fraction = (altitude & 0xff);
let isNegative = (integer & 0x200000);
if(isNegative) {
integer = integer - 0x3fffff;
fraction = fraction - 0xff;
}
return integer + (fraction / 0xff);
}
module.exports.SIGNATURE_SEPARATOR = SIGNATURE_SEPARATOR;

@@ -167,2 +212,4 @@ module.exports.convertToBuffer = convertToBuffer;

module.exports.parseMedfloat16 = parseMedfloat16;
module.exports.parseMedfloat32 = parseMedfloat32;
module.exports.parseMedfloat32 = parseMedfloat32;
module.exports.parseRfc6225Geocoordinate = parseRfc6225Geocoordinate;
module.exports.parseRfc6225Altitude = parseRfc6225Altitude;

2

package.json

@@ -18,3 +18,3 @@ {

],
"version": "1.4.2",
"version": "1.5.0",
"engines": {

@@ -21,0 +21,0 @@ "node": ">=6.0.0"

@@ -41,23 +41,24 @@ advlib-ble-services

| Service UUID | Service Name | /lib file |
|:-------------|:------------------------------|:-------------------------|
| 0x2a37 | Heart Rate Measurement | gatt.js |
| 0x2a67 | Location and Speed | gatt.js |
| 0x2a6c | Elevation | gatt.js |
| 0x2a6d | Pressure | gatt.js |
| 0x2a6e | Temperature | gatt.js |
| 0x2aa1 | Magnetic flux density 3D | gatt.js |
| 0x2aa2 | Language | gatt.js |
| 0x2af9 | Generic Level | gatt.js |
| 0x2afb | Illuminance | gatt.js |
| 0x2b8c | CO2 Concentration | gatt.js |
| 0x2bcf | Ammonia Concentration | gatt.js |
| 0x2bd0 | Carbon Monoxide Concentration | gatt.js |
| 0x2bd1 | Methane Concentration | gatt.js |
| 0x2bd2 | NO2 Concentration | gatt.js |
| 0x2be7 | VOC Concentration | gatt.js |
| 0xfd6f | Exposure Notification | exposurenotification.js |
| 0xfdaf | Wiliot | wiliot.js |
| 0xfeaa | Eddystone (Google) | eddystone.js |
| 0xffe1 | Minew | minew.js |
| Service UUID | Service Name | /lib file |
|:-------------|:------------------------------|:----------------------------|
| 0x2a37 | Heart Rate Measurement | gatt.js |
| 0x2a67 | Location and Speed | gatt.js |
| 0x2a6c | Elevation | gatt.js |
| 0x2a6d | Pressure | gatt.js |
| 0x2a6e | Temperature | gatt.js |
| 0x2aa1 | Magnetic flux density 3D | gatt.js |
| 0x2aa2 | Language | gatt.js |
| 0x2af9 | Generic Level | gatt.js |
| 0x2afb | Illuminance | gatt.js |
| 0x2b8c | CO2 Concentration | gatt.js |
| 0x2bcf | Ammonia Concentration | gatt.js |
| 0x2bd0 | Carbon Monoxide Concentration | gatt.js |
| 0x2bd1 | Methane Concentration | gatt.js |
| 0x2bd2 | NO2 Concentration | gatt.js |
| 0x2be7 | VOC Concentration | gatt.js |
| 0xfd6f | Exposure Notification | exposurenotification.js |
| 0xfd9f | Hewlett Packard Enterprise | hewlettpackardenterprise.js |
| 0xfdaf | Wiliot | wiliot.js |
| 0xfeaa | Eddystone (Google) | eddystone.js |
| 0xffe1 | Minew | minew.js |

@@ -106,3 +107,3 @@ Consult the [Bluetooth Assigned Numbers](https://www.bluetooth.com/specifications/assigned-numbers/) page for the most recent 16-bit UUIDs document.

Copyright (c) 2015-2023 [reelyActive](https://www.reelyactive.com)
Copyright (c) 2015-2024 [reelyActive](https://www.reelyactive.com)

@@ -109,0 +110,0 @@ 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:

Sorry, the diff of this file is not supported yet

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