doc/help/Data-Sources.md
Serial Studio connects to hardware and software data sources through nine driver types. Three are available in the free GPL edition; six additional drivers require a Pro license. Each driver runs on a dedicated thread and feeds raw bytes into the frame-parsing pipeline.
All drivers share a common interface (HAL_Driver) that provides open(), close(), write(), isOpen(), configurationOk(), and dataReceived(). The active driver is selected in the Setup Panel or, for multi-device projects, in the Project Editor.
The following diagram shows the driver architecture and how each driver feeds into the data pipeline.
flowchart TD
subgraph Free["Free"]
F1["UART · TCP/UDP · BLE"]
end
subgraph Pro["Pro"]
P1["Audio · Modbus · CAN
USB · HID · Process"]
end
F1 --> HAL["HAL_Driver"]
P1 --> HAL
HAL --> DM["DeviceManager"]
DM --> FB["Frame Builder"]
FB --> DASH["Dashboard"]
Note: UI-config instances are owned by
ConnectionManager; live instances are created byDeviceManager.
Communicates over physical or virtual serial ports. Suitable for Arduino, ESP32, STM32, any USB-to-serial adapter, RS-232, and RS-485 links.
Configuration:
| Parameter | Options / Range | Default |
|---|---|---|
| COM Port | Auto-detected list of available ports | — |
| Baud Rate | 110 — 1,000,000+ (custom values accepted) | 9600 |
| Data Bits | 5, 6, 7, 8 | 8 |
| Parity | None, Even, Odd, Space, Mark | None |
| Stop Bits | 1, 1.5, 2 | 1 |
| Flow Control | None, RTS/CTS (hardware), XON/XOFF (software) | None |
| DTR Signal | On / Off — toggles Data Terminal Ready line | Off |
| Auto Reconnect | On / Off — reconnects automatically on disconnect | Off |
Platform notes: Port names are platform-specific — COM3 on Windows, /dev/ttyUSB0 or /dev/ttyACM0 on Linux, /dev/cu.usbserial-* on macOS. Custom port paths can be registered manually.
Quick start:
Communicates over TCP or UDP sockets. Use this for WiFi-enabled microcontrollers (ESP32 WiFi mode, Raspberry Pi), remote telemetry servers, or network-attached instruments.
Configuration:
| Parameter | TCP | UDP |
|---|---|---|
| Socket Type | TCP | UDP |
| Remote Address | IP or hostname | IP or hostname |
| Port | TCP port (default: 23) | Remote port (default: 53) |
| Local Port | — | Listening port (0 = auto-assign) |
| Multicast | — | On / Off |
Protocol differences:
Quick start (TCP):
Quick start (UDP):
Connects to BLE peripherals using GATT service/characteristic subscriptions. Suitable for BLE sensors, fitness devices, and custom BLE firmware.
Configuration:
| Parameter | Description |
|---|---|
| Device | Discovered BLE peripherals (scanning starts automatically) |
| Service | GATT service to subscribe to |
| Characteristic | Specific characteristic for data notifications |
Platform support: macOS (CoreBluetooth), Windows 10+ (WinRT), Linux (BlueZ 5+).
Architecture notes:
Quick start:
The following six drivers require a Serial Studio Pro license.
Captures audio samples from system input devices using the miniaudio library. Useful for microphone analysis, acoustic sensors, vibration monitoring via piezo elements, and analog signal visualization within the audio frequency range.
Configuration:
| Parameter | Options |
|---|---|
| Input Device | System audio inputs (microphone, line-in, etc.) |
| Sample Rate | Device-dependent (common: 8, 22.05, 44.1, 48, 96, 192 kHz) |
| Sample Format | PCM signed/unsigned 16/24/32-bit, float 32-bit |
| Channel Config | Mono, stereo, or device-supported layouts |
| Output Device | System audio outputs (optional, for loopback) |
Quick start:
Tips: Use line-in instead of mic-in to avoid automatic gain control. Disable OS-level noise cancellation and audio effects for clean signals. Grant microphone permissions if your OS requires them.
Polls registers from Modbus-compatible PLCs, sensors, and industrial controllers. Supports both Modbus RTU (serial, RS-485/RS-232) and Modbus TCP (network) protocols.
Common configuration:
| Parameter | Range / Options |
|---|---|
| Protocol | Modbus RTU, Modbus TCP |
| Slave Address | 1 — 247 |
| Poll Interval | 50 — 60,000 ms |
| Register Groups | Type + start address + count (multiple groups) |
Register types: Coil (read/write discrete), Discrete Input (read-only discrete), Holding Register (read/write 16-bit), Input Register (read-only 16-bit).
RTU-specific parameters: Serial port, baud rate, data bits, parity, stop bits — identical to the UART driver settings.
TCP-specific parameters: Host address, TCP port (default: 502).
Quick start (RTU):
Quick start (TCP):
Receives and transmits CAN frames through platform-specific CAN interface plugins. Used for automotive ECU diagnostics, industrial control networks, and vehicle telemetry.
Configuration:
| Parameter | Options |
|---|---|
| Plugin | SocketCAN, PEAK PCAN, Vector CAN, Systec, others |
| Interface | can0, can1, PCAN_USBBUS1, etc. (plugin-dependent) |
| Bitrate | 10K — 1M (common: 125K, 250K, 500K, 1M) |
| CAN FD | On / Off — enables flexible data-rate frames (up to 64 bytes) |
Platform support:
ip link set can0 type can bitrate 500000 && ip link set can0 up.Frame format: Standard CAN uses 11-bit identifiers (0x000--0x7FF). CAN FD extends to 29-bit identifiers and up to 64 data bytes per frame. The driver outputs frames as [ID_high, ID_low, DLC, data...] byte arrays.
Quick start:
Direct USB access via libusb, bypassing OS serial and HID abstraction layers. Provides bulk, control, and isochronous transfer modes for custom USB devices and high-bandwidth sensors.
Configuration:
| Parameter | Options |
|---|---|
| Device | Enumerated USB devices (VID:PID — Product name) |
| Transfer Mode | Bulk Stream (default), Advanced Control, Isochronous |
| IN Endpoint | USB endpoint to read data from |
| OUT Endpoint | USB endpoint to write data to |
| ISO Packet Size | Packet size in bytes (isochronous mode only) |
Transfer modes:
Device enumeration: Uses libusb hotplug callbacks on platforms that support them (Linux, macOS, Windows). Falls back to a 2-second polling timer when hotplug is unavailable.
Quick start:
Platform notes:
udev rules (e.g., SUBSYSTEM=="usb", ATTR{idVendor}=="1234", MODE="0666") or root access.Connects to Human Interface Devices (gamepads, joysticks, custom HID sensors) using the hidapi library. Works on Windows, macOS, and Linux without additional drivers for most devices.
Configuration:
| Parameter | Description |
|---|---|
| Device | Enumerated HID devices (VID:PID — Product name) |
| Usage Page | Read-only — HID Usage Page reported by the device |
| Usage | Read-only — HID Usage reported by the device |
Enumeration: The device list refreshes automatically every 2 seconds. The list includes a placeholder entry at index 0 ("Select Device").
Data format: The driver reads 65-byte HID reports on a dedicated thread using blocking hid_read_timeout() calls. Fatal read errors are marshalled back to the main thread for safe disconnection.
Quick start:
Platform notes:
udev rule for hidraw access (e.g., SUBSYSTEM=="hidraw", GROUP="plugdev", MODE="0664").Reads data from a child process's stdout or from a named pipe/FIFO. Enables any script or program that writes to stdout to feed data into Serial Studio dashboards.
Modes:
| Mode | Description |
|---|---|
| Launch | Spawns a child process via QProcess; reads merged stdout/stderr |
| Named Pipe | Opens an existing named pipe or FIFO for reading |
Launch mode parameters:
| Parameter | Description |
|---|---|
| Executable | Path to the program to launch |
| Arguments | Command-line arguments |
| Working Dir | Working directory for the child process |
Named Pipe mode parameters:
| Parameter | Description |
|---|---|
| Pipe Path | Path to the FIFO or named pipe (e.g., /tmp/mydata or \\.\pipe\mydata) |
Quick start (Launch mode):
Quick start (Named Pipe mode):
Tips:
-u flag or call flush() after each print() to disable output buffering.When a project file defines multiple Sources, Serial Studio operates in multi-device mode. Each source specifies its own bus type, connection settings, frame delimiters, and optional JavaScript parser.
Key behaviors:
Single-device mode: Use the Setup Panel's "I/O Interface" dropdown or the driver buttons in the toolbar to select a data source type.
Multi-device mode: Each source is configured individually in the Project Editor. The Setup Panel shows the active project but does not allow per-source driver selection.
| Driver | Common Issues |
|---|---|
| Serial Port | Wrong COM port or baud rate mismatch. Verify settings match device firmware. |
| Network | Firewall blocking the port. Verify IP address and port are reachable. |
| BLE | Device out of range or not advertising. Check Bluetooth adapter is enabled. |
| Audio Input | Input device muted or permissions denied. Check OS audio and privacy settings. |
| Modbus | Slave ID or register address mismatch. For RTU, check wiring and termination. |
| CAN Bus | Bitrate mismatch causes bus errors. Verify CAN-H/CAN-L wiring and termination. |
| Raw USB | Missing udev rules (Linux) or kernel driver conflict (macOS). Check endpoints. |
| HID Device | Device claimed by another application. Add udev rules on Linux. |
| Process I/O | Executable not found or stdout buffered. Use -u for Python, check the path. |