doc/help/Data-Sources.md
Serial Studio connects to hardware and software data sources through ten driver types. Three ship in the free GPL edition; seven more need a Pro license. Each driver feeds raw bytes into the frame-parsing pipeline. You pick the active driver in the Setup panel, or (for multi-device projects) in the Project Editor.
For protocol theory, wire framing, and educational primers on each driver, see the dedicated Drivers section: UART, Network, Bluetooth LE, Modbus, CAN Bus, Audio, Raw USB, HID, Process I/O, and MQTT Subscriber. The protocol vocabulary that the MQTT driver assumes (topics, wildcards, QoS, retained messages) lives in MQTT Topics & Semantics under Connectivity; the outbound side is the per-project MQTT Publisher.
The diagram below shows how each driver type 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 · MQTT"]
end
F1 --> FR["Frame Reader"]
P1 --> FR
FR --> FB["Frame Builder"]
FB --> DASH["Dashboard"]
Talks to physical or virtual serial ports. A good fit 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 to 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 the Data Terminal Ready line | On |
| 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. You can register custom port paths manually.
Quick start:
Talks over TCP or UDP sockets. Use this for WiFi-enabled microcontrollers (ESP32 in 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. A good fit 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 next seven drivers need a Serial Studio Pro license.
Captures audio samples from system input devices through 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, and so on) |
| Sample rate | Device-dependent (common: 8, 22.05, 44.1, 48, 96, 192 kHz) |
| Sample format | PCM unsigned 8-bit, signed 16/24/32-bit, float 32-bit |
| Channel config | Mono, stereo, or any layout the device supports |
| Output device | System audio outputs (optional, for loopback) |
Quick start:
Tips. Use line-in instead of mic-in to avoid automatic gain control. Turn off OS-level noise cancellation and audio effects for clean signals. Grant microphone permissions if your OS asks for them.
Polls registers from Modbus-compatible PLCs, sensors, and industrial controllers. Supports both Modbus RTU (serial, RS-485/RS-232) and Modbus TCP.
Common configuration:
| Parameter | Range / options |
|---|---|
| Protocol | Modbus RTU, Modbus TCP |
| Slave address | 1 to 247 |
| Poll interval | 10 to 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 and TCP port (default: 5020).
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, and so on (plugin-dependent) |
| Bitrate | 10K to 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 to 0x7FF); IDs above 0x7FF are sent as 29-bit extended frames. CAN FD raises the payload limit to 64 data bytes per frame (classic CAN caps at 8). The driver outputs standard frames as [ID_high, ID_low, DLC, data...] byte arrays; extended frames carry the full 29-bit identifier in four bytes with bit 7 of the first byte set ([0x80|ID_28..24, ID_23..16, ID_15..8, ID_7..0, DLC, data...]).
Quick start:
Direct USB access via libusb, bypassing OS serial and HID abstractions. Supports bulk, control, and isochronous transfers 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 from |
| OUT endpoint | USB endpoint to write to |
| ISO packet size | Packet size in bytes (isochronous mode only) |
Transfer modes:
Device enumeration. Uses libusb hotplug callbacks where the OS supports them (Linux, macOS, Windows). Falls back to a 2-second polling timer when hotplug isn't available.
Quick start:
Platform notes:
udev rules (for example SUBSYSTEM=="usb", ATTR{idVendor}=="1234", MODE="0666") or root access.Connects to Human Interface Devices (gamepads, joysticks, custom HID sensors) through hidapi. Works on Windows, macOS, and Linux without extra 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 directly from the device. Unexpected disconnections (unplugging, driver errors) are handled cleanly, and the UI is notified.
Quick start:
Platform notes:
udev rule for hidraw access (for example SUBSYSTEM=="hidraw", GROUP="plugdev", MODE="0664").Reads data from a child process's stdout or from a named pipe/FIFO. Any script or program that writes to stdout can feed data into Serial Studio dashboards this way.
Modes:
| Mode | Description |
|---|---|
| Launch | Spawns a child process and reads its combined stdout and 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 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.Subscribes to a broker topic filter and feeds each received payload into the frame pipeline as if the bytes had arrived over UART or TCP. The right transport when the telemetry is already on a broker, or when several Serial Studio instances need to consume the same data without each one talking to the device directly.
Configuration:
| Parameter | Description |
|---|---|
| Hostname | Broker address (IP or hostname). Default 127.0.0.1. |
| Port | Broker port. 1883 plaintext, 8883 TLS. |
| Client ID | Identifier sent on CONNECT. Auto-generated; Regenerate picks a new one. |
| Username/Password | Optional broker authentication. |
| Topic filter | Topic to subscribe to. Supports + (one level) and # (rest) wildcards. |
| MQTT version | 3.1, 3.1.1, or 5.0. |
| Clean session | Discard persistent session state on CONNECT. Default on. |
| Keep alive | Seconds between PING packets when idle. |
| SSL / TLS | Master toggle, protocol family, peer-verify mode, peer-verify depth. |
| CA certificates | Load extra PEM certificates for self-signed brokers. |
Quick start:
Tips:
sensors/+/temp multiplexes many publishers onto a single source. If you need to tell them apart, encode the publisher's identity in the payload or use one source per publisher.When a project file defines multiple sources, Serial Studio runs in multi-device mode. Each source sets its own bus type, connection settings, frame delimiters, and (optionally) a frame parser in Lua or JavaScript.
Key behaviors:
Single-device mode. Use the Setup panel's "I/O Interface" dropdown or the driver buttons in the toolbar to pick a data source type.
Multi-device mode. Each source is configured individually in the Project Editor. The Setup panel shows the active project but doesn't allow per-source driver selection.
| Driver | Common issues |
|---|---|
| Serial port | Wrong COM port or baud rate mismatch. Check that settings match device firmware. |
| Network | Firewall blocking the port. Check that IP address and port are reachable. |
| BLE | Device out of range or not advertising. Check the 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. Check 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. |
| MQTT | Broker unreachable, wrong topic filter, or client-ID collision. Run Test Connection on the MQTT Publisher page to probe credentials. |