Skip to main content

openHop Core

Documentation PyPI License

openHop Core is a Python reimplementation of MeshCore — a lightweight, portable C++ library for multi-hop packet routing using LoRa radios. Designed for Raspberry Pi and similar hardware, openHop Core communicates with LoRa modules over SPI.

openHop Core is under active development. It's compatible with the original MeshCore protocol, but not yet as optimized or elegant as its C++ counterpart.

Documentation

Complete documentation is available at docs.openhop.dev.

Quick Links

Quick Start

Installation

Important: On modern Python installations (Ubuntu 22.04+, Debian 12+), you may encounter externally-managed-environment errors when installing packages system-wide. Create a virtual environment first:

# Create virtual environment
python3 -m venv openhop_env

# Activate virtual environment
# On Linux/Mac:
source openhop_env/bin/activate
# On Windows:
openhop_env\Scripts\activate
# Install from PyPI
pip install openhop-core

# For hardware support (SX1262 radios)
pip install openhop-core[hardware]

# Install all dependencies
pip install openhop-core[all]

Basic Usage

import asyncio
from openhop_core import MeshNode, LocalIdentity
from openhop_core.hardware.sx1262_wrapper import SX1262Radio

async def main():
    # Create radio (Waveshare HAT example)
    radio = SX1262Radio(
        bus_id=0, cs_pin=21, reset_pin=18,
        busy_pin=20, irq_pin=16, txen_pin=6,
        frequency=869525000, tx_power=22
    )
    radio.begin()

    # Create mesh node
    identity = LocalIdentity()
    node = MeshNode(radio=radio, local_identity=identity)
    await node.start()

    print("Mesh node started!")

asyncio.run(main())

For examples, see the documentation.

Hardware Support

Supported Radios

  • Waveshare SX1262 LoRaWAN/GNSS HAT - Popular Raspberry Pi LoRa module
  • HackerGadgets uConsole - All-in-one extension board with LoRa support
  • FrequencyLabs meshadv-mini - Raspberry Pi hat with E22-900M22S LoRa module

Requirements

  • Raspberry Pi (or compatible SBC)
  • SX1262 LoRa module
  • SPI interface enabled
  • Python 3.10+

What is MeshCore?

MeshCore enables long-range, decentralized communication using multi-hop packet routing. Devices (nodes) forward packets through neighboring nodes to reach distant ones — no central infrastructure required.

It occupies a middle ground between:

Project Focus
Meshtastic Casual LoRa messaging
Reticulum Full encrypted networking stack

Use Cases

  • Off-grid and emergency communication
  • Tactical or field mesh deployments
  • IoT mesh networks
  • Remote monitoring systems

Architecture

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│   Application   │    │   MeshNode      │    │   Hardware      │
│                 │    │                 │    │                 │
│ • Text Messages │◄──►│ • Packet Routing│◄──►│ • SX1262 Radio  │
│ • Advertisements│    │ • Identity Mgmt │    │ • SPI Interface │
│ • Telemetry     │    │ • Event Service │    │ • GPIO Control  │
│ • Group Channels│    │ • Repeater Mgmt │    │                 │
└─────────────────┘    └─────────────────┘    └─────────────────┘

Security

  • Ed25519/X25519 cryptographic identities
  • End-to-end encryption for messages
  • CRC validation for data integrity
  • Secure key exchange protocols

Project Structure

openHop Core/
├── src/openhop_core/          # Main package
│   ├── hardware/           # Radio hardware interfaces
│   ├── node/               # MeshNode implementation
│   ├── protocol/           # Packet protocols
│   └── events/             # Event handling
├── examples/               # Working examples
│   ├── common.py           # Shared utilities
│   ├── send_flood_advert.py
│   ├── send_direct_advert.py
│   └── ...
├── .github/workflows/      # GitHub Actions
│   └── publish-pypi.yml    # Package test and publication pipeline
└── tests/                  # Unit tests

Contributing

Contributions are welcome! Please see our contributing guide for details.

Development Setup

# Clone the repository
git clone https://github.com/openhop-dev/openhop_core.git
cd openhop_core

# Install development dependencies
pip install -e .[dev]

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Original MeshCore C++ implementation
  • Waveshare and HackerGadgets for hardware support

Support


Built with ❤️ for mesh networking enthusiasts

Metadata

Release files for openhop-core 1.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openhop-core 1.1.3
File Size Uploaded
openhop_core-1.1.3.tar.gz 624.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for openhop-core 1.1.3
File Interpreter ABI Platform
openhop_core-1.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 1.0 MB

Release files / openhop_core-1.1.3.tar.gz

Download URL openhop_core-1.1.3.tar.gz
Size 624.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5082f55d5c81fc378f11cd95a8560b62b8554f9ca1f5e70375166933e2edb30f
BLAKE2b-256 checksum
How to use checksums
94c9947b586db542e7a2d2881fdb555d170f07143f48009fbe07a2933c487b7b
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 Sep 8, 2026.

Transparency log

Release files / openhop_core-1.1.3-py3-none-any.whl

Download URL openhop_core-1.1.3-py3-none-any.whl
Size 420.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb38aab1bf6e6254bdb682ae213f0ba8b306721e5afc701f10070e19676e92da
BLAKE2b-256 checksum
How to use checksums
a6ddac8167d3addcfe1d669ef1a76ef7f402c9754df7bcd24142f73d1bd1febb
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 Sep 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.3 This release

2 release files

1.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page