Packet.Rig.Hamlib
0.24.0
dotnet add package Packet.Rig.Hamlib --version 0.24.0
NuGet\Install-Package Packet.Rig.Hamlib -Version 0.24.0
<PackageReference Include="Packet.Rig.Hamlib" Version="0.24.0" />
<PackageVersion Include="Packet.Rig.Hamlib" Version="0.24.0" />
<PackageReference Include="Packet.Rig.Hamlib" />
paket add Packet.Rig.Hamlib --version 0.24.0
#r "nuget: Packet.Rig.Hamlib, 0.24.0"
#:package Packet.Rig.Hamlib@0.24.0
#addin nuget:?package=Packet.Rig.Hamlib&version=0.24.0
#tool nuget:?package=Packet.Rig.Hamlib&version=0.24.0
Packet.Rig.Hamlib
IRigControl over hamlib's NET rigctl
protocol — the TCP text protocol served by rigctld (default port 4532). Pure managed
sockets; no native libhamlib dependency, so no ABI churn, no per-RID native packaging, and
one client reaches every rig hamlib supports plus the ecosystem of rigctld-protocol emulators
(wfview, SDR++, GQRX, SparkSDR, skycatd, nCAT, …; only real rigctld is tested today).
await using var rig = await RigctldRig.ConnectAsync(new RigctldRigOptions
{
Host = "127.0.0.1",
Port = 4532,
});
Console.WriteLine($"{rig.Info.Manufacturer} {rig.Info.Model}"); // from \dump_caps
await rig.SetFrequencyAsync(14_074_000);
await rig.SetModeAsync(RigMode.PktUsb, passbandHz: 3000);
var swr = await rig.ReadSwrAsync();
var watts = await rig.ReadRfPowerWattsAsync(); // hamlib ≥ 4.4 rigs
var busy = await rig.ReadDcdAsync(); // \get_dcd — channel busy?
var dbm = await rig.ReadSignalStrengthDbmAsync(); // STRENGTH + S9 reference
// Escape hatches below the common subset:
var alc = await rig.ReadLevelAsync("ALC");
var vfo = await rig.TransactRawAsync("v");
Behaviour notes
- Every command uses hamlib's Extended Response Protocol (deterministic
RPRT nterminators).\chk_vfois probed at connect, so daemons running--vfowork transparently (currVFOis injected). - Capabilities and identity come from
\dump_capsat connect. Advertised capabilities are the backend's statement of intent — a rig can still reject at runtime, surfacing asRigCommandExceptionwith the hamlib error name (RIG_ENAVAIL (-11)…). ReadSignalStrengthDbmAsyncconverts hamlib'sSTRENGTHlevel (calibrated dB relative to S9) to dBm by addingRigctldRigOptions.S9ReferenceDbm. The default −73 dBm is the IARU Region 1 HF convention; VHF/UHF stations conventionally use −93 — set the option accordingly.- One TCP connection, commands serialised in arrival order. On any transport fault, timeout, or cancellation mid-command the connection is dropped and the next command re-dials — rigctld holds all rig state, so redial is free.
- If this client keyed the transmitter, disposal sends a best-effort unkey (
T 0) first. - rigctld has no authentication — the default host is loopback on purpose.
Testing your consumer
The dummy rig is the ecosystem's standard harness: rigctld -m 1 --set-conf=static_data=1
serves a stateful fake Kenwood-ish rig (fresh state 145 MHz / FM; deterministic meters:
RFPOWER_METER 0.5, RFPOWER_METER_WATTS 50.0). This package's own integration tests do exactly
that and skip when rigctld is not installed (apt install libhamlib-utils).
AGPL-3.0-licensed. Part of the Packet.NET stack.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Packet.Rig (>= 0.24.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.