pamoja-lora
Time-on-air, duty-cycle off-time, the regional channel plans a LoRa node must keep to, and the link budget that sets its range. One capability of pamoja, one memory-safe Rust core with bindings for TypeScript, Python, and C#.
Install
pip install pamoja-lora
from pamoja import lora
This pulls in pamoja-native, the compiled engine. pip install pamoja is the whole framework in one package.
Example
The script the test suite runs, spliced here as it ran.
From bindings/python/guides/lora.py:
from pamoja.lora import messages_per_hour, plan_for
# EU863-870 numbers its data rates from the slowest. DR0 is SF12 at 125 kHz, the setting
# that reaches furthest and holds the channel longest.
plan = plan_for("EU868")
link = plan.link_settings(0)
print(f"{plan.name} DR0 is SF{link.spreading_factor} at 125 kHz")
# The time on air for that setting, coding rate 4/5, an eight-symbol preamble, an explicit
# header and CRC on, carrying a ten-byte reading.
airtime = link.airtime_us(10)
print(f"airtime {airtime / 1e6:.2f} s for ten bytes")
# 868.1 MHz falls in a sub-band capped at 1% of the time and 16 dBm, so every transmission
# buys ninety-nine times its own length in silence.
channel = 868_100_000
permille = plan.duty_cycle_permille(channel)
print(f"channel {permille} per mille duty cycle, {plan.max_eirp_dbm(channel)} dBm")
off_time = link.min_off_time_us(10, permille)
print(f"silence {off_time / 1e6:.1f} s owed after each reading")
# The airtime plus that silence is what one reading really costs, which is the budget a
# deployment plans against.
print(f"budget {messages_per_hour(link, 10, permille)} readings an hour")
# A frequency in no sub-band the plan describes has no duty cycle to budget against. That
# is a limit published elsewhere, not permission to transmit.
outside = plan.duty_cycle_permille(700_000_000)
elsewhere = (
"in no sub-band of this plan, so its limit is published elsewhere"
if outside is None
else f"limited to {outside} per mille"
)
print(f"700 MHz {elsewhere}")
The same capability in every language
| Language | Package | Reference |
|---|---|---|
| Rust | pamoja-lora |
reference, docs.rs, install |
| TypeScript | @pamoja/lora |
reference, install |
| Python | pamoja-lora |
reference, install |
| C# | Pamoja.Lora |
reference, install |
Documentation
pamoja.lorareference, every class and function in this module.- The LoRa airtime and range guide, with the same example in Rust, TypeScript, and C#.
- Every capability, and the install page.
License
MIT
Release files for pamoja-lora 0.2.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 | |
|---|---|---|---|
| pamoja_lora-0.2.0.tar.gz | 6.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pamoja_lora-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.2 kB
Release files / pamoja_lora-0.2.0.tar.gz
| Download URL | pamoja_lora-0.2.0.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6dfb35c042f2e1652dcf1a0864070f207b6ae07245a713e77f69b6264df9c094
|
|
BLAKE2b-256 checksum How to use checksums |
6a7e8a7171c451ac4916b50f55ec917a591e78fa946f437e4f85325e9a8b865b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / pamoja_lora-0.2.0-py3-none-any.whl
| Download URL | pamoja_lora-0.2.0-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2e1cccebaca5d9a4bf5201dae105c1d79c1ed6610504cf7def5884e47b65b737
|
|
BLAKE2b-256 checksum How to use checksums |
7214ed81ed461e18c3f27347e5dc1a94ca2d82305b71ac85521fa8b49dc48517
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|