SharpCAT/README.md
copilot-swe-agent[bot] c20d3a12bb Implement ASP.NET Core Web API server for SharpCAT with REST endpoints
Co-authored-by: ekinnee <1707617+ekinnee@users.noreply.github.com>
2025-08-06 23:26:53 +00:00

3.3 KiB

This like many, are ideas. There may or may not be progress as inspiration and time allows.

SharpCAT

C#, .NET Standard based CAT control library with ASP.NET Core Web API server.

I am targeting .Net Standard so that the assembly may be used with .Net Core or the .Net framework.

Components

SharpCAT Library

The core .NET Standard 2.0 library for CAT (Computer Aided Transceiver) control.

SharpCAT Server

A cross-platform ASP.NET Core Web API server that provides REST endpoints for CAT control operations. Located in Server/SharpCAT.Server/.

Key Features:

  • REST API for serial port management and CAT commands
  • Cross-platform support (Windows, Linux, macOS)
  • Swagger/OpenAPI documentation
  • Built-in error handling and logging

Quick Start:

cd Server/SharpCAT.Server
dotnet run

Then visit http://localhost:5188 for the Swagger UI.

Development Setup

Prerequisites

Building and Running

This project is configured for development in Visual Studio Code with the .NET CLI.

To build the entire solution:

dotnet build

To build just the library:

dotnet build SharpCAT/SharpCAT.csproj

To build and run the Web API server:

cd Server/SharpCAT.Server
dotnet run

To clean the project:

dotnet clean

To restore packages:

dotnet restore

VS Code Tasks: The repository includes pre-configured VS Code tasks (Ctrl+Shift+P → "Tasks: Run Task"):

  • build - Builds the project (default build task: Ctrl+Shift+B)
  • clean - Cleans build outputs
  • restore - Restores NuGet packages
  • publish - Publishes the library
  • watch - Watches for changes and rebuilds automatically

I'm starting with the FT818, I then plan on adding my ID-4100a, and TH-D74A.

If you wish to help let me know, or create a pull request. I'm not a pro developer, just a hack that normally builds small tools for himself.

Ideas on how to do this are appreciated!

Why?

Yes, there's Hamlib, and yes there's HamLibSharp.

https://github.com/N0NB/hamlib

https://github.com/k5jae/HamLibSharp

I don't speak C++ and PInvoke is nasty.

That being said, there's also not a pure .Net (C#) CAT control lib out there that I know of.

What needs done?

The project is in an early very phase. The following is in no particular order, except the IRadio bit.

  1. Implement an IRadio interface.

  2. Settle on how the radios and commands are defined.

    JSON?

    Or just use a .cs file (current)?

  3. Need to support opening / using an arbitrary number of radios.

    RigControl can do 2.

  4. Fully support asynchronous operations.

    There's some handy events exposed by .net for data received on the Serial Port.

  5. Add support for remote sharing of serial ports.

  6. Implemtment the flrig control protocol.

    Use this in place of flrig if desired.

  7. Maybe implement AGWPE?

  8. Implement the ability to run as a service.

  9. Implement CAT and CIV control.

    This will come with the first Icom radio implemented I figure.

    I've switched radios, so I have a Yaesu FT991a, Baofeng BF-T1, WLN KD-C1, Baofeng UV-5x3, TH-D72a, FT-2DR and an D878UV.