@stoprocent/noble 1.10.0 → 1.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/hci-uart/hci.js +3 -2
- package/package.json +1 -1
package/lib/hci-uart/hci.js
CHANGED
|
@@ -4,7 +4,7 @@ const events = require('events');
|
|
|
4
4
|
const util = require('util');
|
|
5
5
|
|
|
6
6
|
const async = require('async');
|
|
7
|
-
const SerialPort = require('serialport');
|
|
7
|
+
const { SerialPort } = require('serialport');
|
|
8
8
|
const HciSerialParser = require('./hci-serial-parser');
|
|
9
9
|
|
|
10
10
|
const HCI_COMMAND_PKT = 0x01;
|
|
@@ -144,7 +144,8 @@ Hci.STATUS_MAPPER = STATUS_MAPPER;
|
|
|
144
144
|
|
|
145
145
|
Hci.prototype.init = function (options) {
|
|
146
146
|
// Create Serial Port
|
|
147
|
-
this._socket = new SerialPort(
|
|
147
|
+
this._socket = new SerialPort({
|
|
148
|
+
path: process.env.NOBLE_HCI_UART_PORT || undefined,
|
|
148
149
|
baudRate: parseInt(process.env.NOBLE_HCI_UART_BAUD_RATE) || 1000000,
|
|
149
150
|
autoOpen: false,
|
|
150
151
|
flowControl: true
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"name": "@stoprocent/noble",
|
|
9
9
|
"description": "A Node.js BLE (Bluetooth Low Energy) central library.",
|
|
10
|
-
"version": "1.10.
|
|
10
|
+
"version": "1.10.1",
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
13
|
"url": "git+https://github.com/stoprocent/noble.git"
|