Daqifi.Core
0.18.2
See the version list below for details.
dotnet add package Daqifi.Core --version 0.18.2
NuGet\Install-Package Daqifi.Core -Version 0.18.2
<PackageReference Include="Daqifi.Core" Version="0.18.2" />
<PackageVersion Include="Daqifi.Core" Version="0.18.2" />
<PackageReference Include="Daqifi.Core" />
paket add Daqifi.Core --version 0.18.2
#r "nuget: Daqifi.Core, 0.18.2"
#:package Daqifi.Core@0.18.2
#addin nuget:?package=Daqifi.Core&version=0.18.2
#tool nuget:?package=Daqifi.Core&version=0.18.2
DAQiFi Core Library
The DAQiFi Core Library is a .NET library designed to simplify interaction with DAQiFi devices. It provides a robust and intuitive API for discovering, connecting to, and communicating with DAQiFi hardware, making it an ideal choice for developers building applications that require data acquisition and device control.
Features
✅ Available Now
- Device Discovery: Find DAQiFi devices connected via WiFi, USB/Serial, or HID bootloader mode
- Easy Connection: Single-call device connection with
DaqifiDeviceFactory - Data Streaming: Stream data from devices in real-time with event-driven API
- SD Card Operations: List, download, delete, and format SD card files; start/stop SD logging over USB/Serial connections (not available over WiFi)
- Firmware Update Orchestration: Programmatic PIC32 bootloader updates with state/progress reporting, timeout/retry handling, and cancellation support
- Transport Layer: TCP, UDP, and Serial communication with async/await patterns
- Protocol Buffers: Efficient binary message serialization for device communication
- Cross-Platform: Compatible with .NET 8.0 and .NET 9.0
🚧 In Development
- Channel Configuration: Advanced channel setup and calibration
Getting Started
Installation
dotnet add package Daqifi.Core
Quick Start: Connect and Stream
using Daqifi.Core.Device;
using Daqifi.Core.Communication.Producers;
// Connect to a device (handles transport, connection, and initialization)
using var device = await DaqifiDeviceFactory.ConnectTcpAsync("192.168.1.100", 9760);
// Subscribe to incoming data
device.MessageReceived += (sender, e) =>
{
if (e.Message.Data is DaqifiOutMessage message)
{
Console.WriteLine($"Timestamp: {message.MsgTimeStamp}");
Console.WriteLine($"Analog values: {string.Join(", ", message.AnalogInData)}");
}
};
// Configure channels and start streaming
device.Send(ScpiMessageProducer.EnableAdcChannels("0000000011")); // Enable first 2 channels
device.Send(ScpiMessageProducer.StartStreaming(100)); // 100 Hz sample rate
await Task.Delay(TimeSpan.FromSeconds(10)); // Stream for 10 seconds
device.Send(ScpiMessageProducer.StopStreaming);
Connection Options
// With retry options for unreliable networks
using var device = await DaqifiDeviceFactory.ConnectTcpAsync(
"192.168.1.100",
9760,
DeviceConnectionOptions.Resilient); // 5 retries, longer timeouts
// Connect from discovery result
var devices = await wifiFinder.DiscoverAsync(TimeSpan.FromSeconds(5));
using var device = await DaqifiDeviceFactory.ConnectFromDeviceInfoAsync(devices.First());
// Custom options
using Daqifi.Core.Communication.Transport; // For ConnectionRetryOptions
var options = new DeviceConnectionOptions
{
DeviceName = "My DAQiFi",
ConnectionRetry = new ConnectionRetryOptions
{
MaxAttempts = 3,
ConnectionTimeout = TimeSpan.FromSeconds(10)
},
InitializeDevice = true // Sends standard init commands
};
using var device = await DaqifiDeviceFactory.ConnectTcpAsync(ip, port, options);
Quick Start: Device Discovery
using Daqifi.Core.Device.Discovery;
// Discover WiFi devices on your network
using var wifiFinder = new WiFiDeviceFinder();
wifiFinder.DeviceDiscovered += (sender, e) =>
{
var device = e.DeviceInfo;
Console.WriteLine($"Found: {device.Name} at {device.IPAddress}");
Console.WriteLine($" Serial: {device.SerialNumber}");
Console.WriteLine($" Firmware: {device.FirmwareVersion}");
};
var devices = await wifiFinder.DiscoverAsync(TimeSpan.FromSeconds(5));
Console.WriteLine($"Discovery complete. Found {devices.Count()} device(s)");
// Discover USB/Serial devices
using var serialFinder = new SerialDeviceFinder();
var serialDevices = await serialFinder.DiscoverAsync();
foreach (var device in serialDevices)
{
Console.WriteLine($"Serial Port: {device.PortName}");
}
Advanced Discovery Options
// Use cancellation tokens for fine-grained control
using var cts = new CancellationTokenSource();
cts.CancelAfter(TimeSpan.FromSeconds(10));
try
{
var devices = await wifiFinder.DiscoverAsync(cts.Token);
}
catch (OperationCanceledException)
{
Console.WriteLine("Discovery was cancelled");
}
// Discover on custom UDP port (default is 30303)
using var customFinder = new WiFiDeviceFinder(port: 12345);
var customDevices = await customFinder.DiscoverAsync();
Supported Devices
The library automatically detects DAQiFi hardware:
- Nyquist 1: DAQiFi's data acquisition device
- Nyquist 3: DAQiFi's advanced data acquisition device
Both devices are identified by their part number in the discovery response.
Connection Types
- WiFi: Network-connected devices discovered via UDP broadcast
- Serial: USB-connected devices enumerated via serial ports
- HID: Devices in bootloader mode (HidSharp backend)
Firmware Update Orchestration
The core library exposes IFirmwareUpdateService for update orchestration:
UpdateFirmwareAsync(...)for PIC32 firmware flashing from a local Intel HEX fileUpdateWifiModuleAsync(...)for WiFi module flashing through an external tool runner
The service emits explicit state transitions and IProgress<FirmwareUpdateProgress> updates for UI/CLI telemetry.
Note: the default WiFi flash tool configuration uses winc_flash_tool.cmd conventions. If you run on macOS/Linux, provide a compatible executable/script and argument template via FirmwareUpdateServiceOptions.
Real-World Usage
This library powers the DAQiFi Desktop application and is designed for:
- Custom data acquisition applications
- Automated testing systems
- Industrial monitoring solutions
- Research and development tools
- Any application requiring DAQiFi device integration
Requirements
- .NET 8.0 or .NET 9.0
- For WiFi discovery: UDP port 30303 must be accessible (firewall configuration may be required)
- For Serial discovery: Appropriate USB drivers for your platform
- Admin privileges may be required for firewall configuration on Windows
Publishing
This library follows semantic versioning (MAJOR.MINOR.PATCH):
- MAJOR: Breaking changes
- MINOR: New features (backwards compatible)
- PATCH: Bug fixes
Releases are automated via GitHub Actions:
- Create a new GitHub Release
- Tag it with
vX.Y.Z(e.g.v1.0.0) - For pre-releases, use
-alpha.1,-beta.1,-rc.1suffixes - Publishing to NuGet happens automatically on release
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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 is compatible. 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. |
-
net8.0
- Google.Protobuf (>= 3.33.5)
- HidSharp (>= 2.6.4)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.3)
- System.IO.Ports (>= 10.0.3)
-
net9.0
- Google.Protobuf (>= 3.33.5)
- HidSharp (>= 2.6.4)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.3)
- System.IO.Ports (>= 10.0.3)
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.25.0 | 53 | 6/26/2026 |
| 0.24.1 | 42 | 6/25/2026 |
| 0.24.0 | 107 | 6/19/2026 |
| 0.23.0 | 134 | 6/12/2026 |
| 0.22.0 | 160 | 5/28/2026 |
| 0.21.0 | 165 | 5/2/2026 |
| 0.20.0 | 124 | 4/25/2026 |
| 0.19.7 | 135 | 4/25/2026 |
| 0.19.6 | 116 | 4/20/2026 |
| 0.19.5 | 174 | 4/4/2026 |
| 0.19.4 | 180 | 3/20/2026 |
| 0.19.3 | 115 | 3/20/2026 |
| 0.19.2 | 131 | 3/16/2026 |
| 0.19.1 | 175 | 3/13/2026 |
| 0.19.0 | 131 | 3/11/2026 |
| 0.18.3 | 157 | 2/28/2026 |
| 0.18.2 | 125 | 2/28/2026 |
| 0.18.1 | 117 | 2/25/2026 |
| 0.18.0 | 141 | 2/21/2026 |
| 0.17.0 | 114 | 2/18/2026 |