Listed from the MCP registry; nobody on Odel publishes it.

MCP server: One MCP server.

DAQiFi

@daqifiMCP server · External

Discover, configure and read DAQiFi Nyquist data-acquisition hardware from an AI agent

Freeno charge per call

Runs on your machine from its package; the steps are below.

What it does

  1. Reads
  2. Writes
  3. High impact

At most: moves money, runs code or commands, deletes data, or sends messages for you.

What it costs

Free

Odel charges nothing per call. The publisher may charge for its own service.

Runs locally over stdio

This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).

NuGetDaqifi.Mcpv2.0.0

Published to NuGet as `Daqifi.Mcp` — run it with your .NET MCP host.

README16 min read

DAQiFi Core

Revolutionizing the data collection experience with convenient, portable device connectivity.

The official cross-platform .NET SDK for DAQiFi wireless data acquisition devices.

NuGet Downloads Build License: MIT .NET Platforms

daqifi.com · DAQiFi Desktop · Report an issue


What is DAQiFi Core?

DAQiFi builds wireless data acquisition hardware designed to get out of the way so you can focus on the data, not the collection process.

DAQiFi Core is how you integrate that hardware into your own .NET applications — custom dashboards, automated test rigs, research pipelines, production-monitoring tools. Discover devices, connect over WiFi or USB, stream samples in real time, configure networks, push firmware updates — all from one async, strongly-typed .NET API.

Prefer a ready-made GUI? Check out DAQiFi Desktop, which is built on top of this library.

Want to drive a device from an AI assistant? The repo also ships an MCP server — point Claude, Cursor, Codex, or any MCP-aware client at it to discover, configure channels, drive digital I/O, PWM and analog outputs, set the sample rate, and run SD-card logging — then list, download, and CSV the recorded data back — through plain conversation.

See it in 30 seconds

shell
dotnet add package Daqifi.Core
csharp
using Daqifi.Core.Device;
using Daqifi.Core.Channel;

// Connect — transport and device initialization handled for you.
await using var device = await DaqifiDeviceFactory.ConnectTcpAsync("192.168.1.100", 9760);

// Subscribe to decoded, per-channel samples
var ai0 = device.GetChannelsSnapshot().First(c => c.Type == ChannelType.Analog && c.ChannelNumber == 0);
ai0.SampleReceived += (_, e) => Console.WriteLine($"{e.Sample.Timestamp}: {e.Sample.Value} V");

// Enable channel 0, then stream at 100 Hz
device.EnableChannel(ai0);
device.SampleRateHz = 100;
device.StartStreaming();

// Let samples arrive for a while before the device is disposed
await Task.Delay(TimeSpan.FromSeconds(10));

A real, working program — no GUI required. Prefer the raw protobuf frame instead? Subscribe to device.MessageReceived — see Streaming Data.

Common applications

DAQiFi hardware is in the field for work like:

  • Research labs — moon regolith testing and similar materials studies
  • Medical R&D — prosthetic socket pressure testing
  • Industrial monitoring — wireless multi-channel sensing
  • Engineering education — SCPI command structure and LabVIEW compatibility
  • Test automation — scripted benchtop measurements

More examples at daqifi.com.

Where DAQiFi Core fits

LayerWhat it is
HardwareNyquist 1 / Nyquist 3 — wireless DAQ devices (and their on-device firmware)
SDKDAQiFi Core — this library
AppDAQiFi Desktop — GUI built on this SDK
AgentMCP server — drive a device from Claude / Cursor / any MCP client: discover, configure channels, DIO/PWM/analog output, SD logging, and SD data retrieval
Your codeCustom apps, dashboards, pipelines, test rigs

What you can do

CapabilityWhat it gives you
Auto-discoveryFind any DAQiFi on WiFi or USB in seconds — no IP hunting, no config files
One-line connectDaqifiDeviceFactory.ConnectTcpAsync(...) wraps transport setup and device init; retries are opt-in via DeviceConnectionOptions
Real-time streamingPer-channel IChannel.SampleReceived events with decoded, scaled values — or subscribe to the raw protobuf frame directly; no polling loops to write
Acquisition healthAttach AcquisitionStatistics to a stream and read back the rate you are really getting, per-channel jitter, value range, and how far behind the device's clock the host is
Record to CSVdevice.RecordLiveSamplesToCsvAsync(writer) writes a live stream to CSV as it arrives — no buffering the session in memory — and reports what reached the file and what was dropped
Digital I/OSet any DIO pin as input or output and drive outputs high/low; inputs stream alongside analog data
PWM outputsDrive PWM on capable DIO pins with per-channel duty cycle and a shared, device-wide frequency
SD card operationsList, download, and delete files over USB / serial, or over WiFi / TCP on firmware ≥ 3.7.0; format the card; start (USB / serial only) and stop SD logging
Network configurationPush WiFi credentials and static LAN IPs from your app
Firmware updatesPIC32 and WiFi-module flashing with progress, cancellation, and automatic recovery to a clean re-flashable bootloader state on mid-flash failure
Cross-platform.NET 10.0 on Windows, macOS, Linux

Quick recipes

Connection options

Pick whichever transport fits your setup — each snippet is a standalone, copy-paste-ready starting point.

TCP with a resilient retry preset (5 attempts, longer timeouts):

csharp
await using var device = await DaqifiDeviceFactory.ConnectTcpAsync(
    "192.168.1.100", 9760, DeviceConnectionOptions.Resilient);

Serial / USB:

csharp
// Replace with your OS-specific port:
//   Windows: "COM3"   •   macOS: "/dev/cu.usbmodem1"   •   Linux: "/dev/ttyACM0"
await using var device = await DaqifiDeviceFactory.ConnectSerialAsync("COM3");

From a discovered device:

csharp
using var finder = new WifiDeviceFinder();
var devices = await finder.DiscoverAsync(TimeSpan.FromSeconds(5));
await using var device = await DaqifiDeviceFactory.ConnectFromDeviceInfoAsync(devices.First());

Custom retry options

csharp
using Daqifi.Core.Communication.Transport;
using Daqifi.Core.Device;

var options = new DeviceConnectionOptions
{
    DeviceName = "My DAQiFi",
    ConnectionRetry = new ConnectionRetryOptions
    {
        MaximumAttempts = 3,
        ConnectionTimeout = TimeSpan.FromSeconds(10)
    },
    InitializeDevice = true
};
await using var device = await DaqifiDeviceFactory.ConnectTcpAsync("192.168.1.100", 9760, options);

Connecting takes control of the device. A DAQiFi unit has a single global acquisition, and the default connect sequence stops it — so connecting to a device another session is already streaming silently ends that session's data. Use DeviceConnectionOptions.Observing for a secondary session that only needs to look, and DaqifiDeviceRegistry to avoid opening the same unit twice in one process. See Connecting stops any stream already running.

Device discovery

csharp
using Daqifi.Core.Device.Discovery;

// WiFi — UDP broadcast on port 30303 by default
using var wifiFinder = new WifiDeviceFinder();
wifiFinder.DeviceDiscovered += (_, e) =>
    Console.WriteLine($"Found: {e.DeviceInfo.Name} at {e.DeviceInfo.IpAddress}");

var wifiDevices = await wifiFinder.DiscoverAsync(TimeSpan.FromSeconds(5));

// USB / Serial
using var serialFinder = new SerialDeviceFinder();
var serialDevices = await serialFinder.DiscoverAsync();

On a home or multi-AP network, browse with mDNS as well. UDP broadcast does not reliably cross an access-point boundary — a device associated to a second AP is online and healthy, yet the broadcast sweep returns nothing — so MdnsDeviceFinder browses the _daqifi._tcp.local. service over multicast instead, which is the traffic consumer routers already reflect across APs, SSIDs and VLANs. It produces the same IDeviceInfo shape, so anything that connects to a broadcast-discovered device connects to an mDNS-discovered one unchanged.

csharp
using var mdnsFinder = new MdnsDeviceFinder();
var mdnsDevices = await mdnsFinder.DiscoverAsync(TimeSpan.FromSeconds(5));

Run both — devices on firmware without an mDNS responder are still found over UDP broadcast, so the two paths together cover more networks than either alone:

csharp
using var finder = new AllTransportsDeviceFinder(
    [new WifiDeviceFinder(), new MdnsDeviceFinder(), new SerialDeviceFinder()],
    identitySelector: device => device.SerialNumber);

var devices = await finder.DiscoverAsync(TimeSpan.FromSeconds(5));

The identitySelector is what collapses a board that answers on both network paths into a single entry. Without one, the default per-transport identity prefers the MAC address, which the broadcast reply carries and the mDNS advertisement does not, so the same board is reported twice — as two entries that are both genuinely connectable, but still two.

Two caveats worth knowing: the device must be on firmware that advertises the service (see daqifi-nyquist-firmware#345), and some hardened corporate or guest networks filter multicast entirely — connect by IP address directly when they do.

The timeout is a normal end of the pass: you get whatever was found by then. Cancelling is not — it throws OperationCanceledException. Pass both to let a user abandon a pass early:

csharp
using var cts = new CancellationTokenSource(); // cancelled by your "Stop" button
var devices = await wifiFinder.DiscoverAsync(TimeSpan.FromSeconds(10), cts.Token);

using var customFinder = new WifiDeviceFinder(discoveryPort: 12345);

Acquisition statistics

"Am I actually getting 1 kHz?" — attach an AcquisitionStatistics for the duration of a stream and read a snapshot whenever you want the answer. It observes the same per-channel sample events streaming already raises, so nothing changes for consumers that do not attach one.

csharp
using Daqifi.Core.Device;

using var stats = new AcquisitionStatistics(device);

device.SampleRateHz = 1000;
device.StartStreaming();
await Task.Delay(TimeSpan.FromSeconds(5));
device.StopStreaming();

var snapshot = stats.Snapshot();
foreach (var channel in snapshot.Channels)
{
    Console.WriteLine(
        $"{channel.Name}: {channel.SampleCount} samples, " +
        $"{channel.MeasuredSampleRateHz:F1} Hz measured vs {channel.DeviceClockSampleRateHz:F1} Hz by the device clock, " +
        $"{channel.MinimumValue:F3}..{channel.MaximumValue:F3} V, worst gap {channel.MaximumSampleInterval.TotalMilliseconds:F2} ms");
}

The two rates are reported side by side on purpose. Both dropping below the commanded rate means samples went missing; the two disagreeing means the device's own clock is not keeping real time, and it is MeasuredSampleRateHz that describes what your application actually received. Reset() starts a fresh window mid-session, and stats.Record(sample) feeds one by hand from StreamSamplesAsync instead of attaching.

Record a live stream to CSV

Streaming and exporting used to be two halves with nothing between them. RecordLiveSamplesToCsvAsync joins them: it writes rows through CsvExporter as frames decode, so the recording's memory does not grow with its length, and it hands back what reached the file and what did not.

csharp
using Daqifi.Core.Export;

device.SampleRateHz = 100;
device.StartStreaming();

await using var writer = new StreamWriter("run.csv");
var result = await device.RecordLiveSamplesToCsvAsync(writer, duration: TimeSpan.FromSeconds(30));

device.StopStreaming();

Console.WriteLine($"{result.RowCount} rows from {result.SampleCount} samples");
if (result.DroppedSampleCount > 0)
{
    Console.WriteLine($"{result.DroppedSampleCount} samples dropped — raise bufferCapacity or lower the rate");
}

The columns are the channels that were enabled when the call started, in device order. duration elapsing is a clean finish — the last frame is written and the result comes back; cancelling the CancellationToken is an abort and throws, so a recording cut short is never mistaken for a complete one. Need the rows somewhere other than a TextWriter? Build a LiveStreamSampleSource over StreamSamplesAsync and hand it to CsvExporter (or any other ISampleSource consumer) yourself.

Columns are named {device name}:{serial number}:{channel}, with the serial in decimal. To export a downloaded SD-card log under the same column names, give it the device's name, which the log does not record:

csharp
await using var log = File.OpenRead(path);
var session = await SdCardLogFile.ParseAsync(log, "run.csv", SdCardParseOptions.ForDevice(device));
var source = session.AsSampleSource(SdCardDeviceConfiguration.FromDevice(device), device.Name);
await new CsvExporter().ExportAsync(source, writer, new CsvExportOptions());

A device connected through discovery is named after what that transport reported (a part number over USB, a host name over WiFi). Set DeviceConnectionOptions.DeviceName to keep one name everywhere, or join on the serial number, which is the same in every export.

Digital output

Digital channels default to inputs. Flip one to output and drive it — the level is applied immediately, and flipping back to input releases the pin to high-impedance.

csharp
using Daqifi.Core.Channel;

var channels = device.GetChannelsSnapshot();
var dio3 = channels.OfType<IDigitalChannel>().First(c => c.ChannelNumber == 3);

device.SetDioDirection(dio3, ChannelDirection.Output);
device.SetDioValue(dio3, true);   // drive high
device.SetDioValue(dio3, false);  // drive low

device.SetDioDirection(dio3, ChannelDirection.Input); // back to a streamed input

These calls send and return; none of them waits for the device. Where the interface has an ...Async member (StartStreamingAsync, StopStreamingAsync, RebootAsync and the calibration commands), it completes once the device has confirmed the command — see IStreamingDevice.

PWM output

PWM runs on capable DIO pins (IDigitalChannel.IsPwmCapable — channels 0, 3, 4, 5, 6 and 7 on Nyquist hardware). Duty cycle is per channel; the frequency is shared by all PWM channels, since one hardware timer drives them all.

csharp
using Daqifi.Core.Channel;

var pwm = device.GetChannelsSnapshot()
    .OfType<IDigitalChannel>()
    .First(c => c.IsPwmCapable);

device.SetPwmDutyCycle(pwm, 25);  // 1-100 percent
device.SetPwmFrequency(1000);     // device.PwmFrequencyFloorHz up to 50000 Hz, applies to every PWM channel
device.SetPwmEnabled(pwm, true);  // start

device.SetPwmDutyCycle(pwm, 75);  // duty changes take effect live

device.SetPwmEnabled(pwm, false); // stop — the pin is left high-impedance

IDigitalChannel.Mode gives the pin's one mode — Input, Output or Pwm — and changes only once the command has been sent. Core records PWM as off when a connection ends, because the device stops PWM if it restarts and Core cannot tell; a device that only lost the link keeps its PWM running. After a reconnect, call SetPwmEnabled again (true to carry on, false to stop).

Network configuration

DaqifiStreamingDevice implements INetworkConfigurable for programmatic WiFi and LAN configuration. Mode, Ssid, SecurityType, and (for a WPA network, the default) Password are always applied on every call; only StaticIpAddress, SubnetMask, and Gateway honor null as "leave unchanged" — so DHCP-only callers can omit the static-IP fields without affecting their DHCP setup.

csharp
using System.Net;
using Daqifi.Core.Device.Network;

var config = new NetworkConfiguration
{
    Ssid            = "MyNetwork",
    Password        = "secret",
    Mode            = WifiMode.ExistingNetwork,
    StaticIpAddress = IPAddress.Parse("192.168.1.42"),
    SubnetMask      = IPAddress.Parse("255.255.255.0"),
    Gateway         = IPAddress.Parse("192.168.1.1"),
};
await device.UpdateNetworkConfigurationAsync(config);

To show the settings the device has, read device.Metadata.Ssid, WifiInfrastructureMode (WifiMode?) and WifiSecurityMode (WifiSecurityType?). They come from the status message the device sends at connect; the two modes are null if it did not report them, or reported a value this version does not know. Applying a configuration does not change them, and the device never reports the password.

On firmware v3.9.0 and later, IWifiLinkStatusProvider (also implemented by DaqifiStreamingDevice) reports whether the change actually took: GetWifiLinkStateAsync() returns the live link state (Connected, AccessPointIdle, NoLink, Initializing, InitializationFault, or Unavailable while WiFi is off or the device is in standby), and GetActiveWifiModeAsync() returns the mode the radio is running rather than the staged one (null when none is up). Over a WiFi connection the apply usually drops the control link, so poll these over USB. Older firmware gets a FeatureNotSupportedException; check device.Supports(DeviceFeature.WifiLinkStatus) first.

csharp
if (device.Supports(DeviceFeature.WifiLinkStatus))
{
    var state = await device.GetWifiLinkStateAsync();
    var mode  = await device.GetActiveWifiModeAsync();
}

Firmware updates

IFirmwareUpdateService orchestrates both PIC32 and WiFi-module flashing with explicit state transitions and IProgress<FirmwareUpdateProgress> for UI / CLI reporting.

  • UpdateFirmwareAsync(...) — PIC32 firmware flashing from a local Intel HEX file. Pass a FirmwareUpdateTarget to name the board when more than one is in its bootloader.
  • UpdateWifiModuleAsync(...) — WiFi module flashing via an external tool runner. Automatically checks the device's current WiFi-chip firmware against the latest GitHub release and skips the flash if already up to date; WifiUpdateOptions.SkipVersionCheck flashes regardless.

Safe failure cleanup (PIC32). If a PIC32 update fails — or is canceled — after the erase command has been sent (in ErasingFlash, Programming, or Verifying) and the HID bootloader is still connected, the service automatically re-erases the application flash so the device is never abandoned half-flashed: a half-flashed image would otherwise boot into garbage on the next power cycle, recoverable only by the physical button-hold procedure. A failure or cancel in ErasingFlash before the erase command is sent leaves the existing firmware untouched: nothing is re-erased, and the update ends in Failed with Pic32FlashCondition.NotChanged. The flow surfaces two extra states:

  • CleaningUp — the re-erase is running; progress percent stays frozen at the failure point (never 100) so a percent-only UI can't mistake cleanup for success
  • Recovered — terminal: the update failed (the call still throws), but the device is in a clean bootloader state and safe to simply re-flash

FirmwareUpdateException.RecoveryGuidance tells the operator whether to just re-run the update (Recovered) or power-cycle into bootloader mode first (cleanup couldn't run — the device may be half-flashed). FirmwareUpdateException.FailedState always reports where the original failure occurred, independent of cleanup outcome.

Note: The default WiFi flash tool config uses winc_flash_tool.cmd conventions. On macOS / Linux, supply a compatible executable and argument template via FirmwareUpdateServiceOptions.

Supported devices

DeviceChannelsResolutionRange
Nyquist 116 analog in12-bit0–5 V
Nyquist 38 analog in18-bit±10 V

These are auto-detected by part number during discovery. The SDK also recognizes and supports Nyquist 2 (Nq2 → DeviceType.Nyquist2); it's left out of the spec table above rather than listed with fabricated headline numbers. For any connected device the authoritative channel counts, resolution, and ranges are reported by the hardware and surfaced on device.Metadata.Capabilities after initialization.

Don't have one yet? See the DAQiFi lineup →

Connection types

  • WiFi — discovered via UDP broadcast (port 30303), and via mDNS (_daqifi._tcp.local., UDP 5353 multicast) when you add MdnsDeviceFinder
  • Serial — USB-connected, enumerated as serial ports
  • HID — used during firmware updates; HidSharp on Windows and Linux, native IOKit on macOS (HidSharp enumerates no HID devices there — #262)

Requirements

  • .NET 10.0 or later on Windows, macOS, or Linux
  • WiFi discovery: UDP port 30303 (broadcast) reachable, plus UDP 5353 multicast (224.0.0.251) if you use MdnsDeviceFinder — firewall may need configuring; admin may be required on Windows
  • Serial discovery: appropriate USB drivers for your platform

Supported frameworks

DAQiFi Core targets net10.0 (an LTS release) and nothing else. .NET Framework, Unity and other netstandard hosts are not supported. Adding a target framework is a minor release; dropping one is a major release.

The assembly is marked trimmable and NativeAOT-compatible, and the build enforces that for its own code. Two dependencies make no such promise: HidSharp (firmware update on Windows and Linux) and System.Management (USB port lookup on Windows). Test those paths in your published app before relying on them. A trimmed app that reaches this library's types by reflection (a XAML reflection binding, for example) must keep them with <TrimmerRootAssembly Include="Daqifi.Core" />.

Assemblies are not strong-named and will not be. ADR 0003 has the reasoning.

Upgrading from 1.x

2.0 removes, renames and re-types public members. Migrating from 1.x to 2.0 has the changes most callers need, with code, and a row for every changed member.

Community & support

  • Open an issue for bugs or feature requests
  • Reach the team via daqifi.com for commercial integrations and custom hardware needs
  • Sending a patch? CONTRIBUTING.md covers how main is gated, the style rules the build enforces, and PublicAPI tracking; SECURITY.md covers reporting a vulnerability

For maintainers

This library follows semantic versioning. Releases are automated via GitHub Actions:

  1. Create a new GitHub Release
  2. Tag it vX.Y.Z (pre-releases use -alpha.1, -beta.1, -rc.1 suffixes)
  3. Publishing to NuGet happens automatically on release
  4. After a stable release, run python3 scripts/post-release.py X.Y.Z and open a PR with the result (CONTRIBUTING.md)

The same release also packs and publishes the Daqifi.Mcp MCP server as a .NET tool (dotnet tool install -g Daqifi.Mcp), and, unless it is a pre-release, lists that version in the official MCP Registry as io.github.daqifi/daqifi-mcp so MCP clients can find it without going through this README. The listing is published from src/Daqifi.Mcp/.mcp/server.json, whose committed version is a placeholder that the release stamps from the tag.

Both packages are also attached to the GitHub Release with a build-provenance attestation. Check a package downloaded from there (nuget.org re-signs its copy, so that one has a different hash):

bash
gh attestation verify Daqifi.Core.X.Y.Z.nupkg --repo daqifi/daqifi-core

Semver here tracks source compatibility, not binary compatibility. Snapshot, result and progress types are nominal records (init properties, no positional constructor), so they gain fields without breaking either. Consumers who need binary compatibility across versions should recompile against each release rather than swap the DLL in place. See ADR 0002 for the reasoning.


Built by DAQiFi · Licensed under MIT

Similar modules

Browse Hardware & electronics