JSPM

ble-pcap

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q9996F
  • License MIT

nodejs library for working with Bluetooth Low Energy packet captures (pcap)

Package Exports

  • ble-pcap

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ble-pcap) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ble-pcap

Node library for working with BLE packet captures. Still WIP and things may change.

Requires node-pcap and attempts to follow the same design pattern.

Installation

npm install ble-pcap

usage

Due to a limitation of the current node-pcap design, there's no clean way to add DLTs to be parsed. To work around this, ble-pcap does some method swizzling to introduce its DLTs to the pcap library

Example Initialization

const pcap = require('pcap');
const ble_pcap = require('ble-pcap');

// let node-pcap know about our DLTs
ble_pcap.register_dlts();

// open pcap and begin parsing packets
let session =  pcap.createOfflineSession(PCAP_FILENAME);

session.on('packet', (raw_packet) => {
    let packet = pcap.decode.packet(raw_packet);
});