Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 

h5.bluetooth.hci.inode

Bluetooth HCI Manufacturer Specific Data decoder for iNode devices in Node.js.

Extension to the h5.bluetooth.hci package.

Requirements

Documentation

Usage

Decoding Bluetooth HCI packets:

'use strict';

const btHci = require('h5.bluetooth.hci');
const iNodeHci = require('h5.bluetooth.hci.inode');

iNodeHci.registerManufacturerSpecificDataDecoder(btHci.decoders.eirDataType);

const buffer = new Buffer(0); // the BT HCI frame buffer
const hciPacket = btHci.decode(buffer);

console.log(hciPacket);

Decoding iNode Manufacturer Specific Data buffer:

'use strict';

const iNodeHci = require('h5.bluetooth.hci.inode');

const buffer = new Buffer('929301b000001700a819e8180400f4bbce6e77a00b97d1b5', 'hex');
const msd = iNodeHci.decodeMsd(buffer);

console.log(msd);

Decoding iNode GSM data:

'use strict';

const iNodeHci = require('h5.bluetooth.hci.inode');

const gsmTime = -1; // the `time` query parameter
const gsmData = new Buffer(0); // the request body
const reports = iNodeHci.decodeGsmData(gsmTime, gsmData); // an array of advertising reports

console.log(reports);

TODO

  • Tests
  • Documentation
  • npm publish

License

This project is released under the MIT License.

About

Bluetooth HCI Manufacturer Specific Data decoder for iNode devices in Node.js.

Resources

License

Releases

No releases published

Packages

No packages published