Socket
Book a DemoInstallSign in
Socket

extended-inquiry-response

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extended-inquiry-response

Bluetooth EIR encoder and decoder

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

extended-inquiry-response

Bluetooth EIR encoder and decoder.

npm install extended-inquiry-response

Usage

Most of the properties have corresponding values defined in the Bluetooth specification. The service array accepts 128-bit, 32-bit and 16-bit UUIDs, which can either be buffers or strings with optional dashes.

var eir = require('extended-inquiry-response')

var buffer = eir.encode({
  flags: {
    leLimitedDiscoverableMode: true,
    leGeneralDiscoverableMode: true,
    bredrNotSupported: true,
    simultaneousLeAndBredrController: true,
    simultaneousLeAndBredrHost: true
  },
  service: [
    '13333333-3333-3333-3333-333333330001',   // 128-bit UUID as string
    '33330001',                               // 32-bit UUID as string
    Buffer.from('3a01', 'hex')                // 16-bit UUID as buffer
  ],
  serviceUuid128bitComplete: true,
  serviceUuid32bitComplete: true,
  serviceUuid16bitComplete: true,
  localName: 'test name',
  txPowerLevel: 55,
  manufacturerSpecificData: Buffer.from('hello world')
})

var obj = eir.decode(buffer)

FAQs

Package last updated on 17 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts