User Guide
Click on any topic to expand step-by-step instructions
Connecting to a Serial Device
Connect to any serial (UART / RS-232) device through a USB-to-serial adapter or a built-in USB serial interface (like on Arduino or ESP32 DevKit boards).
Step by step
- Plug in your device — USB-to-serial adapter, Arduino, ESP32, or any serial device. ComIO.Studio will auto-detect the new port via USB hotplug — it appears in the dropdown automatically.
- Select the port from the Port dropdown (e.g.,
/dev/ttyUSB0on Linux,COM3on Windows). You can also click the ⟳ (refresh) button to manually refresh the list. - Set Baud Rate — choose from the dropdown. Must match your device. Most common:
9600or115200. - Optionally adjust other settings:
- Data bits: 5, 6, 7, or 8 (default)
- Parity: None (default), Odd, or Even
- Stop bits: 1 (default) or 2
- Flow control: No FC (default), XON/XOFF, or RTS/CTS
- Click "Connect".
- The LED indicator turns green, status shows "On", and the status bar displays your configuration (e.g.,
115200 8N1 No FC). - Incoming data now appears in the terminal window.
Changing settings while connected
You can change baud rate, data bits, parity, stop bits, and flow control while connected — changes are applied instantly without disconnecting.
Control lines
Two toggle switches let you manually set output lines:
- RTS (Request To Send) — toggle on/off
- DTR (Data Terminal Ready) — toggle on/off
Four read-only indicators show the current state of input lines:
- DSR (Data Set Ready), CTS (Clear To Send), DCD (Data Carrier Detect), RI (Ring Indicator)
Terminal Display & Data Buffer
The main terminal window shows all incoming (RX) and outgoing (TX) data with color coding — green for RX, blue for TX.
Toolbar controls
- Encoding — display format:
- ASCII (default) — text with line assembly
- HEX — raw bytes in hexadecimal
- ASCII + HEX — both together
- Autoscroll — when ON (default), terminal auto-scrolls to the latest data
- TS RX / TS TX — toggle timestamps for received / transmitted data (both ON by default)
- ANSI — parse ANSI escape codes for colored output (ON by default)
- VT100 — full VT100 terminal emulation with cursor positioning and screen control (OFF by default)
- RX line ending — how to split incoming data into lines: Raw, LF, CR, or CRLF (default)
- Buffer limit — maximum memory: 5 MB, 10 MB (default), 15 MB, or 20 MB
Search
Type in the Search field to highlight matching lines. Use < and > buttons to jump between matches. A counter (e.g., 3/15) shows your position.
Save & Clear
- "Save" — downloads terminal contents as a text file
- "Clear" — clears the terminal and resets RX/TX statistics
Right-click context menu
- Copy (Ctrl+C) — copy selected text
- Add to Send — paste selected text into the command input field
- Send — immediately send the selected text to the serial port
- Select All (Ctrl+A) — select all terminal content
- Clear Terminal — same as the Clear button
Statistics (sidebar)
- RX: bytes received
- TX: bytes sent
- Time: connection uptime
- Recon.: number of reconnections
Sending Commands
The command bar at the bottom of the screen is where you type and send data to the connected device.
Basic sending
- Type your command in the input field
- Choose format: Text (default) or Hex (e.g.,
FF 01 03 00) - Choose TX line ending: None, CR, LF (default), or CRLF — appended to every sent command
- Click "Send" or press Enter
Command history
Toggle "History" ON to see a dropdown with previously sent commands. You can also press ↑ / ↓ arrow keys to cycle through history. Click "Clear" in the dropdown header to erase all history.
Loop send
For repeated polling or keep-alive commands:
- Toggle "Loop" ON
- Set the interval in milliseconds (default: 1000 ms, range: 10–60000)
- Type your command and click "Send" — the command is sent repeatedly at the set interval
- The button changes to "Stop" (red) — click it to stop the loop
File send
Send the contents of a file through the serial port:
- Click "Choose file" and select a file
- Optionally set delay between chunks (0–1000 ms) for slow devices
- Click "Send file" — a progress bar shows the transfer status
Using Macros (M1–M6)
Macros are one-click command shortcuts. You have 6 macro buttons (M1–M6) in the sidebar.
How to set up macros
- Click the "Edit" button in the Macros section — a modal window opens with all 6 macros
- For each macro, fill in:
- Name — the label shown on the button (e.g., "Reset", "Init")
- Data — the command to send (e.g.,
ATZorFF 01 03) - Mode — Text or Hex
- EOL — line ending: None, CR, LF, or CRLF
- Click "Save" to save all macros, or "Cancel" to discard changes
Using macros
Click any macro button (M1–M6) in the sidebar grid — the command is sent immediately. The button shows the custom name you set, or "M1"–"M6" if unnamed. Hovering shows a tooltip with the macro content.
Example: ESP8266 AT commands
M1: Name="AT" Data="AT" EOL=CRLF
M2: Name="Version" Data="AT+GMR" EOL=CRLF
M3: Name="Reset" Data="AT+RST" EOL=CRLF
M4: Name="WiFi" Data="AT+CWLAP" EOL=CRLF
Setting Up Triggers
Triggers watch incoming serial data and automatically send a response when a text pattern is detected.
How to create a trigger
- Click the "Edit" button in the Triggers section — a modal window opens
- Click "+ Add" to add a new trigger rule
- Fill in the fields:
- Pattern — the text to detect in incoming data (e.g.,
Password:) - → (arrow separator)
- Response — what to auto-send back (e.g.,
mypassword) - Mode — Text or Hex
- EOL — line ending: None, CR, LF, or CRLF
- Pattern — the text to detect in incoming data (e.g.,
- Click "Save"
Managing triggers
- Enable/Disable individual trigger — toggle switch next to each rule
- Remove a trigger — click ✕ on the right side of the rule
- "Active" toggle (in the sidebar) — enables or disables ALL triggers at once
- Rule count — shows how many rules are configured (e.g., "3 rules")
Example: Auto-login
Pattern: "Password:"
Response: "mypassword" EOL=CRLF
→ When the device sends "Password:", ComIO.Studio
automatically replies with "mypassword\r\n".
Example: Keep-alive
Pattern: "PING"
Response: "PONG" EOL=LF
→ Device sends "PING" → auto-reply "PONG\n".
Lua Scripting
ComIO.Studio includes a Lua 5.4 scripting engine for automating complex serial communication workflows.
Script editor
- Click "Edit" in the Lua Script section — a modal editor opens with syntax highlighting
- Write your Lua code, or select an example from the "📚 Examples..." dropdown
- "Open" — load a
.luaor.txtfile from disk - "Save" / "Save As" — save your script to disk
- "Close" — close the editor (code is auto-saved in memory)
Running scripts
- Make sure the serial port is connected (the Run button is disabled otherwise)
- Click "Run" — status changes to "Running"
- Script output appears in the terminal as
📜 [Script] ... - Click "Stop" to terminate a running script
Lua API Reference
-- ═══ Serial Port ═══
serial.send("AT+GMR\r\n") -- Send text data
serial.send_hex("FF 01 02 03") -- Send hex bytes
serial.send_raw(binary_string) -- Send raw binary data
serial.read_all() -- Read all buffered data
serial.wait_for("OK", 5000) -- Wait for pattern (timeout ms)
serial.wait_for_bytes(25, 3000) -- Wait for N bytes (timeout ms)
-- ═══ Utility ═══
comio.sleep(1000) -- Pause execution (milliseconds)
comio.log("message") -- Print to terminal output
comio.timestamp() -- Get current timestamp string
comio.to_hex(data) -- Convert binary to hex string
comio.crc16_modbus(data) -- Calculate Modbus CRC16
Example: AT command test
comio.log("Starting AT command test...")
serial.send("AT\r\n")
local resp = serial.wait_for("OK", 3000)
if resp then
comio.log("✅ AT responded OK")
else
comio.log("❌ No response — check connection")
return
end
serial.send("AT+GMR\r\n")
resp = serial.wait_for("OK", 3000)
comio.log("Firmware: " .. (resp or "unknown"))
comio.log("✅ Test complete!")
Example: Modbus RTU query
-- Read 10 holding registers from device at address 1
local addr = 0x01
local func = 0x03
local start_reg = 0x0000
local num_regs = 0x000A
local frame = string.char(addr, func,
(start_reg >> 8) & 0xFF, start_reg & 0xFF,
(num_regs >> 8) & 0xFF, num_regs & 0xFF)
local crc = comio.crc16_modbus(frame)
frame = frame .. string.char(crc & 0xFF, (crc >> 8) & 0xFF)
serial.send_raw(frame)
local resp = serial.wait_for_bytes(25, 3000)
comio.log("Response: " .. comio.to_hex(resp))
.lua files. Edit them in the built-in editor or any external text editor.
Flashing Firmware (MCU Programmer)
Flash firmware directly to microcontrollers through the serial port (UART bootloader). This uses the chip's built-in UART bootloader — you only need a USB-to-serial connection, no external hardware programmers (JTAG/SWD) are needed.
Supported chip families
- ESP32 (Espressif) — all ESP32 variants
- ESP8266 (Espressif) — ESP-01, NodeMCU, etc.
- STM32 (ST UART Bootloader) — chips with built-in UART bootloader
- AVR (Arduino STK500) — via serial bootloader protocol
Step by step
- Select your Target chip family from the dropdown
- Make sure the correct serial port is selected in the Connection panel
- Click "Select Files" — a popup shows firmware segments. Each segment has:
- Segment name (e.g., "Bootloader", "Firmware")
- Address — flash memory address (e.g.,
0x01000) - "Browse" — select a
.bin,.hex, or.elffile
- For ESP32/ESP8266 you can click "+ Add segment" to add more files
- Click ⚙ (Settings) to configure flash parameters:
- Flash Mode — QIO, DIO, DOUT
- Flash Frequency
- Flash Size — auto-detect or manual selection
- Verify, Compress, Use stub loader toggles
- Connect Timeout
- Put your device in flash/boot mode:
- ESP8266/ESP32: hold GPIO0 LOW, then reset
- STM32: set BOOT0 pin HIGH, then reset
- AVR: reset the board (bootloader activates automatically)
- Click "Flash" — a circular progress ring shows the status
Other buttons
- "Erase" — erase the entire flash memory
- "Detect" — identify the connected chip (name, flash size, MAC address)
Example: ESP8266 AT firmware (1MB flash)
Segment 1: Bootloader @ 0x00000 → boot_v1.7.bin
Segment 2: Firmware @ 0x01000 → user1.1024.new.2.bin
Segment 3: Init Data @ 0xFC000 → esp_init_data_default.bin
Segment 4: Blank (RF) @ 0x7E000 → blank.bin
Segment 5: Blank (sys) @ 0xFE000 → blank.bin
AI Assistant
The AI panel on the right side is a chat assistant that understands your serial communication context. It sees your port configuration, recent terminal data, and can help with protocol analysis, troubleshooting, and code generation.
Opening the AI panel
Click the 🤖 button in the title bar to show or hide the AI panel.
Tabs
- Chat — main conversation interface
- History — saved chat sessions (↩ to load a previous session, ✕ to delete it)
- Settings — customize the AI behavior:
- Temperature — controls response creativity (lower = more precise, higher = more creative)
- AI Assistant Instruction — custom system prompt that tells the AI how to behave, what domain to focus on, etc.
Using the chat
- Type your question in the input field
- Press Enter or click "Send"
- The AI automatically sees your serial port config and recent terminal data as context
- During generation, the button changes to "Cancel" — click to stop
- Click + to start a new chat session
What you can ask
- "What protocol is this data?" — paste hex data for protocol identification
- "Why is my device not responding?" — troubleshooting with context
- "Write a Lua script that reads temperature every 5 seconds"
- "Decode this frame: 01 03 04 00 64 00 C8" — byte-level Modbus analysis
- "What baud rate should I use for this chip?"
- "Explain what my device is sending" — AI reads terminal buffer and analyzes
Logging to File
The Logging section in the sidebar captures serial data to a downloadable file — separate from the terminal display.
How to use
- Toggle "Log" ON — logging starts immediately
- Choose format:
- Text — plain text output
- Hex — raw bytes in hexadecimal
- Mixed (default) — text with hex for non-printable bytes
- Toggle "TS" to add timestamps (
[HH:MM:SS.mmm]) to each line (ON by default) - Click "Download" to save the log as a
.txtfile - Toggle "Log" OFF when done
The log captures both RX and TX data with direction prefixes. Buffer holds up to 100,000 lines.
Menu Bar & Panels
The title bar contains the application menu and window controls.
File menu
- New session — reset the workspace
- Exit — close the application
Edit menu
- Copy — copy selected terminal text
- Paste — paste into the command input
- Select all — select all terminal content
View menu
- Language — switch UI language
- Theme — change color scheme
- Panels — show/hide sidebar sections: Connection, Statistics, Macros, Triggers, Lua Script, Logging
ComIO menu
- License — view or enter your license key
- Pricing & Plans — subscription options
- About — application version info
Need more information?
Check out the about page or contact us directly.
What is ComIO.Studio? → View pricing plans → ✉ Contact us