Skip to content

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

License

Notifications You must be signed in to change notification settings

morkai/h5.bluetooth.hci.inode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published