CSRMesh protocol library
Project description
recsrmesh
A Python library for the CSRMesh Bluetooth mesh protocol. Provides MASP association, MCP mesh commands, and BLE transport over GATT.
Features
- Device discovery -- find unprovisioned CSRMesh devices via a bridge
- Association -- full MASP handshake (ECDH key exchange, device ID and network key distribution)
- Mesh commands -- send and receive MCP packets (AES-OFB encrypted)
- Disassociate -- remove devices from the mesh
- Async API -- built on bleak for cross-platform BLE
Usage
from bleak import BleakClient
from recsrmesh import CSRMesh
async with BleakClient(bridge_mac) as client:
async with CSRMesh(client, passphrase) as mesh:
# Discover unprovisioned devices
devices = await mesh.discover_unassociated(timeout=5.0)
# Associate a device into the mesh
device_id = await mesh.associate(devices[0]["uuid_hash"], device_id=100)
# Send a mesh command
await mesh.send(dest_id=100, opcode=0x73, payload=b"\x01\x80")
# Receive responses
responses = await mesh.receive(timeout=3.0)
# Remove a device from the mesh
await mesh.disassociate(device_id=100)
Installation
pip install recsrmesh
Requires Python 3.11+.
License
LGPL-3.0-or-later
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file recsrmesh-0.3.0.tar.gz.
File metadata
- Download URL: recsrmesh-0.3.0.tar.gz
- Upload date:
- Size: 20.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f73bb257780dadb5438619d6440d5119a828aa8d9353967c3da0b95d406d4109
|
|
| MD5 |
19fc37b4b403fb796aad6f7a5d737d53
|
|
| BLAKE2b-256 |
cfed942eb637133cb38a2b9b24fe49707037346feb54e9e3feba70ffd9d1e065
|
Provenance
The following attestation bundles were made for recsrmesh-0.3.0.tar.gz:
Publisher:
workflow.yml on oyvindkinsey/recsrmesh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
recsrmesh-0.3.0.tar.gz -
Subject digest:
f73bb257780dadb5438619d6440d5119a828aa8d9353967c3da0b95d406d4109 - Sigstore transparency entry: 936533337
- Sigstore integration time:
-
Permalink:
oyvindkinsey/recsrmesh@6719c38f5bc5dd552ca3a21bf832dceda8806808 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/oyvindkinsey
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@6719c38f5bc5dd552ca3a21bf832dceda8806808 -
Trigger Event:
push
-
Statement type:
File details
Details for the file recsrmesh-0.3.0-py3-none-any.whl.
File metadata
- Download URL: recsrmesh-0.3.0-py3-none-any.whl
- Upload date:
- Size: 20.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
546658625b361dfce35589a4ad6f184cd3cf6db006680bbe9ce13545ae6172c9
|
|
| MD5 |
6be59d3fd664de183f7d600f88fed233
|
|
| BLAKE2b-256 |
a44538c6c0c840697a7655fab77d5e3db05dc051952b630e42fec6af1a4ebb5d
|
Provenance
The following attestation bundles were made for recsrmesh-0.3.0-py3-none-any.whl:
Publisher:
workflow.yml on oyvindkinsey/recsrmesh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
recsrmesh-0.3.0-py3-none-any.whl -
Subject digest:
546658625b361dfce35589a4ad6f184cd3cf6db006680bbe9ce13545ae6172c9 - Sigstore transparency entry: 936533339
- Sigstore integration time:
-
Permalink:
oyvindkinsey/recsrmesh@6719c38f5bc5dd552ca3a21bf832dceda8806808 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/oyvindkinsey
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@6719c38f5bc5dd552ca3a21bf832dceda8806808 -
Trigger Event:
push
-
Statement type: