Driver options
Every libsigrok driver can take options. These relate to the driver finding and connecting to the device; once it's discovered these options are not used.
The following options are available, listen by configuration key:
SR_CONF_CONN
This option should be available in every driver, and identifies a connection string. The syntax of the string depends on the transport that driver can use to get to reach the device. Some drivers can use more than one transport, for example on devices that have both a USB and serial port.
Drivers must always support this option, because it allows the frontend to specify more than one device of the same type to connect to, for example two multimeters on two different serial ports.
The following syntaxes are available:
Serial port | A string of the form /dev/ttyS0 (POSIX) or COM1 (Windows).
|
USB | Either the device's VID and PID as hex digits separated by a period (1d6b.0001 ), or the bus and address separated by a period (2.43 ).
|
SR_CONF_SERIALCOMM
Serial communication specification, in the form:
<baudrate>/<databits><parity><stopbits>
baudrate
|
Integer | Baud rate |
databits
|
5, 6, 7, 8 | Number of data bits |
parity
|
n, e, o | None, even, odd. |
stopbits
|
1, 2 | Number of stop bits. |
The string may also be followed by one or more special settings, in the form /key=value
. Supported keys and their allowed values are:
rts
|
0, 1 | set the port's RTS pin to low or high |
dtr
|
0, 1 | set the port's DTR pin to low or high |
flow
|
0 | no flow control |
1 | Hardware-based (RTS/CTS) flow control | |
2 | Software-based (XON/XOFF) flow control |
Examples: 9600/8n1
, 600/7o2/dtr=1/rts=0
, 460800/8n1/flow=2
.
Please note that values and combinations of these parameters must be supported by the concrete serial interface hardware and the drivers for it. E. g. many USB to Serial Converters support only 7 or 8 data bits.