
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
@particle/device-control-ble-setup-library
Advanced tools
Library that provides interfaces to execute the ble setup of a device
@particle/device-control-ble-setup-library
Library that provides interfaces to execute the ble setup of a device
npm install @particle/device-control-ble-setup-library --save
note: you'll need to be signed into an npm account that is a member of the @particle
org (docs)
A class to write data to a stream. Extends the EventEmitter class.
Kind: global class
Constructor
Param | Type | Description |
---|---|---|
callback | StreamWithCallback~callback | The callback used to write data. |
Writes data using a callback.
Kind: instance method of StreamWithCallback
Param | Type | Description |
---|---|---|
data | Uint8Array | The data to write. |
A class that implements the BLEDevice interface.
Kind: global class
string
Promise.<number>
Promise.<void>
Promise.<void>
Constructor.
Param | Type | Description |
---|---|---|
device | Device | Device instance which can be retrieved only by calling bleManager.startDeviceScan(). |
uuids | UUIDs | |
env | Object |
string
The name of the device.
Kind: instance property of BLEDevice
Connects to a device using its mobile secret. It first estalishes a connection, and then tries to find the device characteristic based on the UUIDs provided. It then tries to check the protocol version to finally open a control request channel using the mobile secret.
Kind: instance method of BLEDevice
Param | Type | Description |
---|---|---|
mobileSecret | string | A string of the mobile secret. |
Disconnects from a device closing the control request channel, removing the characteristics and cancelling the device connection.
Kind: instance method of BLEDevice
Finds the characteristics of a mobile's connection service.
Kind: instance method of BLEDevice
Param | Type |
---|---|
UUIDs | UUIDs |
Promise.<number>
Gets the current protocol version from the read characteristics of the connection.
Kind: instance method of BLEDevice
Returns: Promise.<number>
- Promise with a number coming from a decoded base64 input.
Checks for the protocol version. If the protocol is different that 2, it throws an error instance of type InvalidProtocolVersionError.
Kind: instance method of BLEDevice
Opens a new control request channel using the mobile's secret.
Kind: instance method of BLEDevice
Param | Type |
---|---|
mobileSecret | string |
Closes a control requested channel.
Kind: instance method of BLEDevice
Promise.<void>
Scans for nearby networks. Filters invalid names and returns unique SSIDs.
Kind: instance method of BLEDevice
Returns: Promise.<void>
- Returns a successful promise with the scanned networks.
Promise.<void>
Joins a scanned network.
Kind: instance method of BLEDevice
Returns: Promise.<void>
- Returns a successful promise if network was joinable.
Param | Type | Description |
---|---|---|
network | INetwork | Network interface with information like the SSID and channel. |
password | string | Password to join the network. |
Listener function triggered when disconnection happens.
Kind: instance method of BLEDevice
Param | Type | Description |
---|---|---|
listener | callback | Listener callback that gets executed when disconnecting. |
A class for capturing device requests
Kind: global class
Promise.<ReplyType>
Promise.<Array.<INetwork>>
Constructor
Param | Type |
---|---|
requestChannel | * |
Promise.<ReplyType>
Send a connection request.
Kind: instance method of DeviceRequests
Returns: Promise.<ReplyType>
- Promise
Param | Type |
---|---|
RequestClass | ProtobufMessage.<ReplyType> |
ReplyClass | ProtobufMessage.<ReplyType> |
type | number |
requestData | RequestType |
Promise.<Array.<INetwork>>
Scans the nearby networks.
Kind: instance method of DeviceRequests
Returns: Promise.<Array.<INetwork>>
- Promise containing the network information
Sends a request to join a new network.
Kind: instance method of DeviceRequests
Param | Type | Description |
---|---|---|
network | INetwork | INetwork interface |
password | string |
string
Decode base64 string into a string
Kind: global function
Returns: string
- Decoded string
Param | Type | Description |
---|---|---|
input | string | Base64 encoded input |
number
Decode base64 string into a number
Kind: global function
Returns: number
- Decoded number
Param | Type | Description |
---|---|---|
input | string | Base64 encoded input |
Object
A Device interface
Kind: global typedef
Object
A UUID interface
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
serviceUUID | string | The UUID of the service. |
versionCharacteristicUUID | string | The version characteristic UUID of the service. |
rxCharacteristicUUID | string | The receiver characteristic UUID of the service. |
txCharacteristicUUID | string | The transmitter UUID of the service. |
Object
A ProtobufMessage interface
Kind: global typedef
Properties
Name | Type |
---|---|
create | function |
NOTE: Unfortunately, docs have a nasty habit of falling out of date. When in doubt, check usage in tests
FAQs
Library that provides interfaces to execute the ble setup of a device
The npm package @particle/device-control-ble-setup-library receives a total of 0 weekly downloads. As such, @particle/device-control-ble-setup-library popularity was classified as not popular.
We found that @particle/device-control-ble-setup-library demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 29 open source maintainers collaborating on the project.
Did you know?
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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.