-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
MarkoV edited this page Oct 12, 2025
·
1 revision
BenchMesh uses a YAML configuration file to define connected devices and their settings.
The configuration file is located at:
benchmesh-serial-service/config.yaml
The configuration uses YAML v1 schema:
version: 1
devices:
- id: tenmapsu-1 # Unique device ID
name: "TENMA PSU" # Display name
driver: tenma_psu # Driver name
port: /dev/tty722540 # Serial port path
baud: 9600 # Baud rate
serial: 8N1 # Data bits, parity, stop bits
model: 72-2540 # Optional model override| Field | Description | Example |
|---|---|---|
id |
Unique identifier for the device |
psu-1, dmm-bench
|
name |
Human-readable display name | "Bench Power Supply" |
driver |
Driver module name |
tenma_72, owon_xdm
|
port |
Serial port path |
/dev/ttyUSB0, COM3
|
baud |
Baud rate |
9600, 115200
|
serial |
Serial format (data-parity-stop) |
8N1, 7E1
|
| Field | Description | Example |
|---|---|---|
model |
Override device model detection | 72-2540 |
The serial field specifies data bits, parity, and stop bits:
-
Data bits:
7or8 -
Parity:
N(none),E(even),O(odd) -
Stop bits:
1or2
Common formats:
-
8N1- 8 data bits, no parity, 1 stop bit (most common) -
7E1- 7 data bits, even parity, 1 stop bit -
8E1- 8 data bits, even parity, 1 stop bit
BenchMesh includes drivers for various instruments:
-
tenma_72(alias:tenma_psu) - Tenma 72-series programmable power supplies
-
owon_xsa- OWON XSA series spectrum analyzers
-
owon_xdm- OWON XDM series multimeters
-
owon_oel- OWON OEL series electronic loads
-
owon_dge- OWON DGE series function generators
List available serial ports:
ls -l /dev/ttyUSB*
ls -l /dev/ttyACM*For persistent device paths, use udev rules:
# Find device serial number
udevadm info -a -n /dev/ttyUSB0 | grep serial
# Create rule in /etc/udev/rules.d/99-benchmesh.rules
SUBSYSTEM=="tty", ATTRS{serial}=="A50285BI", SYMLINK+="tty722540"Serial ports appear as COM1, COM2, etc.
Check Device Manager:
- Open Device Manager
- Expand "Ports (COM & LPT)"
- Note the COM port number
List available ports:
ls -l /dev/tty.usb*
ls -l /dev/cu.usb*- Use descriptive IDs: Makes automation scripts more readable
- Persistent port paths: Use udev rules on Linux for stable device paths
- Document custom models: If using model overrides, document why
-
Backup configuration: Keep a backup copy of
config.yaml
- Click ⚙️ Configuration in the top bar
- Add, edit, or remove devices
- Click Save Configuration
- Restart the service for changes to take effect
- Stop the BenchMesh service
- Edit
benchmesh-serial-service/config.yaml - Validate YAML syntax
- Restart the service
The system validates configuration on startup:
- Required fields: Checks all required fields are present
- Driver existence: Verifies driver module exists
- Unique IDs: Ensures all device IDs are unique
- Serial format: Validates serial format string
Validation errors appear in the console log on startup.
version: 1
devices:
- id: psu-1
name: "Bench PSU"
driver: tenma_72
port: /dev/ttyUSB0
baud: 9600
serial: 8N1version: 1
devices:
- id: psu-main
name: "Main Power Supply"
driver: tenma_72
port: /dev/ttyUSB0
baud: 9600
serial: 8N1
- id: dmm-bench
name: "Bench Multimeter"
driver: owon_xdm
port: /dev/ttyUSB1
baud: 115200
serial: 8N1
- id: load-1
name: "Electronic Load"
driver: owon_oel
port: /dev/ttyUSB2
baud: 115200
serial: 8N1Override default configuration path:
export BENCHMESH_CONFIG=/path/to/custom/config.yaml
python -m benchmesh_service.main