medre-adapter-meshcore
The MeshCore adapter for MEDRE.
Install
Use uv to install MEDRE and this adapter in the same persistent tool environment:
uv tool install medre
medre adapters install meshcore
On Windows, the package-changing command prints a uv command to run after
medre.exe exits, rather than replacing an executable still in use.
Adapter installation defaults to package-index requirements; existing saved
Git requests and catalogs are preserved. For fake smoke, guided route
creation, locked uv deployment projects, private Git sources, local checkouts,
and the same-environment requirement, see the
MEDRE Getting Started guide
and the
adapter-source guide.
Neither MEDRE nor the adapter installs packages during runtime startup.
Configure
Save a private connections.yaml with one real TCP instance. The common case
needs the connection type and the node host; the default TCP port is shown in
the setup guide's options:
adapters:
meshcore:
meshcore-alpha:
adapter_kind: real
connection_type: tcp
host: 192.168.1.100
routes: {}
For BLE, set ble_address to the MAC address you recorded during pairing.
Add another adapter instance, then build routes with guided configuration.
For every option, environment overrides, and troubleshooting, see the
MeshCore setup guide.
Verify
Confirm the installed adapter and the saved configuration resolve:
medre adapters check --config connections.yaml
The setup guide's Verify section shows the config check, a healthy start, health states, and reconnecting behavior.
Text budgets and delivery behavior
MeshCore group messages have a 160-byte firmware text limit including the
firmware's <device name>: prefix. MEDRE reserves that space, uses a conservative
127-byte budget before the device name is known, and refreshes the effective
budget from the live handshake. max_text_bytes (default 160) is an operator
upper bound. Rendering truncates safely at UTF-8 boundaries and records that
fact; native sends that bypass this budget fail permanently before SDK I/O.
All core-rendered native messages use the durable packet grant, including short and clipped single packets. A timeout, disconnect or cancellation after submission retains uncertainty and does not trigger an internal resend. Empty native wire text is rejected before dispatch. Direct session calls keep their legacy retry policy and do not provide this guarantee. See guarded native text.
Replies and threads relay as inline fallback text. They do not emit native
reply/thread operations. Delivery evidence identifies fallback_text;
reactions, edits, and deletes remain unsupported and are suppressed.
Fake adapters expose the same planning capabilities as their health reports.
Offline startup and recovery
A long-lived MEDRE adapter returns from initial setup in degraded health when its configured radio is unavailable. Each complete native connection attempt has a 15-second TCP/serial budget or a 45-second BLE budget (including BlueZ cleanup and discovery). One session-owned recovery loop then retries with exponential backoff and jitter, capped at 30 seconds between attempts, until the radio connects or the adapter stops. The SDK's own auto-reconnect stays disabled. Initial unavailability and later disconnects use the same serialized setup path. Missing SDKs and invalid configuration still fail explicitly.
A disconnected started session reports transient send failure before any native handoff. MEDRE owns delivery retries and their configured limits; connection recovery does not guarantee unlimited message retention or native delivery. Stopping the adapter cancels recovery before native teardown. Session stop clears the inbound callback before its first await, so inbound delivery ends when stop begins, even if the stop is cancelled mid-teardown. Native cancellation still depends on the pinned SDK and driver cooperating; this is not a process isolation boundary.
Direct one-shot MeshCoreSession.start() callers retain strict connection
failure by default; the production adapter explicitly requests degraded startup
with recover_on_failure=True.
Development
See contributing for the shared Trunk quality gate and uv-based editable development workflow. Maintainer material — packaging and provenance, ownership and imports, offline samples and diagnostics, tests, fake smoke sources, coordinated CI, and the adapter contract — lives in adapter maintenance.
Metadata
Release files for medre-adapter-meshcore 0.3.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 | Provenance | Actions |
|---|---|---|---|---|
| medre_adapter_meshcore-0.3.0.tar.gz | 258.3 kB | With provenance | Details for medre_adapter_meshcore-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| medre_adapter_meshcore-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for medre_adapter_meshcore-0.3.0-py3-none-any.whl |
Total release size: 343.0 kB
Release files / medre_adapter_meshcore-0.3.0.tar.gz
| Download URL | medre_adapter_meshcore-0.3.0.tar.gz |
|---|---|
| Size | 258.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7c6bd19bbdedf6345b7d81bff10b1372991a3e1fc3a9fe9485943e49ff5d6d2
|
|
BLAKE2b-256 checksum How to use checksums |
d8af9567b72de8ba29686d1dbe899e88a1fdc69bc7ee112037422d4327ea8c0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 28, 2026.
Transparency logRelease files / medre_adapter_meshcore-0.3.0-py3-none-any.whl
| Download URL | medre_adapter_meshcore-0.3.0-py3-none-any.whl |
|---|---|
| Size | 84.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
870cfc5da3a945022eeefd2c6240e6a27dcbbf302f8a7b4538975837ece56d0c
|
|
BLAKE2b-256 checksum How to use checksums |
b71d0baec1e73eae9940fc2161e2f62d2c0451884dcd1855697e59cea4071f54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 28, 2026.
Transparency logSecurity for medre-adapter-meshcore 0.3.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for medre_adapter_meshcore-0.3.0.tar.gz
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 Nov 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.