@stoprocent/noble
Advanced tools
+8
-0
@@ -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 @@ |
@@ -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", |
+1
-0
@@ -749,2 +749,3 @@ #  | ||
| | 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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
2564548
0.22%18631
0.6%755
0.13%41
28.13%