
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).
blåtann: Norwegian word for "blue tooth"
Blatann aims to provide a high-level, object-oriented interface for interacting
with Bluetooth Low Energy (BLE) devices through Python. It operates using
the Nordic Semiconductor nRF52 through Nordic's pc-ble-driver-py
library
and the associated Connectivity firmware for the device.
Documentation is available on ReadTheDocs
pip install blatann
pc-ble-driver-py
consists of a shared object which is linked to mac's system python.
In order to use it with brew's python install, you'll need to run install_name_tool
to modify the .so
to
point to brew python instead of system python.
Note: This is the case with any custom-installed python on mac (like anaconda), brew is the most popular and what has been tested
An example shell script to do so can be found here
This library has been tested with the following hardware:
Flashed with specific Connectivity firmware released by Nordic Semiconductor.
When using the nRF52840, it should be flashed using the S132/SoftDevice v5 connectivity images. Both the hex files and DFU packages are distributed
with v4.1.4 of pc-ble-driver and is also provided in the pc-ble-driver-py
install.
The Nordic devices can be flashed using nRF Connect Desktop App or the nrfutil
CLI tool.
As of v0.3.0, the public-facing API of Blatann is stable. There will not likely be any major changes in method/property naming or functionality and all features added will aim to maintain backwards compatibility.
Below lists the supported BLE features and ones that are on the roadmap to implement (eventually)
The library aims to support both event-driven and procedural program styles. It takes similar paradigms from C#/.NET's event function signatures,
where event handlers are passed object sender, EventArgs e
parameters.
Additionally, all asynchronous function calls return a Waitable
object which can be waited on (with timeout)
until the event associated with the function call returns.
There are several example scripts which showcase different functionality of the library under blatann/examples
.
Examples can be run using python -m blatann.examples [example_filename] [device_comport]
.
Example usage: python -m blatann.examples scanner COM3
The integrated tests can be ran using the builtin unittest
runner and depends on a few environment variables to find the connected Nordic devices.
At a minimum, two nordic devices are required to run the unit tests. These are specified using environment variables:
BLATANN_DEV_1
- Serial port of the first Nordic deviceBLATANN_DEV_2
- Serial port of the second Nordic deviceOptionally a third BLATANN_DEV_3
can be specified to run tests which require more than two devices. If this environment variable is not defined, tests which require 3 devices are skipped.
In order to speed up the tests, BLATANN_TEST_QUICK=1
can be defined to skip long-running tests.
Note that test cases which are defined as "long-running" is subjective and relative--the test suite will still take awhile to run,
but in general test cases which take longer than 20 seconds are skipped.
The tests can also be ran through the makefile using make run-tests
.
FAQs
Python BLE library for using Nordic nRF52 with Connectivity firmware
We found that blatann demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.