esp-protocomm
A Python client for protocomm, Espressif's transport for ESP-IDF unified provisioning: the security1 handshake, the BLE transport, and Wi-Fi provisioning. It talks to any ESP32 device running protocomm, over Bluetooth Low Energy, from a laptop or a server.
Unofficial. Not affiliated with, endorsed by, or supported by Espressif Systems. Portions are adapted from ESP-IDF under the Apache License 2.0; see NOTICE for per-file attribution and a list of the changes made.
Install
pip install esp-protocomm # the session: handshake, Wi-Fi provisioning
pip install "esp-protocomm[ble]" # adds the radio (bleak)
The base install needs no Bluetooth stack, so the handshake and the protobuf schemas can be exercised in CI. Only BleTransport requires the extra.
Use
import asyncio
from esp_protocomm import Security1, establish_session, provision_wifi
from esp_protocomm.ble import BleTransport
async def main():
async with BleTransport("XX:XX:XX:XX:XX:XX") as transport:
security = await establish_session(transport, Security1(pop="abcd1234"))
status = await provision_wifi(transport, security, ssid="my-network", passphrase="...")
print(status)
asyncio.run(main())
The endpoint name-to-UUID map is read from the device's 0x2901 descriptors rather than hardcoded, so a product that registers its own endpoint alongside the standard ones works without changes here.
Scope
What this is: the protocomm session and the standard prov-session / prov-config endpoints.
What it is not: a device's own application commands. Those ride over the session this library establishes, on their own endpoint, and belong in that product's code. Keeping that boundary is why this is a separate library.
Security scheme support is security1 (X25519 key exchange, AES-CTR, proof-of-possession). The protobuf definitions for security0 and security2 are present because they ship together upstream, but only security1 has a client here.
Development
pip install -e ".[dev]"
pytest tests/ -v
ruff check . && ruff format --check .
Tests run against an in-process fake device that implements the device side of the handshake with the same primitives as the client, so they exercise the real key exchange, the real AES-CTR keystream, and the real framing. No radio, no hardware.
Releasing
Publishing uses PyPI Trusted Publishing (OIDC), so there is no API token in this repository and there should not be one. Tag a version and the Release workflow builds, checks that the wheel carries LICENSE and NOTICE, and publishes.
Before the first release, PyPI needs to be told which workflow is allowed to publish. Because the project does not exist there yet, this is a pending publisher at pypi.org/manage/account/publishing:
| Field | Value |
|---|---|
| PyPI Project Name | esp-protocomm |
| Owner | electrification-bus |
| Repository name | esp-protocomm |
| Workflow name | release.yml |
| Environment name | pypi |
Workflow name is the filename, not the name: inside it, and the environment must match the job's environment: key. The pending publisher converts to a normal one on the first successful publish.
git tag v0.1.0 && git push origin v0.1.0
License
Metadata
Release files for esp-protocomm 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| esp_protocomm-0.1.0.tar.gz | 22.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| esp_protocomm-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 47.8 kB
Release files / esp_protocomm-0.1.0.tar.gz
| Download URL | esp_protocomm-0.1.0.tar.gz |
|---|---|
| Size | 22.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
92b36f9f970a93f7f432bb971c00cf5ee0e682e57ee8e4f440097f6dfe00c213
|
|
BLAKE2b-256 checksum How to use checksums |
3ac9d065fcbd7c25a3d7e294a02c32e5b60a89e004166e73da1fe3e1b2d782ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.
Transparency logRelease files / esp_protocomm-0.1.0-py3-none-any.whl
| Download URL | esp_protocomm-0.1.0-py3-none-any.whl |
|---|---|
| Size | 25.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
69c2800d904134aff6e36c33cfb746c686c5ca17683804718f572aea727711b2
|
|
BLAKE2b-256 checksum How to use checksums |
3bf70db4202ec44e131765894f33bd05b43270b0ef6274b44589e8ee3f0f7c70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.
Transparency log