Pamoja.Lora
0.2.0
dotnet add package Pamoja.Lora --version 0.2.0
NuGet\Install-Package Pamoja.Lora -Version 0.2.0
<PackageReference Include="Pamoja.Lora" Version="0.2.0" />
<PackageVersion Include="Pamoja.Lora" Version="0.2.0" />
<PackageReference Include="Pamoja.Lora" />
paket add Pamoja.Lora --version 0.2.0
#r "nuget: Pamoja.Lora, 0.2.0"
#:package Pamoja.Lora@0.2.0
#addin nuget:?package=Pamoja.Lora&version=0.2.0
#tool nuget:?package=Pamoja.Lora&version=0.2.0
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
dotnet add package Pamoja.Lora
using Pamoja.Lora;
This pulls in Pamoja.Native, the compiled engine. dotnet add package Pamoja is the whole framework in one package.
Example
The guide project's example, spliced here as it ran in CI.
From bindings/dotnet/samples/Pamoja.Guides/LoraGuide.cs:
// 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.
using LoraChannelPlan plan = LoraChannelPlan.ForRegion(LoraRegion.Eu868);
LoraLink link = plan.LinkSettings(0)!;
Console.WriteLine($"{plan.Name} DR0 is SF{link.SpreadingFactor} 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.
ulong airtime = link.AirtimeMicros(10);
Console.WriteLine(Invariant($"airtime {airtime / 1e6:F2} 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.
const uint Channel = 868_100_000;
uint permille = plan.DutyCyclePermille(Channel)!.Value;
Console.WriteLine(
$"channel {permille} per mille duty cycle, {plan.MaxEirpDbm(Channel)} dBm");
ulong offTime = link.MinOffTimeMicros(10, permille)!.Value;
Console.WriteLine(Invariant($"silence {offTime / 1e6:F1} s owed after each reading"));
// The airtime plus that silence is what one reading really costs, which is the
// budget a deployment plans against.
Console.WriteLine($"budget {link.MessagesPerHour(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.
uint? outside = plan.DutyCyclePermille(700_000_000);
string elsewhere = outside is null
? "in no sub-band of this plan, so its limit is published elsewhere"
: $"limited to {outside} per mille";
Console.WriteLine($"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 type in this namespace.- The LoRa airtime and range guide, with the same example in Rust, TypeScript, and Python.
- Every capability, and the install page.
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Pamoja.Native (>= 0.2.0)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Pamoja.Lora:
| Package | Downloads |
|---|---|
|
Pamoja
The whole pamoja framework in one package: every capability of one memory-safe Rust core, behind an idiomatic C# facade, for IoT, robotics, and drones. |
|
|
Pamoja.Lorawan
LoRaWAN 1.0.x MAC framing, AES-CMAC and AES encryption, and both halves of the OTAA join. |
|
|
Pamoja.Radio
Radio and reach: Budgeting airtime, framing a mesh packet, routing it, and securing a LoRaWAN uplink: everything a node needs to reach a network it cannot see. |
|
|
Pamoja.Radios
The Semtech SX126x and SX127x LoRa radios and the SX1302 and SX1303 gateway concentrators: their commands, registers, and decoders, the amplifier setting a regional EIRP ceiling allows, a duty-cycle guard, and simulated chips that stand in for a module. |
|
|
Pamoja.Gateway
What a LoRaWAN gateway speaks: the Semtech packet forwarder protocol and the Basics Station protocol on both sides, the network side of a single site, and a bridge from the radio to the link that leaves it. |
GitHub repositories
This package is not used by any popular GitHub repositories.