Packet.Agw
0.25.0
dotnet add package Packet.Agw --version 0.25.0
NuGet\Install-Package Packet.Agw -Version 0.25.0
<PackageReference Include="Packet.Agw" Version="0.25.0" />
<PackageVersion Include="Packet.Agw" Version="0.25.0" />
<PackageReference Include="Packet.Agw" />
paket add Packet.Agw --version 0.25.0
#r "nuget: Packet.Agw, 0.25.0"
#:package Packet.Agw@0.25.0
#addin nuget:?package=Packet.Agw&version=0.25.0
#tool nuget:?package=Packet.Agw&version=0.25.0
Packet.Agw
AGW (AGWPE / SV2AGW) client for talking to LinBPQ, direwolf, SoundModem, and XRouter.
Packet.Agw dials an AGW server over TCP, registers your callsign, and opens AX.25 connected-mode sessions — each exposed as a plain .NET Stream. AGW (SV2AGW's PE+ protocol) is the canonical interop interface for software AX.25 stacks, so this is the easy way to drive a packet TNC from C# without owning the radio layer yourself. Part of Packet.NET, a .NET amateur-radio / AX.25 packet stack.
Install
dotnet add package Packet.Agw
Quick start
Connect to an AGW server, register a callsign, open a connected-mode session, and read/write it like any other stream:
using System.Text;
using Packet.Agw;
// Dial the AGW listener (LinBPQ / direwolf / SoundModem default to port 8000).
await using var client = await AgwClient.ConnectAsync("127.0.0.1", port: 8000);
// Register the callsign the server should route inbound frames to.
await client.RegisterCallsignAsync("N0CALL");
// Open an AX.25 connected-mode session (sends SABM, awaits the connect-ack).
await using AgwSession session = await client.OpenSessionAsync(from: "N0CALL", to: "Q0PDN");
// AgwSession is a Stream: write bytes to send I-frames, read bytes from the remote.
await session.WriteAsync(Encoding.ASCII.GetBytes("ports\r"));
var buffer = new byte[256];
int n = await session.ReadAsync(buffer); // 0 == remote disconnected (EOF)
Console.WriteLine(Encoding.ASCII.GetString(buffer, 0, n));
await session.DisconnectAsync();
Writes larger than the per-frame cap (~256 bytes) are split into multiple data frames automatically. The default PID is 0xF0 ("no layer 3"); set session.DefaultPid to override (e.g. 0xCF for NET/ROM L3). client.GetPortInfoAsync() returns the server's configured radio ports.
Key types
AgwClient— connect-initiator over one TCP connection;ConnectAsync/FromStream,RegisterCallsignAsync,OpenSessionAsync,GetPortInfoAsync. Pumps a keepalive ping so idle servers (BPQ closes at ~20s) don't drop you.AgwSession— one connected-mode session as aStream;Read/Write,DefaultPid,DisconnectAsync,DisconnectedTask.AgwFrame— one frame on the wire (36-byte header + body);ToBytes,Parse,TryReadDataLength.AgwFrameStream— low-level frame I/O over any duplex byteStream; use it directly for raw frame access.AgwCommandKind— the AGW command-kind ASCII letters (Cconnect,Ddata,ddisconnect,Xregister,Gport-info, ...).
See also
- Source & issues
- Packet.Ax25 — the AX.25 frame + session layer
- Packet.Kiss — the KISS-TNC alternative when you own the radio layer
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
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.