Back to Serial Studio

Protocol Setup Guides

doc/help/Protocol-Setup-Guides.md

4.0.137.1 KB
Original Source

Protocol Setup Guides

Step-by-step setup instructions for every communication protocol supported by Serial Studio. Each guide walks through the exact UI steps required to establish a connection. For protocol overviews and selection guidance, see Communication Protocols; for the driver model and multi-device projects, see Data Sources.

Serial/UART Setup

License: Free

Prerequisites: Device connected via USB or RS-232/RS-485 adapter. Driver installed if required (CH340, FTDI, CP210x).

Steps

  1. Open Serial Studio.
  2. In the Setup Panel, select UART/COM from the I/O Interface dropdown. Alternatively, click the UART button in the toolbar if visible.
  3. Select the COM port (Windows) or /dev/ttyUSBx / /dev/ttyACMx (Linux/macOS) from the COM Port dropdown. If the port does not appear, check the Troubleshooting entries for this driver.
  4. Set the Baud Rate to match your device. Default: 9600. Common values: 9600, 115200, 921600. The field is editable, so rates not in the list can be typed directly.
  5. Set Data Bits (usually 8), Parity (usually None), Stop Bits (usually 1), and Flow Control (usually None).
  6. Leave Send DTR Signal enabled (the default) if your device uses DTR for reset signaling, as Arduino boards do; disable it if a DTR pulse resets your device unexpectedly.
  7. Optionally enable Auto Reconnect (off by default) to reconnect when the device is unplugged and re-plugged.
  8. Click Connect.

Troubleshooting

  • Port not listed: On Linux, add your user to the dialout group: sudo usermod -aG dialout $USER, then log out and back in. On Windows, install the appropriate USB-serial driver. On all platforms, try a different USB cable or port.
  • No data after connecting: Verify the baud rate matches the device exactly. Check that your frame delimiters are configured correctly. Try toggling Send DTR Signal.
  • Garbled data: Baud rate mismatch is the most common cause. Double-check the device documentation.

Full driver reference: UART.

TCP Network Setup

License: Free

Prerequisites: Device and computer on the same network, or device accessible over the internet. Device IP address and port number known.

Steps

  1. In the Setup Panel, select Network Socket from the I/O Interface dropdown.
  2. Set the Socket Type to TCP.
  3. Enter the Remote Address (IP address or hostname of the device). Default: 127.0.0.1.
  4. Enter the Remote Port the device is listening on. Default: 23.
  5. Click Connect.

Serial Studio will resolve the hostname (if provided) and attempt a TCP connection. The Connect button stays disabled until the name resolves.

Serial Studio is a TCP client only: it dials out to a listening server and never accepts inbound connections. If the device expects to push data to a listener, run a small TCP relay in front of Serial Studio, or switch to UDP.

Troubleshooting

  • Connection refused: Verify the device is listening on the specified port. Ping the device to confirm network reachability. Check firewall rules on both ends.
  • Connection times out: The device may be on a different subnet or behind a NAT. Verify the IP address.

Full driver reference: Network.

UDP Network Setup

License: Free

Prerequisites: Device IP address and port number known. For receiving, the device must be sending to your computer's IP.

Steps

  1. In the Setup Panel, select Network Socket from the I/O Interface dropdown.
  2. Set the Socket Type to UDP.
  3. Enter the Remote Address (IP address of the device, or multicast group address). Default: 127.0.0.1.
  4. Enter the Remote Port (the destination port when Serial Studio writes data back). Default: 53. This field is hidden while Multicast is checked.
  5. Set the Local Port to the port your computer should bind to for receiving data. Use 0 (the default) for automatic port assignment; bind a fixed port when the device sends to a known destination.
  6. Optionally enable Multicast if the remote address is a multicast group (e.g., 239.x.x.x). Serial Studio joins the group on connect.
  7. Click Connect.

Troubleshooting

  • No data received. Check that the device is sending to your computer's IP and the correct local port. Check firewall rules: UDP is often blocked by default. If you're using multicast, verify both devices are on the same multicast-capable network segment.
  • Data from wrong source: UDP is connectionless. Any device sending to your bound port will be received. Use firewall rules or application-level filtering if needed.

Full driver reference: Network.

Bluetooth LE Setup

License: Free

Prerequisites: Computer with Bluetooth 4.0+ adapter. BLE device powered on and in advertising mode (not connected to another host).

Steps

  1. In the Setup Panel, select Bluetooth LE from the I/O Interface dropdown.
  2. Ensure Bluetooth is enabled on your computer. Serial Studio starts scanning for BLE devices as soon as the driver is selected.
  3. Wait for device scanning to complete. Your device should appear in the Device dropdown.
  4. Select your device from the dropdown.
  5. If the device exposes multiple GATT services, select the appropriate Service from the dropdown.
  6. Select the Characteristic that carries your telemetry data (typically a notify characteristic).
  7. Click Connect.

Troubleshooting

  • Device not found: Ensure the device is advertising and not already paired with another host. Move the device closer. Restart Bluetooth on your computer. On macOS, grant Bluetooth permission to Serial Studio in System Settings.
  • Connected but no data: Verify you selected the correct service and characteristic. The characteristic must support notifications or indications. Check that the device is actively sending data.
  • Adapter not available: On Linux, ensure bluetoothd is running and the user is in the bluetooth group.

Full driver reference: Bluetooth LE.

MQTT Setup (Pro)

License: Pro

Prerequisites: Access to an MQTT broker. Broker hostname, port, and credentials (if any). Topic filter (subscriber) or base topic (publisher).

MQTT now has two distinct surfaces in Serial Studio. Pick the one that matches what you want to do; both can run in the same project.

  • Subscriber (per-source driver). Treats a broker topic as if it were a serial or network device. Configured under Devices in the project editor, exactly like UART or Network. Use this when the data already lives on a broker.
  • Publisher (per-project). Pushes parsed frames, raw bytes, or notifications out to a broker. Configured under the MQTT Publisher node in the project editor (directly below Devices). Use this when Serial Studio is the producer and downstream tools subscribe.

Subscriber: add an MQTT source

For a single-device setup, select MQTT Subscriber from the I/O Interface dropdown in the Setup Panel and fill in the same fields there. For multi-device projects:

  1. Open the project editor.
  2. Add a new source under Devices (or pick an existing one) and set its Bus Type to MQTT Subscriber.
  3. Under Connection Settings, enter:
    • Hostname and Port (1883 plaintext, 8883 TLS; default 1883).
    • Username / Password if the broker requires authentication.
    • Client ID (auto-generated; click Regenerate to pick a new one).
    • Topic Filter. Examples: sensors/#, device/+/telemetry, mydevice/data. Connecting is blocked while this is empty.
    • MQTT Version (MQTT 3.1, 3.1.1, or 5.0).
    • Clean Session on (default) for interactive use.
  4. To use TLS, enable SSL/TLS and pick an SSL Protocol and Peer Verify mode. For a private CA, set CA Certificates to Load From Folder… and pick the directory holding the PEM files.
  5. Configure frame detection on the source. Each MQTT message preserves payload boundaries, so No Delimiters is usually the right choice — one publish becomes one frame.
  6. Save the project and click Connect in the Setup panel.

Repeat with another source set to MQTT Subscriber to add a second broker connection (or a second topic on the same broker). Each MQTT source has its own broker session, credentials, and TLS configuration.

See MQTT Subscriber for the full protocol primer.

Publisher: configure the project-level publisher

  1. Open the project editor and select MQTT Publisher in the left tree (immediately below Devices).
  2. Under Publishing, turn on Enable Publishing.
  3. Pick Payload:
    • Dashboard Data (JSON) publishes each parsed frame as compact JSON.
    • Dashboard Data (CSV) publishes each parsed frame as a CSV row.
    • Raw RX Data republishes the bytes that arrived on any active driver, unmodified.
    • Custom Script publishes the value returned by the mqtt(frame) script hook.
  4. Set Topic Base. The Publisher silently produces no traffic when this is empty.
  5. Turn on Publish Notifications to mirror dashboard events to MQTT; set Notification Topic if you want them on a separate topic from the frame stream (it defaults to the Topic Base when empty).
  6. Under Broker, fill in hostname, port, credentials, protocol version, and keep-alive.
  7. For TLS, enable Use SSL/TLS and pick a protocol, peer-verify mode, and verify depth. Use Load CA Certs in the header bar to add PEM certificates for a private CA.
  8. Click Test Connection in the header bar to probe the broker without disturbing the live session. The result appears in a message box.
  9. Click Connect in the header bar to open the publishing session.

See MQTT Publisher for the full reference, including the mqtt(frame) script hook for frame parsers.

Troubleshooting

  • Connection fails: Verify broker address and port. Test with a standalone MQTT client (e.g., MQTT Explorer, mosquitto_sub) to confirm the broker is reachable. On the Publisher form, Test Connection does the same probe inside Serial Studio.
  • Subscribed but no messages: Topic names are case-sensitive. Verify the topic filter matches what the device publishes to. Use # as the topic filter to receive all messages for debugging.
  • TLS handshake failure: Verify the CA certificate matches the broker's certificate chain. After loading a new CA, disconnect and reconnect (or run Test Connection) to apply it.
  • Publisher and a subscriber loop on the same topic: Publishing to a topic the project also subscribes to creates an echo. Use different base topics, or disable one side.

Modbus RTU Setup (Pro)

License: Pro

Prerequisites: RS-485-to-USB adapter connected to the computer. Device wired to the RS-485 bus with correct polarity (A-to-A, B-to-B) and 120-ohm termination resistors at each end.

Steps

  1. In the Setup Panel, select Modbus from the I/O Interface dropdown.
  2. Set the Protocol to Modbus RTU.
  3. Select the Serial Port corresponding to your RS-485 adapter.
  4. Set the Baud Rate to match the device (common: 9600, 19200, 115200).
  5. Set Parity (commonly Even for Modbus), Data Bits (usually 8), and Stop Bits (usually 1).
  6. Set the Slave Address (device address on the bus, 1-247; default 1).
  7. Click Configure Register Groups… and add one or more groups, each specifying:
    • Register Type: Holding Registers (0x03), Input Registers (0x04), Coils (0x01), or Discrete Inputs (0x02).
    • Start Address: The first register to read (0-65535).
    • Register Count: How many consecutive registers to read (1-125).
  8. Set the Poll Interval (ms). Default: 100 ms, which polls at 10 Hz.
  9. Click Connect.

Generate Project from Register Groups

Once you have configured your register groups, you can auto-generate a Serial Studio project file instead of building one by hand:

  1. Configure all register groups as described above.
  2. Click Generate Project in the Modbus Register Groups dialog.
  3. You will be prompted to save the .ssproj file.
  4. The project editor opens for further customization.

The generated project includes one group per register block, one dataset per register/coil, and a generated Lua frame parser. See How Multi-Group Polling Works for details on the frame parser.

Troubleshooting

  • No response: Verify the slave address matches the device. Check RS-485 wiring polarity. Confirm the baud rate and parity match the device settings. Ensure termination resistors are in place.
  • Timeout errors: Increase the poll interval. Reduce the number of registers per group. Check the physical bus for noise or excessive cable length.
  • CRC errors: Almost always a wiring issue: swapped A/B lines, missing termination, or ground loop.

Full driver reference: Modbus.

Modbus TCP Setup (Pro)

License: Pro

Prerequisites: Device connected to the network with a known IP address and Modbus TCP port.

Steps

  1. In the Setup Panel, select Modbus from the I/O Interface dropdown.
  2. Set the Protocol to Modbus TCP.
  3. Enter the Host (device IP address or hostname).
  4. Enter the Port (Serial Studio prefills 5020; standard Modbus TCP devices listen on 502).
  5. Set the Slave Address (usually 1 for TCP gateways, but may vary).
  6. Click Configure Register Groups… and add one or more groups, with the same fields as in the Modbus RTU steps.
  7. Set the Poll Interval (ms).
  8. Click Connect.

Troubleshooting

  • Connection refused: Verify the device is listening on the specified port. Check firewall rules. Confirm the IP address is correct.
  • No data: Verify the slave address, register type, start address, and count match the device's register map documentation.

Modbus Register Map Import (Pro)

License: Pro

Instead of manually adding register groups one by one, you can import a register map file that describes all registers for your device. Serial Studio will auto-generate a complete project with register groups, datasets, a Lua frame parser, and appropriate dashboard widgets.

Supported Formats

Serial Studio auto-detects the format from the file extension and accepts CSV, XML, and JSON files.

How to Import

  1. In the Setup Panel, select Modbus from the I/O Interface dropdown.
  2. Click Import Register Map….
  3. Select a CSV, XML, or JSON register map file.
  4. Review the registers in the Modbus Register Map Preview dialog.
  5. Click Create Project. You will be prompted to save the .ssproj file.
  6. The register groups are also loaded into the Modbus driver automatically.

CSV Format

CSV is the most common format for Modbus register maps. Most PLC vendors, SCADA tools, and device datasheets can export or be converted to this format.

Columns (header row required, order is flexible):

ColumnAliasesRequiredDefault
addressaddr, register, regYesNone
namelabel, tagNoRegister N
typeregister_type, function, fcNoholding
dataTypedata_type, formatNouint16
unitsunit, eng_unitsNoNone
minminimum, range_minNo0
maxmaximum, range_maxNo65535
scalefactor, multiplierNo1.0
offsetNo0.0
descriptiondesc, comment (used as name if no name column)NoNone

Register type values: holding (or 0x03, 3, hr), input (or 0x04, 4, ir), coil (or 0x01, 1), discrete (or 0x02, 2, di).

Data type values: uint16, int16, uint32, int32, uint64, int64, float32, float64, bool. Unknown types fall back to uint16; bool defaults its range to 0-1.

Lines starting with # are treated as comments and skipped.

Example:

csv
address,name,type,dataType,units,min,max,scale,offset
0,Temperature,holding,uint16,°C,0,150,0.1,0
1,Pressure,holding,uint16,PSI,0,5000,1,0
2,RPM,holding,uint16,RPM,0,3000,1,0
4,Flow Rate,holding,float32,GPM,0,50,1,0
0,E-Stop,coil,bool,,0,1,,
1,Motor Run,coil,bool,,0,1,,

Converting Vendor Data to CSV

Most Modbus device documentation provides register maps as tables in PDF or Excel. To convert:

  1. Identify the columns: Look for register address, name/description, data type, and units.
  2. Map register types: Holding registers (function code 03), input registers (04), coils (01), discrete inputs (02).
  3. Note multi-register values. A 32-bit value (float32, uint32, int32) occupies two consecutive 16-bit registers; a 64-bit value occupies four. Set the address to the first register. Serial Studio handles the rest.
  4. Add scaling if needed: If the device stores temperature as raw value × 0.1, add scale,0.1 to the CSV.
  5. Save as .csv with UTF-8 encoding.

Tip: You only need the address and name columns to get started. Everything else has sensible defaults.

XML Format

Two layouts are supported:

Flat (type as attribute):

xml
<modbus>
  <register address="0" type="holding" name="Temperature" dataType="uint16" units="°C" min="0" max="150" scale="0.1"/>
  <register address="0" type="coil" name="E-Stop"/>
</modbus>

Nested (type from parent element):

xml
<modbus>
  <holding-registers>
    <register address="0" name="Temperature" dataType="uint16" units="°C"/>
  </holding-registers>
  <coils>
    <register address="0" name="E-Stop"/>
  </coils>
</modbus>

Supported parent tags: holding-registers, input-registers, coils, discrete-inputs (with or without hyphens).

JSON Format

Two layouts are supported:

Flat (type per register):

json
{
  "registers": [
    {"address": 0, "type": "holding", "name": "Temperature", "dataType": "uint16", "units": "°C", "min": 0, "max": 150, "scale": 0.1},
    {"address": 0, "type": "coil", "name": "E-Stop", "dataType": "bool"}
  ]
}

Grouped (type from key):

json
{
  "holdingRegisters": [
    {"address": 0, "name": "Temperature", "dataType": "uint16", "units": "°C"}
  ],
  "coils": [
    {"address": 0, "name": "E-Stop"}
  ]
}

Supported group keys: holdingRegisters, holding_registers, holding, inputRegisters, input_registers, input, coils, discreteInputs, discrete_inputs, discrete.

What Gets Generated

The importer produces:

  • Register groups loaded into the Modbus driver (ready to connect immediately).
  • Project groups. One Data Grid group per contiguous block of same-type registers, plus one workspace per group and an Overview workspace.
  • Data tables. One table per block, with one register per entry; the parser publishes values into the tables and each dataset reads its value back through a small Lua transform, so datasets never depend on parser channel order.
  • Datasets. One per register entry, with name, units, min/max, a plot toggle, and widget type (LED with an alarm band for booleans, gauge for temperatures/pressures, bar for percentages). Plots and gauges open on demand from the Data Grid rows instead of crowding the dashboard.
  • Frame parser. A commented, editable Lua parser with one declarative spec line per register. It extracts values from Modbus protocol frames, handles data types (uint16, int16, float32, ...), and applies scaling/offset. See How Multi-Group Polling Works for details on how the parser handles multiple register groups.

Example Files

Below is the same hydraulic test stand register map in all three supported formats.

CSV:

csv
address,name,type,dataType,units,min,max,scale,offset
0,Temperature,holding,uint16,°C,0,150,0.1,0
1,Pressure,holding,uint16,PSI,0,5000,1,0
2,RPM,holding,uint16,RPM,0,3000,1,0
3,Valve Position,holding,uint16,%,0,100,0.1,0
4,Flow Rate,holding,float32,GPM,0,50,1,0
6,Motor Load,holding,uint16,%,0,100,0.1,0
7,Vibration,holding,uint16,mm/s,0,50,0.1,0
0,Pump Inlet Temp,input,int16,°C,-40,150,0.1,0
1,Pump Outlet Temp,input,int16,°C,-40,150,0.1,0
2,Ambient Temp,input,int16,°C,-40,80,0.1,0
0,E-Stop,coil,bool,,0,1,,
1,Motor Run,coil,bool,,0,1,,
2,Valve Open,coil,bool,,0,1,,
3,Alarm Active,coil,bool,,0,1,,
0,Door Sensor,discrete,bool,,0,1,,
1,Level Switch,discrete,bool,,0,1,,

JSON (flat format):

json
{
  "registers": [
    {"address": 0, "type": "holding", "name": "Temperature", "dataType": "uint16", "units": "°C", "min": 0, "max": 150, "scale": 0.1},
    {"address": 1, "type": "holding", "name": "Pressure", "dataType": "uint16", "units": "PSI", "min": 0, "max": 5000},
    {"address": 2, "type": "holding", "name": "RPM", "dataType": "uint16", "units": "RPM", "min": 0, "max": 3000},
    {"address": 3, "type": "holding", "name": "Valve Position", "dataType": "uint16", "units": "%", "min": 0, "max": 100, "scale": 0.1},
    {"address": 4, "type": "holding", "name": "Flow Rate", "dataType": "float32", "units": "GPM", "min": 0, "max": 50},
    {"address": 6, "type": "holding", "name": "Motor Load", "dataType": "uint16", "units": "%", "min": 0, "max": 100, "scale": 0.1},
    {"address": 7, "type": "holding", "name": "Vibration", "dataType": "uint16", "units": "mm/s", "min": 0, "max": 50, "scale": 0.1},
    {"address": 0, "type": "input", "name": "Pump Inlet Temp", "dataType": "int16", "units": "°C", "min": -40, "max": 150, "scale": 0.1},
    {"address": 1, "type": "input", "name": "Pump Outlet Temp", "dataType": "int16", "units": "°C", "min": -40, "max": 150, "scale": 0.1},
    {"address": 2, "type": "input", "name": "Ambient Temp", "dataType": "int16", "units": "°C", "min": -40, "max": 80, "scale": 0.1},
    {"address": 0, "type": "coil", "name": "E-Stop", "dataType": "bool"},
    {"address": 1, "type": "coil", "name": "Motor Run", "dataType": "bool"},
    {"address": 2, "type": "coil", "name": "Valve Open", "dataType": "bool"},
    {"address": 3, "type": "coil", "name": "Alarm Active", "dataType": "bool"},
    {"address": 0, "type": "discrete", "name": "Door Sensor", "dataType": "bool"},
    {"address": 1, "type": "discrete", "name": "Level Switch", "dataType": "bool"}
  ]
}

XML:

xml
<?xml version="1.0" encoding="UTF-8"?>
<modbus>
  <holding-registers>
    <register address="0" name="Temperature" dataType="uint16" units="°C" min="0" max="150" scale="0.1"/>
    <register address="1" name="Pressure" dataType="uint16" units="PSI" min="0" max="5000"/>
    <register address="2" name="RPM" dataType="uint16" units="RPM" min="0" max="3000"/>
    <register address="3" name="Valve Position" dataType="uint16" units="%" min="0" max="100" scale="0.1"/>
    <register address="4" name="Flow Rate" dataType="float32" units="GPM" min="0" max="50"/>
    <register address="6" name="Motor Load" dataType="uint16" units="%" min="0" max="100" scale="0.1"/>
    <register address="7" name="Vibration" dataType="uint16" units="mm/s" min="0" max="50" scale="0.1"/>
  </holding-registers>
  <input-registers>
    <register address="0" name="Pump Inlet Temp" dataType="int16" units="°C" min="-40" max="150" scale="0.1"/>
    <register address="1" name="Pump Outlet Temp" dataType="int16" units="°C" min="-40" max="150" scale="0.1"/>
    <register address="2" name="Ambient Temp" dataType="int16" units="°C" min="-40" max="80" scale="0.1"/>
  </input-registers>
  <coils>
    <register address="0" name="E-Stop"/>
    <register address="1" name="Motor Run"/>
    <register address="2" name="Valve Open"/>
    <register address="3" name="Alarm Active"/>
  </coils>
  <discrete-inputs>
    <register address="0" name="Door Sensor"/>
    <register address="1" name="Level Switch"/>
  </discrete-inputs>
</modbus>

How Multi-Group Polling Works

When a Modbus connection has multiple register groups, the driver and the auto-generated frame parser coordinate through a simple sequential protocol. Understanding this mechanism helps when debugging or customizing the generated parser.

Driver Side

Each poll cycle, the Modbus driver iterates through the configured register groups in order:

  1. Poll group 0 → wait for response → emit frame
  2. Poll group 1 → wait for response → emit frame
  3. Poll group 2 → wait for response → emit frame
  4. (next poll timer tick) → start again at group 0

The groups are always polled in the same fixed order (the order they appear in the register groups list). Each response is emitted as a separate frame to the data pipeline.

Parser Side

The generated Lua parser keeps a poll cursor that starts at the first register block. Each time a response frame arrives, the parser reads the Modbus function code (the second byte of the response) and matches it against the configured blocks, probing in cursor order. It decodes the matching block, publishes the extracted values into the block's data table, then advances the cursor to the block after the one it just decoded. Because matching is keyed on the function code rather than on cursor position alone, the parser snaps to the correct block even if a response is missing or arrives out of order.

Values are latched through the data tables: each register block updates only its own table registers, and every dataset reads its current value back from the table inside its transform, so values from other blocks carry over between frames. A single contiguous block decodes on every frame; with multiple blocks, the cursor walks through them as their responses arrive.

For two groups (e.g., holding registers at address 0 and coils at address 100), the response for the holding registers carries function code 0x03 and updates the temperature and pressure datasets, while the coils response carries function code 0x01 and updates the E-Stop and Motor Run datasets.

Frame with function 0x03 arrives → parser matches the holding-register block → extracts holding register values → advances the cursor. Frame with function 0x01 arrives → parser matches the coil block → extracts coil values → advances the cursor.

Practical Considerations

  • Typical group count: Most Modbus devices use 1–3 register groups. A single contiguous block of holding registers is the most common configuration.
  • Synchronization. Each poll cycle is sequential: group N+1 isn't polled until group N's response arrives. The parser also matches each response to a block by its Modbus function code, so it stays aligned even when block types differ.
  • Frame loss: If a Modbus response times out or is dropped (rare over TCP, uncommon over RTU), the parser latches the previous values for that block and resynchronizes on the next matching response. At typical poll rates (100 ms or slower), this causes at most a brief glitch.
  • Customization: The generated parser is editable Lua. Each register is one line in the BLOCKS spec (name, offset, type, optional scale/shift); to add a register, add a line there plus a matching data-table register and a dataset that reads it back with tableGet(). For larger changes, adjust the register groups and regenerate the project.

CAN Bus Setup (Pro)

License: Pro

Prerequisites: CAN-to-USB adapter (PEAK PCAN, Kvaser, CANable, SocketCAN-compatible) connected and drivers installed.

Steps

  1. In the Setup Panel, select CAN Bus from the I/O Interface dropdown.
  2. Select the CAN Driver (backend). The Qt plugins are socketcan (Linux), peakcan, vectorcan, systeccan, tinycan, and virtualcan; Serial Studio adds its own canable_gsusb (CANable USB), slcan (Serial CAN), and seeed_usbcan (Seeed / Waveshare) backends.
  3. Select the Interface from the dropdown (e.g., can0, PCAN_USBBUS1).
  4. Set the Bitrate to match the CAN network exactly. Default: 500000. Common values: 125000, 250000, 500000, 1000000 bps.
  5. Optionally enable Flexible Data-Rate if the network uses CAN FD frames. Listen-Only and Loopback toggles are available for passive monitoring and self-test.
  6. Click Connect.

To skip writing a project by hand, click Import DBC File… under DBC Database: the importer generates a complete project from a CAN signal database (see Auto-Generating Projects). Without a DBC, frames reach the frame parser as binary records (ID, DLC, payload); decode them with the Binary decoder and your own parse function.

Linux SocketCAN Preparation

Before connecting in Serial Studio, bring up the CAN interface from a terminal:

sudo ip link set can0 type can bitrate 500000
sudo ip link set up can0

For CAN FD, add the data bitrate:

sudo ip link set can0 type can bitrate 500000 dbitrate 2000000 fd on
sudo ip link set up can0

Troubleshooting

  • No messages received: Verify the bitrate matches the network exactly. Even a slight mismatch causes all frames to be rejected. Check CAN-H/CAN-L wiring and termination (120 ohm at each bus endpoint; measure approximately 60 ohm between CAN-H and CAN-L).
  • Interface not listed: Ensure the adapter driver is installed. On Linux, verify the interface is up with ip link show can0. On Windows, check Device Manager for the CAN adapter.
  • Error frames only: Bitrate mismatch, missing termination, or bus contention. Check all physical connections.

Full driver reference: CAN Bus.

Audio Input Setup (Pro)

License: Pro

Prerequisites: Audio input device (microphone, line-in, audio interface) connected and recognized by the OS.

Steps

  1. In the Setup Panel, select Audio from the I/O Interface dropdown.
  2. Select the Input Device from the dropdown (lists all detected audio capture devices).
  3. Select the Sample Rate. Common: 44100 Hz, 48000 Hz. Available rates depend on the device.
  4. Select the Sample Format. Options, as supported by the device: Unsigned 8-bit, Signed 16-bit, Signed 24-bit, Signed 32-bit, Float 32-bit.
  5. Select the Channels layout (Mono, Stereo, or a multichannel layout, depending on the device).
  6. Click Connect.

Audio data flows into the pipeline as PCM samples, which can be visualized with Plot, FFT Plot, and Waterfall widgets.

Troubleshooting

  • No audio detected: Verify the input device is selected correctly in the dropdown. Check the OS audio settings to confirm the input is not muted and the level is adequate. On macOS, grant Microphone permission.
  • Distorted signal: Reduce the input gain in OS audio settings. Use a line-in input instead of a microphone input when connecting sensors.
  • Wrong sample rate options: The available sample rates are reported by the hardware. If the rate you need is not listed, try a different audio interface.

Full driver reference: Audio.

Raw USB Setup (Pro)

License: Pro

Prerequisites: USB device with accessible bulk, control, or isochronous endpoints. On Linux, appropriate udev rules. On Windows, a WinUSB-compatible driver (installable via Zadig).

Steps

  1. In the Setup Panel, select USB Device from the I/O Interface dropdown.
  2. Pick the device from the USB Device dropdown. Devices are listed as VID:PID – Manufacturer Product.
  3. Select the Transfer Mode:
    • Bulk Stream (default): Standard synchronous bulk IN/OUT. Works for most devices.
    • Advanced (Bulk + Control): Bulk transfers plus vendor-specific control transfers. A confirmation dialog appears before enabling, since incorrect control requests can crash or damage hardware.
    • Isochronous: Asynchronous isochronous transfers for fixed-rate streaming.
  4. Select the IN Endpoint (for reading data from the device).
  5. Select the OUT Endpoint (for writing data to the device), if applicable.
  6. For Isochronous mode, set the Max Packet Size to the maximum transfer size reported by the selected endpoint (prefilled from the endpoint descriptor).
  7. Click Connect.

Troubleshooting

  • Device not listed: On Linux, add a udev rule granting your user access to the device's VID/PID, then run sudo udevadm control --reload-rules && sudo udevadm trigger. On Windows, use Zadig to install a WinUSB driver for the device. On macOS, the device should appear if no kernel driver has claimed it.
  • Permission denied: On Linux, verify the udev rule is correct and the user is in the appropriate group. Running as root is a quick test but not recommended for production.
  • No data: Verify the correct IN endpoint is selected. Check that the device firmware is sending data on that endpoint.

Full driver reference: USB.

HID Setup (Pro)

License: Pro

Prerequisites: USB HID-class device (gamepad, joystick, custom HID firmware, sensor) connected.

Steps

  1. In the Setup Panel, select HID Device from the I/O Interface dropdown.
  2. Wait for device enumeration. HID devices are re-enumerated every 2 seconds automatically.
  3. Pick the device from the HID Device dropdown. Devices are listed as Product Name (VID:PID).
  4. Review the Usage Page and Usage fields to confirm the correct device function is selected.
  5. Click Connect.

Troubleshooting

  • Device not listed: On Linux, add a udev rule for hidraw access: create a file in /etc/udev/rules.d/ with KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0666" (or a more restrictive rule targeting your VID/PID). On Windows and macOS, HID devices are generally accessible without additional configuration.
  • No data: Verify the device is actively sending HID reports. Some HID devices only send reports when there is a state change (e.g., button press on a gamepad).

Full driver reference: HID.

Process I/O setup: Launch mode (Pro)

License: Pro

Prerequisites: A script or executable that writes data to stdout in a format Serial Studio can parse.

Steps

  1. In the Setup Panel, select Process from the I/O Interface dropdown.
  2. Set the Mode to Launch Process.
  3. Enter the Executable path, or click Browse to select it. Bare command names are resolved through the PATH.
  4. Enter Arguments (command-line arguments for the process), if any.
  5. Optionally set the Working Dir for the process.
  6. Click Connect.

Serial Studio spawns the process, reads its merged stdout and stderr, and feeds the output into the data pipeline. You can write to the process's stdin via the console.

Troubleshooting

  • Process not found: Verify the executable path is correct. On Linux/macOS, ensure the script has execute permission (chmod +x script.py). For Python scripts, you may need to specify python3 as the executable and the script path as an argument.
  • No data: Ensure the script flushes its stdout (Python: use flush=True in print() or run with python3 -u). Buffered output will not appear until the buffer fills.
  • Process crashes immediately: Check the working directory and arguments. Review the console output for error messages from the process.

Full driver reference: Process I/O.

Process I/O setup: Named Pipe mode (Pro)

License: Pro

Prerequisites: An external process writing data to a named pipe (FIFO on Linux/macOS, \\.\pipe\Name on Windows).

Steps

  1. In the Setup Panel, select Process from the I/O Interface dropdown.
  2. Set the Mode to Named Pipe.
  3. Enter the Pipe Path, or click Browse to select it.
    • Linux/macOS: /tmp/myfifo (create with mkfifo /tmp/myfifo beforehand).
    • Windows: \\.\pipe\MyPipeName.
  4. Optionally click Pick Running Process… to choose a running process and derive a pipe-path suggestion from it.
  5. Click Connect.

Serial Studio opens the named pipe for reading and streams data into the pipeline. The external process must open the pipe for writing.

Troubleshooting

  • Cannot open pipe: Verify the pipe exists before connecting. On Linux/macOS, create it with mkfifo /path/to/pipe. On Windows, the pipe must be created by the writing process before Serial Studio connects.
  • No data: Ensure the external process is actively writing to the pipe. Named pipes block until both reader and writer are connected.

Full driver reference: Process I/O.

See Also