Skip to content

Data Sources

Alex Spataru edited this page Mar 7, 2026 · 4 revisions

Serial Studio supports multiple data providers, allowing you to receive and visualize data from different sources. This page explains how to configure each data source: Serial Port, Network Socket (TCP/UDP), and Bluetooth Low Energy (BLE).

Serial Port Configuration

The Serial Port interface allows you to receive data from devices connected via a physical serial connection (e.g., Arduino, ESP32).

Parameters:

  • COM Port: The communication port your device is connected to (e.g., COM3 on Windows, /dev/ttyUSB0 on Linux).
  • Baud Rate: The communication speed between your device and Serial Studio. This must match the baud rate set on the device (common baud rates: 9600, 115200).
  • Data Bits: Number of data bits per frame (common values: 8).
  • Parity: Error-checking bit used in data transmission. Options are:
    • None: No parity checking.
    • Even: Ensures even parity.
    • Odd: Ensures odd parity.
  • Stop Bits: Defines the number of bits used to signal the end of a frame (common values: 1 or 2).
  • Flow Control: Controls the flow of data to prevent buffer overflows. Options are:
    • None: No flow control.
    • Hardware (RTS/CTS): Hardware-based flow control.
    • Software (XON/XOFF): Software-based flow control.
  • Send DTR Signal: Enables the Data Terminal Ready (DTR) signal, which can be used to reset certain devices (e.g., some microcontrollers).
  • Auto-reconnect: Automatically reconnects to the serial port if the connection is lost.

Step-by-Step Guide:

  1. Select the COM Port: Choose the serial port to which your device is connected.
  2. Set the Baud Rate: Make sure it matches the baud rate set on your device.
  3. Configure Data Bits, Parity, Stop Bits, and Flow Control: Set these according to your device's requirements.
  4. Enable DTR Signal (if needed): Some devices (e.g., Arduinos) may require this signal to reset or establish communication.
  5. Enable Auto-reconnect: If you want Serial Studio to automatically reconnect when the device is disconnected.
  6. Click "Connect": Start receiving data from the connected device.

Network Socket Configuration

The Network Socket interface allows you to receive data over the network via TCP or UDP sockets. This method is useful for remote data collection from devices connected to a network.

Parameters:

  • Socket Type: Choose between:
    • TCP: Reliable, connection-oriented protocol.
    • UDP: Unreliable, connectionless protocol that offers faster transmission.
  • Address: The IP address of the remote device.
  • Port: The port number through which data is sent or received.

Additional UDP-Specific Parameters:

  • Local Port: The port on your local machine that listens for incoming data.
  • Remote Port: The port on the remote device from which data is being sent.
  • Multicast: Enable this option if you are using UDP multicast to receive data from multiple devices.
  • Ignore Data Delimiters: If enabled, Serial Studio will ignore start and end delimiters when parsing UDP data. This is useful when receiving continuous or unstructured data.

Step-by-Step Guide for TCP:

  1. Select TCP as the Socket Type.
  2. Enter the Address and Port: Input the IP address and port of the device or server you wish to connect to.
  3. Click "Connect": Serial Studio will establish a TCP connection and start receiving data.

Step-by-Step Guide for UDP:

  1. Select UDP as the Socket Type.
  2. Enter the Local and Remote Ports:
    • Local Port: The port on your machine that listens for data.
    • Remote Port: The port from which the remote device sends data.
  3. Configure UDP Options:
    • Enable Multicast: If using multicast, check this option.
    • Ignore Data Delimiters: Check this option if the incoming UDP data does not have start/end delimiters.
  4. Click "Connect": Serial Studio will listen for incoming data on the specified ports.

Bluetooth Low Energy (BLE) Configuration

The BLE interface allows you to receive data from Bluetooth Low Energy devices, such as sensors or microcontrollers equipped with BLE communication capabilities.

Parameters:

  • Device Selection: First, scan and select the BLE device you wish to connect to.
  • Services: After connecting to the device, Serial Studio will display the available services that the device supports. Choose the service from which you want to start receiving data.

Step-by-Step Guide:

  1. Scan for Devices: In the BLE setup panel, click the "Scan" button to search for nearby BLE devices.
  2. Select the Device: Choose the BLE device from the list of detected devices.
  3. Click "Connect": Establish the BLE connection.
  4. Choose a Service: Once connected, Serial Studio will list the available services on the device. Select the service that corresponds to the data you wish to receive.
  5. Start Receiving Data: Serial Studio will now receive and visualize data from the BLE device.

MQTT Configuration (Pro)

The MQTT interface allows Serial Studio Pro to connect to MQTT brokers for cloud-based IoT applications and distributed sensor networks.

Parameters:

  • Broker Address: The address of the MQTT broker (e.g., test.mosquitto.org or 192.168.1.100).
  • Port: The port number for the MQTT connection (usually 1883 for plain connections, 8883 for TLS).
  • Username/Password: Credentials for broker authentication (if required).
  • Topic: The MQTT topic to subscribe to (e.g., sensors/temperature). Supports wildcards (+ for single level, # for multiple levels).
  • Client ID: Unique identifier for this MQTT client connection.
  • Quality of Service (QoS): Message delivery guarantee level (0, 1, or 2).
  • TLS/SSL: Enable secure connection with certificates.

Step-by-Step Guide:

  1. Get Broker Details: Obtain the broker address, port, and credentials from your MQTT service or self-hosted broker.
  2. Select MQTT as Data Source: In Serial Studio, choose MQTT from the data source options.
  3. Enter Broker Address and Port: Input the MQTT broker's address and port number.
  4. Configure Authentication: Enter username and password if your broker requires authentication.
  5. Subscribe to Topic: Enter the topic name you want to receive data from (e.g., sensors/temperature or sensors/# for all subtopics).
  6. Configure TLS (Optional): If using a secure connection, enable TLS and provide certificate paths.
  7. Click "Connect": Serial Studio will connect to the broker and start receiving messages from the subscribed topic.

Learn more: For detailed MQTT setup and configuration, see MQTT Integration and Protocol-Specific Setup Guides - MQTT.


Modbus Configuration (Pro)

The Modbus interface allows Serial Studio Pro to communicate with industrial PLCs and SCADA systems using Modbus RTU (serial) or Modbus TCP (network) protocols.

Parameters:

Common Parameters:

  • Slave ID (Unit ID): The address of the target device (1-247).
  • Function Code: The Modbus function to execute:
    • 01: Read Coils (discrete outputs)
    • 02: Read Discrete Inputs
    • 03: Read Holding Registers (most common)
    • 04: Read Input Registers
  • Start Address: First register/coil to read from.
  • Register Count: Number of registers/coils to read.
  • Poll Interval: How often to query the device (in milliseconds).

Modbus RTU-Specific:

  • COM Port: Serial port connected to the RS-485 adapter.
  • Baud Rate: Communication speed (common: 9600, 19200, 115200).
  • Data Bits: Typically 8 bits.
  • Parity: None, Even, or Odd (check device documentation).
  • Stop Bits: Typically 1 or 2.

Modbus TCP-Specific:

  • IP Address: The device's network IP address.
  • Port: TCP port number (default: 502).

Step-by-Step Guide for Modbus RTU:

  1. Connect RS-485 Adapter: Connect your RS-485 to USB adapter to the computer and to the Modbus device (A/B terminals).
  2. Verify Termination: Ensure 120Ω termination resistors are present at both ends of the RS-485 bus.
  3. Select Modbus as Data Source: Choose Modbus from the data source options.
  4. Select Modbus RTU: Choose RTU as the variant.
  5. Configure Serial Settings: Set COM port, baud rate, parity, and stop bits to match your device.
  6. Set Slave ID: Enter the device's Modbus address.
  7. Configure Read Parameters: Select function code (usually 03), start address, and register count.
  8. Set Poll Interval: Choose how often to read (e.g., 100 ms).
  9. Click "Connect": Serial Studio will start polling the device and displaying register values.

Step-by-Step Guide for Modbus TCP:

  1. Connect Device to Network: Ensure the Modbus TCP device is connected to your network.
  2. Get Device IP Address: Note the device's IP address (e.g., 192.168.1.100).
  3. Select Modbus as Data Source: Choose Modbus from the data source options.
  4. Select Modbus TCP: Choose TCP as the variant.
  5. Enter IP Address and Port: Input the device's IP and port (default 502).
  6. Set Slave ID: Enter the unit ID (often 1 for Modbus TCP).
  7. Configure Read Parameters: Select function code, start address, and register count.
  8. Set Poll Interval: Choose polling frequency.
  9. Click "Connect": Serial Studio will connect and start reading data.

Learn more: For detailed Modbus setup including register parsing and troubleshooting, see Protocol-Specific Setup Guides - Modbus.


CAN Bus Configuration (Pro)

The CAN Bus interface allows Serial Studio Pro to connect to Controller Area Network (CAN) systems commonly used in automotive and industrial applications.

Parameters:

  • CAN Adapter: The CAN interface hardware (e.g., PEAK PCAN-USB, Kvaser, CANable).
  • Bitrate: CAN bus speed in bits per second. Common values:
    • 250 kbps: Industrial CAN
    • 500 kbps: Automotive (OBD-II standard)
    • 1 Mbps: High-speed CAN
  • Extended Frames: Enable if using 29-bit CAN IDs (vs standard 11-bit IDs).
  • DBC File (Optional): CAN database file that defines message structure and signal mappings.

Step-by-Step Guide:

  1. Connect CAN Adapter: Connect your CAN adapter to the computer via USB.
  2. Install Drivers: Install necessary drivers for your CAN adapter (if required).
  3. Connect to CAN Bus:
    • Connect CAN-H to CAN-H line
    • Connect CAN-L to CAN-L line
    • Connect ground
    • Verify 120Ω termination resistors at both ends of the bus
  4. Select CAN Bus as Data Source: Choose CAN Bus from the data source options.
  5. Select Adapter: Choose your CAN adapter from the list of detected interfaces.
  6. Set Bitrate: Configure the bitrate to match your CAN network (critical - must match exactly).
  7. Configure Frame Type: Enable "Extended Frames" if using 29-bit identifiers.
  8. Import DBC File (Optional): If you have a DBC file, import it to automatically decode CAN messages into named signals.
  9. Click "Connect": Serial Studio will start receiving and displaying CAN messages.

Using DBC Files:

DBC files automatically decode CAN messages. To use:

  1. In the Project Editor, click "Import DBC"
  2. Select your .dbc file
  3. Serial Studio automatically creates datasets for all defined signals
  4. Signals are decoded with proper scaling, units, and names

Learn more: For detailed CAN Bus setup including manual parsing and OBD-II configuration, see Protocol-Specific Setup Guides - CAN Bus.


Audio Input Configuration (Pro)

The Audio Input interface allows Serial Studio Pro to capture and visualize audio signals from your computer's audio input devices.

Parameters:

  • Input Device: The audio input to capture from (microphone, line-in, audio interface).
  • Sample Rate: Audio sampling rate. Common values:
    • 44.1 kHz: Standard audio (music, speech)
    • 48 kHz: Professional audio
    • 96 kHz: High-resolution audio (if supported)
  • Channels: Mono (single channel) or Stereo (left and right).
  • Frame Size: Number of samples per frame (affects update rate and frequency resolution):
    • Smaller (512, 1024): Faster updates, lower frequency resolution
    • Larger (2048, 4096, 8192): Better frequency resolution for FFT analysis

Step-by-Step Guide:

  1. Connect Audio Source: Connect your audio device (microphone, sensor, or audio interface) to the computer.
  2. Verify Input in OS: Ensure the audio input is recognized and not muted in your operating system's sound settings.
  3. Select Audio Input as Data Source: Choose Audio Input from the data source options.
  4. Select Input Device: Choose the appropriate audio input device from the dropdown.
  5. Set Sample Rate: Select the sample rate (44.1 kHz or 48 kHz recommended).
  6. Choose Channels: Select Mono or Stereo based on your needs.
  7. Set Frame Size: Choose frame size based on your use case:
    • For waveform display: 512-1024 samples
    • For FFT spectrum analysis: 2048-4096 samples
  8. Click "Connect": Serial Studio will start capturing audio and sending samples to the dashboard.

Use Cases:

  • Audio Spectrum Analysis: Use FFT Plot widget to visualize frequency spectrum
  • Vibration Monitoring: Connect piezo sensors or accelerometers via audio input to monitor machinery vibrations
  • Acoustic Measurements: Sound level monitoring and frequency analysis
  • Analog Signal Visualization: Any analog signal within audio frequency range (20 Hz - 20 kHz)

Tips for Best Results:

  • For sensors: Use line-in (not mic-in) to avoid automatic gain control
  • Disable enhancements: Turn off noise cancellation and audio effects in OS settings
  • For vibration analysis: Use larger frame sizes (4096+) for better frequency resolution
  • Permissions: Grant microphone permissions if required by your operating system

Learn more: For detailed audio setup including FFT analysis and vibration monitoring, see Protocol-Specific Setup Guides - Audio Input.


Raw USB Configuration (Pro)

The Raw USB interface provides direct bulk, control, and isochronous access to USB devices via libusb. It bypasses the operating system's serial/HID abstraction layers, making it ideal for custom USB devices and high-bandwidth sensors.

Parameters:

  • Device: Select the target USB device from the enumerated list (VID:PID – Product name).
  • Transfer Mode: Choose the transfer type:
    • Bulk Stream (default): Synchronous bulk IN/OUT transfers. Best for most custom USB devices.
    • Advanced Control: Bulk + control transfers. Requires user confirmation; suitable for devices needing vendor-specific control commands.
    • Isochronous: Asynchronous isochronous transfers for time-sensitive, fixed-rate data streams (e.g., audio or video endpoints).
  • IN Endpoint: The USB endpoint to read data from.
  • OUT Endpoint: The USB endpoint to write data to.
  • ISO Packet Size: Packet size in bytes for isochronous mode.

Step-by-Step Guide:

  1. Connect the USB device: Plug in your custom USB device.
  2. Select Raw USB as Data Source: Choose Raw USB from the data source options.
  3. Select the Device: The device list is populated automatically. Choose your device by VID:PID.
  4. Choose Transfer Mode: Select Bulk Stream for most cases.
  5. Select Endpoints: Choose the IN and OUT endpoints that correspond to your device's data interface.
  6. Click "Connect": Serial Studio will open the device and start reading data.

Use Cases:

  • Custom USB firmware (STM32, PIC, TinyUSB) with bulk endpoints
  • High-bandwidth sensors that exceed Serial/UART throughput
  • USB oscilloscopes or logic analyzers with raw data access
  • Devices with isochronous endpoints (e.g., USB audio class bypassed)

Tips:

  • On Linux, you may need udev rules or run as root to access USB devices.
  • On macOS, the kernel HID or serial driver may need to be detached before libusb can claim the device.
  • Use Bulk Stream unless your device specifically requires isochronous transfers.

Learn more: Protocol-Specific Setup Guides - Raw USB


HID Devices Configuration (Pro)

The HID interface connects to Human Interface Devices (gamepads, custom USB HIDs, sensors exposing an HID interface) using hidapi. It works on Windows, macOS, and Linux without additional drivers for most devices.

Parameters:

  • Device: Select the HID device from the enumerated list (VID:PID – Product name).
  • Usage Page: Read-only display of the HID Usage Page reported by the selected device.
  • Usage: Read-only display of the HID Usage reported by the selected device.

Step-by-Step Guide:

  1. Connect the HID device: Plug in your USB HID device (gamepad, sensor, etc.).
  2. Select HID Devices as Data Source: Choose HID Devices from the data source options.
  3. Select the Device: The device list refreshes every 2 seconds. Choose your device from the list.
  4. Click "Connect": Serial Studio opens the device and starts reading 65-byte HID reports on a dedicated read thread.

Use Cases:

  • Gamepad / joystick data for robotics or simulation dashboards
  • Custom USB HID firmware (Arduino with HID library, STM32 USB HID)
  • Sensors exposing HID endpoints (force gauges, measurement devices)
  • Any USB device that registers as a HID without needing a custom driver

Tips:

  • On Linux, add a udev rule (e.g., SUBSYSTEM=="hidraw", GROUP="plugdev", MODE="0664") so you can access the device without root.
  • On macOS and Windows, most HID devices are accessible without extra drivers.
  • Usage Page and Usage values help confirm you've selected the right interface on multi-interface devices.

Learn more: Protocol-Specific Setup Guides - HID Devices


Process I/O Configuration (Pro)

The Process I/O interface spawns a child process and reads its stdout (and writes to its stdin), or connects to a named pipe/FIFO written by an external process. This lets any program that outputs data to stdout feed directly into the Serial Studio dashboard.

Modes:

  • Launch Mode: Serial Studio spawns the specified program as a child process. stdout is read as the data source; stdin receives data sent by Serial Studio actions.
  • Named Pipe Mode: Serial Studio opens an existing named pipe (Windows) or FIFO (Linux/macOS) for reading.

Parameters (Launch Mode):

  • Command / Executable: Path to the program to launch.
  • Arguments: Command-line arguments passed to the program.

Parameters (Named Pipe Mode):

  • Pipe Path: Path to the named pipe or FIFO (e.g., /tmp/mydata on Linux, \\.\pipe\mydata on Windows).

Step-by-Step Guide (Launch Mode):

  1. Select Process I/O as Data Source: Choose Process I/O from the data source options.
  2. Select Launch Mode.
  3. Enter the Command: Type the path to your script or executable (e.g., python3 /path/to/sensor.py).
  4. Add Arguments (if needed).
  5. Click "Connect": Serial Studio launches the process and starts reading its stdout.

Use Cases:

  • Python/Node.js scripts that aggregate sensor data and print CSV to stdout
  • Simulation programs that output telemetry (e.g., flight simulators, physics engines)
  • Data generators for testing dashboards without physical hardware
  • Bridge programs that translate proprietary protocols to CSV

Tips:

  • The child process must write data to stdout in a format Serial Studio can parse (e.g., comma-separated values with newline delimiter).
  • Use the Named Pipe mode when you want to connect to a long-running external process without Serial Studio managing its lifecycle.
  • Console output from stderr is not captured — only stdout is read.

Learn more: Protocol-Specific Setup Guides - Process I/O


Common Data Source Troubleshooting

If you're having trouble receiving data from your device, here are some troubleshooting tips:

  • Serial Port: Ensure the correct COM port is selected, and the baud rate matches the device's configuration.
  • Network Socket: Verify that your network settings (IP address, ports) are correct and that no firewall or network issues are blocking the connection.
  • BLE: Ensure your BLE device is powered on and within range, and check that it's broadcasting the correct services.
  • MQTT: Verify broker address, port, credentials, and topic are correct. Check that the broker is reachable and the device is publishing to the topic.
  • Modbus: Verify slave ID, function code, and register addresses match your device. For RTU, check wiring and termination resistors.
  • CAN Bus: Ensure bitrate matches the network exactly. Verify CAN-H/CAN-L connections and 120Ω termination at both ends.
  • Audio Input: Check that the correct input device is selected and not muted. Grant microphone permissions if needed.
  • Raw USB: On Linux, check udev rules. On macOS, ensure no kernel driver has claimed the device. Verify you have selected the correct IN/OUT endpoints.
  • HID Devices: On Linux, add udev rules for hidraw access. Check that the device is not already claimed by another application.
  • Process I/O: Verify the command path is correct and the program is executable. Check that stdout is not buffered (add flush() calls or run Python with -u).

Clone this wiki locally