Bluetooth HCI Manufacturer Specific Data decoder for iNode devices in Node.js.
Extension to the h5.bluetooth.hci package.
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);
- Tests
- Documentation
- npm publish
This project is released under the MIT License.