Packet.Rig.Hamlib 0.23.0

dotnet add package Packet.Rig.Hamlib --version 0.23.0
                    
NuGet\Install-Package Packet.Rig.Hamlib -Version 0.23.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Packet.Rig.Hamlib" Version="0.23.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Packet.Rig.Hamlib" Version="0.23.0" />
                    
Directory.Packages.props
<PackageReference Include="Packet.Rig.Hamlib" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Packet.Rig.Hamlib --version 0.23.0
                    
#r "nuget: Packet.Rig.Hamlib, 0.23.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Packet.Rig.Hamlib@0.23.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Packet.Rig.Hamlib&version=0.23.0
                    
Install as a Cake Addin
#tool nuget:?package=Packet.Rig.Hamlib&version=0.23.0
                    
Install as a Cake Tool

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 n terminators). \chk_vfo is probed at connect, so daemons running --vfo work transparently (currVFO is injected).
  • Capabilities and identity come from \dump_caps at connect. Advertised capabilities are the backend's statement of intent — a rig can still reject at runtime, surfacing as RigCommandException with the hamlib error name (RIG_ENAVAIL (-11) …).
  • ReadSignalStrengthDbmAsync converts hamlib's STRENGTH level (calibrated dB relative to S9) to dBm by adding RigctldRigOptions.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).

Part of Packet.NET.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.23.0 37 7/14/2026
0.22.0 40 7/14/2026