Socket
Socket
Sign inDemoInstall

bluetooth-hci-socket

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bluetooth-hci-socket - npm Package Compare versions

Comparing version 0.4.4 to 0.5.0

2

index.js

@@ -7,3 +7,3 @@ var os = require('os');

module.exports = require('./lib/usb.js');
} else if (platform === 'linux') {
} else if (platform === 'linux' || platform === 'android') {
module.exports = require('./lib/native');

@@ -10,0 +10,0 @@ } else {

@@ -44,5 +44,25 @@ var events = require('events');

this._usbDevice = usb.findByIds(usbVid, usbPid);
if (process.env.BLUETOOTH_HCI_SOCKET_USB_BUS && process.env.BLUETOOTH_HCI_SOCKET_USB_ADDRESS) {
var usbBus = parseInt(process.env.BLUETOOTH_HCI_SOCKET_USB_BUS);
var usbAddress = parseInt(process.env.BLUETOOTH_HCI_SOCKET_USB_ADDRESS);
debug('using USB BUS = ' + usbBus + ', Address = ' + usbAddress);
var usbDevices = usb.getDeviceList();
for (var i = 0; i < usbDevices.length; i++) {
var usbDeviceDesc = usbDevices[i].deviceDescriptor;
if ((usbDeviceDesc.idVendor == usbVid) &&
(usbDeviceDesc.idProduct == usbPid) &&
(usbDevices[i].busNumber == usbBus) &&
(usbDevices[i].deviceAddress == usbAddress)) {
this._usbDevice = usbDevices[i];
}
}
} else {
this._usbDevice = usb.findByIds(usbVid, usbPid);
}
} else {
this._usbDevice = usb.findByIds(0x0a5c, 0x21e8) || usb.findByIds(0x19ff, 0x0239) || usb.findByIds(0x0a12, 0x0001) || usb.findByIds(0x0b05, 0x17cb);
this._usbDevice = usb.findByIds(0x0a5c, 0x21e8) || usb.findByIds(0x19ff, 0x0239) || usb.findByIds(0x0a12, 0x0001) || usb.findByIds(0x0b05, 0x17cb) || usb.findByIds(0x8087, 0x07dc);
}

@@ -131,3 +151,3 @@

if (this._mode === 'raw' && buf.length === 6 && ('0e0401030c00' === buf.toString('hex'))) {
if (this._mode === 'raw' && buf.length === 6 && ('0e0401030c00' === buf.toString('hex') || '0e0402030c00' === buf.toString('hex'))) {
debug('reset complete');

@@ -134,0 +154,0 @@ this._isUp = true;

{
"name": "bluetooth-hci-socket",
"version": "0.4.4",
"version": "0.5.0",
"description": "Bluetooth HCI socket binding for Node.js",

@@ -27,2 +27,3 @@ "main": "index.js",

"linux",
"android",
"win32"

@@ -29,0 +30,0 @@ ],

@@ -33,2 +33,3 @@ # node-bluetooth-hci-socket

| Asus BT-400 | 0x0b05 | 0x17cb |
| Intel Wireless Bluetooth | 0x8087 | 0x07dc |

@@ -35,0 +36,0 @@ ## Install

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc