doc/help/Communication-Protocols.md
Serial Studio supports 10 communication protocols across wired serial links, wireless radios, network sockets, industrial buses, and local inter-process channels. This page describes each one, covers when to pick it, and highlights the configuration parameters and platform details that matter in practice. For deeper per-protocol primers (theory, framing, common pitfalls, references), see the Drivers section of the docs.
The diagram below maps all supported protocols by throughput range and license tier.
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 to 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 to 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 | Device-dependent, up to 384 kHz sampling | 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's the natural fit 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 talks to Bluetooth Low Energy peripherals via GATT. 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 no matter how many sources reference BLE. The device list is append-only during a scan, and device indices stay stable, so combobox selections aren't disrupted by new discoveries.
Platform considerations:
bluetooth group. Some distros require bluetoothd to be running.These protocols need 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 as a publisher (forwarding received frame data to a broker).
When to use it:
Key configuration parameters:
127.0.0.1.+ single level, # multi-level). The publisher uses a separate per-project topic base configured on the MQTT Publisher page.Subscriptions are made at QoS 0, and Last Will configuration is not exposed. The subscriber and publisher are configured separately: the subscriber is a per-source bus type, the publisher a project-level export.
Platform considerations:
For the protocol vocabulary, see MQTT Topics & Semantics. The inbound side (per-source subscriber) is documented at MQTT Subscriber; the outbound side (project-level publisher) at MQTT Publisher.
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 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:
socketcan.peakcan, vectorcan, systeccan.can0, PCAN_USBBUS1).CAN frame format emitted by the driver. The driver converts each received CAN frame into a byte array. Standard frames (11-bit identifiers) use [ID_high, ID_low, DLC, data_0, data_1, ...]; extended frames (29-bit identifiers) carry the full 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_0, ...]. Standard identifiers never exceed 0x7FF, so the first byte's top bit tells the two forms apart. 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 extra 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 capture devices.The Raw USB driver gives 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 custom OS drivers.
When to use it:
Key configuration parameters:
Product Name (VID:PID) (or just VID:PID when no product string is available).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 extra 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, so Serial Studio can 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 reads from a named pipe or FIFO. On POSIX it creates the FIFO with mkfifo if it does not already exist; on Windows it acts as the named-pipe server. The external process writes to the pipe. |
Launch mode parameters:
Named pipe parameters:
Platform considerations:
mkfifo. Make sure 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 or 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) |