Sign In

@stoprocent/noble

Package Overview
Dependencies
Maintainers
1
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stoprocent/noble - npm Package Compare versions

Comparing version
2.6.5
to
2.6.6
+8
-0
index.d.ts

@@ -277,2 +277,10 @@ /// <reference types="node" />

userChannel?: boolean;
/**
* Offer LE Coded PHY as an acceptable PHY for connections, for
* long-range links. Off by default: Coded PHY trades throughput for
* range, and a peer may negotiate onto it. Ignored on controllers
* that do not report the LE Coded PHY feature. Does not affect
* scanning.
*/
codedPhy?: boolean;
}

@@ -279,0 +287,0 @@

+10
-2

@@ -113,2 +113,6 @@ const debug = require('debug')('hci');

this._isExtended = this._extendedModeConfigured ? Boolean(options.extended) : false;
this._codedPhy = typeof options.codedPhy !== 'undefined'
? Boolean(options.codedPhy)
: Boolean(process.env.NOBLE_CODED_PHY);
this._supportsCodedPhy = false;
this._state = null;

@@ -326,3 +330,5 @@ this._bindParams = 'bindParams' in options ? options.bindParams : undefined;

Hci.prototype.afterReset = function () {
if (this._isExtended) {
// HCI_Reset clears the default PHY, so it has to be rewritten here. Support stays false
// until the first LE_READ_LOCAL_SUPPORTED_FEATURES reply, so the initial reset writes nothing.
if (this._codedPhy && this._supportsCodedPhy) {
this.setCodedPhySupport();

@@ -1013,2 +1019,4 @@ }

}
// LE Coded PHY feature bit (11).
this._supportsCodedPhy = (result[1] & (1 << 3)) !== 0;
this.emit('leFeatures', result);

@@ -1019,3 +1027,3 @@ } else {

if (this._isExtended) {
if (this._codedPhy && this._supportsCodedPhy) {
this.setCodedPhySupport();

@@ -1022,0 +1030,0 @@ }

+1
-1

@@ -9,3 +9,3 @@ {

"description": "A Node.js BLE (Bluetooth Low Energy) central library.",
"version": "2.6.5",
"version": "2.6.6",
"repository": {

@@ -12,0 +12,0 @@ "type": "git",

@@ -749,2 +749,3 @@ # ![noble](assets/noble-logo.png)

| HCI_CHANNEL_USER | Use the exclusive Linux HCI user channel | false | `export HCI_CHANNEL_USER=1` |
| NOBLE_CODED_PHY | Offer LE Coded PHY for connections (long range, lower throughput; requires controller support) | false | `export NOBLE_CODED_PHY=1` |
| NOBLE_REPORT_ALL_HCI_EVENTS | Report HCI events without waiting for scan response | false | `export NOBLE_REPORT_ALL_HCI_EVENTS=1` |

@@ -751,0 +752,0 @@ | BLUETOOTH_HCI_SOCKET_UART_PORT | UART port for HCI communication | none | `export BLUETOOTH_HCI_SOCKET_UART_PORT=/dev/ttyUSB0` |

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display