New tools for RS-485 half-duplex communication:
- check_rs485_support: Detect hardware RS-485 capability via udev/ioctl
Reports driver type (FTDI/CP210x/CH340), kernel support, and recommendations
- rs485_transact: Send request and receive response with automatic
TX/RX turnaround timing. Handles manual RTS control when needed.
- rs485_scan_addresses: Scan bus for responding devices (1-247)
Useful for Modbus device discovery
open_serial_port() now auto-detects baud rate when baudrate=None (default).
Returns detection confidence and top candidates in response.
Falls back to DEFAULT_BAUDRATE (9600) if no data received or low confidence.
Optional autobaud_probe parameter for sync-based detection on echo devices.
Uses multiple heuristics for reliable detection:
- 0x55 sync pattern analysis (self-synchronizing byte)
- Bit transition counting (0x55 has 7 transitions vs ~3.5 avg)
- Byte distribution entropy (text clusters vs random)
- ASCII readability scoring with UTF-8 validation
- Line ending and null byte detection
Supports optional probe string (use "UUUUU" for sync-based detection
on echo-enabled devices). Returns top 5 candidates with confidence scores.
Flow control:
- xonxoff, rtscts, dsrdtr in open_serial_port and configure_serial
Timeouts:
- write_timeout and inter_byte_timeout support
New tools:
- read_until: read until custom terminator (not just newline)
- set_rs485_mode: half-duplex RS-485 for industrial/Modbus
- set_low_latency_mode: reduce kernel buffering latency (Linux)
- set_break_condition: hold/release break state
Also:
- exclusive port locking option in open_serial_port
- updated get_connection_status with all new fields
New tools for hardware control:
- get_modem_lines: read all input (CTS/DSR/RI/CD) and output (RTS/DTR) lines
- set_modem_lines: set RTS/DTR states
- pulse_line: pulse RTS or DTR for reset sequences (ESP32, Arduino, etc.)
- send_break: send serial break signal
Also added RI and CD to get_connection_status and port status resource.
FastMCP server for serial port access via Model Context Protocol:
- 10 tools: list, open, close, read, write, configure, flush, status
- 4 dynamic resources: ports list, data, status, raw hex
- USB device filtering (hides phantom ttyS ports by default)
- Full pyserial support with configurable baudrate/parity/etc