YaesuAccScope 0.4.1

dotnet add package YaesuAccScope --version 0.4.1
                    
NuGet\Install-Package YaesuAccScope -Version 0.4.1
                    
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="YaesuAccScope" Version="0.4.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="YaesuAccScope" Version="0.4.1" />
                    
Directory.Packages.props
<PackageReference Include="YaesuAccScope" />
                    
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 YaesuAccScope --version 0.4.1
                    
#r "nuget: YaesuAccScope, 0.4.1"
                    
#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 YaesuAccScope@0.4.1
                    
#: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=YaesuAccScope&version=0.4.1
                    
Install as a Cake Addin
#tool nuget:?package=YaesuAccScope&version=0.4.1
                    
Install as a Cake Tool

YaesuAccScope

A .NET library that reads a Yaesu FTdx101's own scope data from its ACC socket, through an ESP32-S3 running the firmware in this repo. It gives you, 25 times a second, the Main and Sub spectrum with their frequencies, and the audio scope. All of it comes from the radio's own data, with nothing from CAT.

It's .NET Standard 2.0, so it works in .NET 8 and later programs and in .NET Framework 4.6.1 and later ones.

Licence: LGPL-3.0. Your program can use the library without being GPL itself, closed-source included. If you change the library, you share those changes under the LGPL. See COPYING.LESSER and COPYING. The firmware and tools in the rest of this repo stay GPL-3.0.

Version 0.4.0, on nuget.org as YaesuAccScope:

dotnet add package YaesuAccScope

Or reference the project, or build the DLL from src/YaesuAccScope.

Use

using YaesuAccScope;

string? port = AccBoardFinder.Find();          // e.g. "COM6", or null
if (port == null) return;

using var reader = new AccSerialReader(port);
reader.FrameReceived += (_, e) =>
{
    ReceiverScope main = e.Frame.Main;          // VFO A
    if (!main.IsValid) return;
    byte[] levels = main.Levels;                // 850 points, higher is stronger
    double left = main.FrequencyAt(0);          // Hz
    double right = main.FrequencyAt(849);
    // draw levels from left to right...
};
reader.StatusReceived += (_, e) => Console.WriteLine(e.Status.Text);
reader.Failed += (_, ex) => Console.WriteLine("Lost the board: " + ex.Message);
reader.Start();

Raw or refined

Levels is the raw row, exactly as the radio sent it. Each row is a separate snapshot, so its noise floor is rough. For a trace a person looks at, use a ScopeRefiner for each receiver. It averages each point over the last few rows, follows the trace when the VFO moves, and starts again on a new span:

var mainRefiner = new ScopeRefiner();           // one per receiver

reader.FrameReceived += (_, e) =>
{
    float[] trace = mainRefiner.Add(e.Frame.Main);   // 850 points, same scale as Levels
    // draw trace...
};

The refined trace still comes 25 times a second. Against an SDRplay RSP on the radio's IF output, it showed more weak signals at the 1 and 2 kHz spans and from 200 kHz up, about as many from 5 to 20 kHz, and fewer at 50 and 100 kHz. The measurements are in docs/comparison.md, and the advice that comes from them in docs/best-picture.md. Use Levels for anything that measures.

The events come on the reader's own thread. Hand the work to your UI thread if you need to, and don't block: the frames come every 40 ms.

FTdx101 or FTDX10

FTDX10 support is the work of Eugene YO9VA (#80).

e.Frame.Radio says which radio the board is on, and e.Frame.HasSub is false on the FTDX10, which has no Sub receiver. The reader works it out from the frame's layout and keeps to it: it changes only after 5 frames in a row read as the other radio. If you decode frames yourself, an AccRadioSettler and AccFrame.Parse(bytes, radio) do the same.

From version 0.4.1 the audio scope's FftAttenuator, OscAttenuator and OscTime read right on the FTDX10 too: it keeps them in byte 3026, where the FTdx101 uses 3056 (found by Eugene, #83).

What it never does

  • It never writes to the board. A byte sent to the board can change its SPI mode, so a program using the library can't do that.
  • It opens the port with DTR and RTS low. A DTR/RTS sequence on the ESP32-S3's own USB port resets the chip.
  • AccBoardFinder only opens ports with Espressif's USB vendor ID (303A). It finds them without opening anything: from the registry on Windows and from /sys on Linux. On macOS it tries the /dev/cu.usbmodem ports. So it never opens a radio's CAT port, where DTR or RTS can key the transmitter. AccSerialReader opens whatever port you give it, so pass it one that AccBoardFinder found.

What's in it

Class What it does
AccBoardFinder Lists Espressif ports, and listens on each for the board's packets: a status text or a frame. Up to 6 s a port, since a status text comes every 5 s
AccSerialReader Reads the port on its own thread and raises FrameReceived, StatusReceived and Failed. Counts frames and lost packets
AccPacketReader Splits the board's byte stream into packets, for when you read the bytes yourself or from a file. Finds its place again after bad bytes, and counts lost packets from the sequence numbers
AccFrame One frame decoded: Main and Sub (ReceiverScope), MainAudio and SubAudio (AudioScope), the Band button, and the raw bytes
ReceiverScope The 850 levels the right way up, the VFO, the span, Center/Cursor/Fix, the centre and edges in Hz, the frequency of each point, 3DSS, and the passband marker
ScopeRefiner Turns one receiver's raw rows into a refined trace for eyes: each point averaged over the last few rows, moved with the VFO in Center, and started again on a new span
AudioScope The AF-FFT (200 points, 20 Hz a point, 0 to 3,980 Hz) and the oscilloscope (200 columns of max and min), and the oscilloscope time and both attenuators, which the radio shares between Main and Sub
AccStatus The board's status text: firmware version, SPI mode, counts, and edges a second on each input for checking the wiring

How sure each part is

Tested on my own captures from my FTdx101MP, in captures/:

  • The packets, on a raw capture from the board, including a gap of 35 packets that the board's own status counted too.
  • Main and Sub: the VFO, the span at every span from 1k to 1M, and Center, Cursor and Fix.
  • The AF-FFT on Main (1 kHz and 2 kHz tones) and Sub (1 kHz), and the audio settings, set from either receiver.

Not tested yet:

  • The exact dB scale of the levels. Measured at about 0.42 dB a step (±10%) on 2026-11-14, with no absolute zero: they're the radio's display data after its scope LEVEL. See docs/comparison.md.
  • Anything while the radio transmits. Nothing here transmits.
  • The FTdx101D. It should be the same, but I've only got the MP.

The frame layout is in docs/protocol.md, so you can write a reader in any language without this library.

Build and test

dotnet test library/YaesuAccScope.slnx

The tests need the .NET 10 SDK, and read the captures in captures/.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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.4.1 479 11/21/2026
0.4.0 103 11/21/2026
0.3.0 375 11/16/2026
0.2.1 96 11/14/2026
0.2.0 223 11/12/2026