doc/help/Communication-Protocols.md
Serial Studio supports 10 communication protocols spanning wired serial links, wireless radios, network sockets, industrial buses, and local inter-process channels. This page describes each protocol, explains when to choose it, and highlights the configuration parameters and platform considerations that matter in practice.
The following diagram maps all supported protocols by throughput range and license tier, helping you choose the right one for your project.
flowchart TD
Q{"Connection type?"}
Q -->|USB cable| A1["Serial/UART"]
Q -->|WiFi / Ethernet| A2["TCP/UDP"]
Q -->|Wireless sensor| A3["Bluetooth LE"]
Q -->|Cloud / IoT| A4["MQTT · Pro"]
Q -->|Vehicle / PLC| A5["CAN · Modbus · Pro"]
| Protocol | License | Medium | Typical Throughput | Primary Use Case |
|---|---|---|---|---|
| Serial/UART | Free | USB / RS-232 / RS-485 | 110 bps — 1 Mbps+ | Microcontrollers, embedded dev |
| TCP/UDP Network | Free | Ethernet / WiFi | Network-dependent | WiFi-enabled boards, remote telemetry |
| Bluetooth LE | Free | 2.4 GHz radio | ~1 Mbps | Battery-powered wireless sensors |
| MQTT | Pro | Internet / LAN | Network-dependent | IoT cloud, distributed systems |
| Modbus | Pro | RS-485 / Ethernet | 9600 bps — network speed | PLCs, SCADA, industrial equipment |
| CAN Bus | Pro | Twisted pair | Up to 8 Mbps (CAN FD) | Automotive, industrial machinery |
| Audio Input | Pro | Analog audio | Up to 48 kHz sample rate | Sound analysis, vibration monitoring |
| Raw USB | Pro | USB cable | Up to 480 Mbps (USB 2.0) | Custom firmware, bulk/iso endpoints |
| HID | Pro | USB cable | Up to 64 KB/s | Gamepads, custom HID sensors |
| Process I/O | Pro | Local IPC | OS-dependent | Scripts, simulators, named pipes |
Serial/UART is the most common way to connect microcontrollers to a computer. It covers USB-to-serial adapters (CH340, FTDI, CP210x, PL2303), native hardware UARTs, and RS-232/RS-485 transceivers.
When to use it:
Key configuration parameters:
Platform considerations:
dialout (or uucp) group to access /dev/ttyUSBx and /dev/ttyACMx without root.The Network driver connects to devices over TCP or UDP sockets. It is the natural choice for WiFi-enabled microcontrollers (ESP32, ESP8266), Ethernet-connected instruments, and remote data acquisition systems.
When to use it:
TCP vs. UDP:
| Property | TCP | UDP |
|---|---|---|
| Delivery guarantee | Yes (retransmits lost segments) | No |
| Connection model | Connection-oriented (handshake) | Connectionless (fire-and-forget) |
| Ordering | Guaranteed in-order | No ordering guarantee |
| Latency | Slightly higher | Lower |
| Best for | Reliable streams, file-like data | Low-latency datagrams, multicast |
Key configuration parameters:
127.0.0.1.Platform considerations:
The BLE driver communicates with Bluetooth Low Energy peripherals using the GATT protocol. It auto-discovers advertising devices, enumerates their services and characteristics, and streams notification data into Serial Studio's pipeline.
When to use it:
Key configuration parameters:
How discovery works:
Serial Studio uses a shared static discovery agent. All BLE driver instances share the same device list, so scanning happens once regardless of how many sources reference BLE. The device list is append-only during a scan; device indices remain stable, so combobox selections are not disrupted by new discoveries.
Platform considerations:
bluetooth group. Some distributions require bluetoothd to be running.The following protocols require a Serial Studio Pro license.
MQTT (Message Queuing Telemetry Transport) is a lightweight publish/subscribe messaging protocol designed for constrained devices and unreliable networks. Serial Studio Pro can act as an MQTT subscriber (receiving telemetry from a broker) or publisher (forwarding received frame data to a broker).
When to use it:
Key configuration parameters:
127.0.0.1.+ single level, # multi-level).Platform considerations:
For detailed setup, see MQTT Integration.
Modbus is an industrial communication protocol for reading and writing registers on PLCs, SCADA devices, and other industrial equipment. Serial Studio Pro supports both Modbus RTU (over RS-485 serial) and Modbus TCP (over Ethernet/IP).
When to use it:
Key configuration parameters:
Register types:
| Type | Code | Access | Size |
|---|---|---|---|
| Coil | 01 | Read/Write | 1 bit |
| Discrete Input | 02 | Read-only | 1 bit |
| Holding Register | 03 | Read/Write | 16 bits |
| Input Register | 04 | Read-only | 16 bits |
Platform considerations:
/dev/ttyUSBx.Controller Area Network (CAN) is a robust vehicle and industrial bus standard. Serial Studio Pro reads and writes CAN frames through the host platform's CAN interface layer.
When to use it:
Key configuration parameters:
socketcanpeakcan, vectorcan, systeccancan0, PCAN_USBBUS1).CAN frame format emitted by the driver:
The driver converts each received CAN frame into a byte array: [ID_high, ID_low, DLC, data_0, data_1, ...]. This array is passed to Serial Studio's frame parser for decoding.
Platform considerations:
ip link set can0 type can bitrate 500000 && ip link set up can0. No additional drivers needed for most USB-CAN adapters.The Audio Input driver captures raw PCM audio from the computer's sound input (microphone, line-in, audio interface) and feeds it into Serial Studio's data pipeline. It uses the miniaudio library for cross-platform low-latency audio capture.
When to use it:
Key configuration parameters:
The driver also exposes output device settings for audio passthrough, though the primary use case is capture.
Platform considerations:
arecord -l to list available capture devices.The Raw USB driver provides direct access to USB device endpoints via libusb, bypassing operating system serial and HID drivers. It supports bulk, control, and isochronous transfer modes.
When to use it:
Transfer modes:
| Mode | Description |
|---|---|
| Bulk Stream | Synchronous bulk IN/OUT transfers. Default and most common. |
| Advanced Control | Bulk transfers plus vendor-specific control transfers. Requires user confirmation. |
| Isochronous | Asynchronous isochronous transfers for time-sensitive fixed-rate streams. |
Key configuration parameters:
Platform considerations:
udev rules granting the user access to the USB device, or root privileges. Hotplug detection is supported natively.libusb_handle_events_timeout() continuously to service hotplug callbacks and isochronous completions.The HID driver accesses Human Interface Devices via the hidapi library. It reads interrupt reports from gamepads, joysticks, custom USB HID firmware, and HID-class sensors without requiring custom OS drivers.
When to use it:
Key configuration parameters:
VID:PID — Product Name.How enumeration works:
The driver re-enumerates all HID devices every 2 seconds via a QTimer. The device list updates automatically when devices are plugged in or removed.
Platform considerations:
hid.dll). Most HID devices work without additional drivers.hidraw kernel interface. The user may need udev rules to access /dev/hidrawX without root. The hidraw backend avoids conflicts with the libusb-based Raw USB driver.The Process I/O driver captures data from child processes or named pipes, enabling Serial Studio to visualize output from scripts, simulators, and external programs.
When to use it:
Modes:
| Mode | Description |
|---|---|
| Launch | Serial Studio spawns the process, reads its merged stdout+stderr, and can write to its stdin. |
| Named Pipe | Serial Studio opens an existing named pipe or FIFO and reads from it. The external process manages the pipe. |
Key configuration parameters (Launch mode):
Key configuration parameters (Named Pipe mode):
Platform considerations:
mkfifo. Ensure the pipe exists before connecting.\\.\pipe\PipeName convention.By situation:
| Situation | Recommended Protocol |
|---|---|
| Microcontroller connected via USB cable | Serial/UART |
| Device on the same WiFi or Ethernet network | TCP/UDP Network |
| Battery-powered wireless sensor nearby | Bluetooth LE |
| Device publishing to a cloud MQTT broker | MQTT (Pro) |
| Industrial PLC with Modbus registers | Modbus (Pro) |
| Vehicle CAN bus or OBD-II port | CAN Bus (Pro) |
| Analyzing audio signals or vibrations | Audio Input (Pro) |
| Custom USB device with bulk or ISO endpoints | Raw USB (Pro) |
| Gamepad, joystick, or HID-class sensor | HID (Pro) |
| Script or simulator writing to stdout | Process I/O (Pro) |
By priority:
| Protocol | Required Hardware |
|---|---|
| Serial/UART | USB cable or USB-to-serial adapter (CH340, FTDI, CP210x) |
| TCP/UDP | Ethernet or WiFi connectivity |
| Bluetooth LE | Bluetooth 4.0+ adapter on the computer |
| MQTT | Network/internet access to an MQTT broker |
| Modbus RTU | RS-485-to-USB adapter with termination resistors |
| Modbus TCP | Ethernet connectivity |
| CAN Bus | CAN-to-USB adapter (PEAK PCAN, Kvaser, CANable, SocketCAN-compatible) |
| Audio Input | Audio capture device (microphone, line-in, audio interface) |
| Raw USB | USB device with accessible bulk, control, or isochronous endpoints |
| HID | USB HID-class device |
| Process I/O | None (runs a local program or reads a named pipe) |