Difference between revisions of "Connection parameters"

From sigrok
Jump to navigation Jump to search
m (fix links)
Line 67: Line 67:
<source lang="bash">
<source lang="bash">
$ sigrok-cli --driver=hameg-hmo:conn=tcp-raw/192.168.1.20/5025 -O analog -frames 1
$ sigrok-cli --driver=hameg-hmo:conn=tcp-raw/192.168.1.20/5025 -O analog -frames 1
</source>
== Linux-GPIB ==
For GPIB devices connected via [http://linux-gpib.sourceforge.net/ linux-gpib], use the <code>libgpib</code> prefix, followed by the device name as defined in your <code>gpib.conf</code> file.
<source lang="bash">
$ sigrok-cli --driver=spci-pps:conn=libgpib/pm2813 -O analog -samples 1
</source>
</source>



Revision as of 15:39, 18 April 2016

In case a device can not be autodetected or connection to a specific device is required, is is possible to specify the connection explicitly as an driver option, using the "<driver-name>:conn=<connection>" syntax.

Digital Multimeters

Most multimeters use a serial connection. The corresponding device cables either povide an RS232 connection or an USB connection using an serial to USB-CDC or serial to USB-HID converter chip, see Serial port. Some devices are available with different data cables. RS232 and USB-CDC (Virtual Com Port, VCP) cables use a common driver, USB HID cables need a seperate one. If a device has two drivers, the one for RS232/VCP is typically suffixed with "-ser"

RS232 / Virtual Com Port

conn=<device-path>

<device-path> is an absolute path to the wanted device, e.g. /dev/ttyUSB1 or /dev/ttyACM0.

$ sigrok-cli --driver=uni-t-ut61e-ser:conn=/dev/ttyUSB0 -O analog

USB HID connections

conn=<vendor-id>.<product-id>

<vendor-id> and <product-id> have to be specifid as 4 hexadecimal digits.

conn=<bus-nr>.<device-address>

<bus-nr> is an integer betwenn 1 and 255, <device-address> is an integer between 1 and 127. The device address changes every time a device is reconnected. Bus number and device address can e.g. be found using lsusb.

$ sigrok-cli --driver=uni-t-ut61e:conn=1a86.e008 -O analog
$ sigrok-cli --driver=uni-t-ut61e:conn=2.12 -O analog

Devices using SCPI

SCPI has several backends. For all backends but serial the backend name is the first parameter, followed by one or more backend specific parameters.

Serial / Virtual Com Port

Same syntax as for DMMs with serial connection.

conn=<device-path>

$ sigrok-cli --driver=hameg-hmo:conn=/dev/ttyACM0 -O analog -frames 1

USBTMC

Similar syntax as for DMMs with USB HID datacables.

conn=usbtmc/<vendor-id>.<product-id>

conn=usbtmc/<bus-nr>.<device-address>

$ sigrok-cli --driver=hameg-hmo:conn=usbtmc/0aad.0119 -O analog -frames 1

TCP RAW

conn=tcp-raw/<ip-address>/<tcp-port>

$ sigrok-cli --driver=hameg-hmo:conn=tcp-raw/192.168.1.20/5025 -O analog -frames 1

Linux-GPIB

For GPIB devices connected via linux-gpib, use the libgpib prefix, followed by the device name as defined in your gpib.conf file.

$ sigrok-cli --driver=spci-pps:conn=libgpib/pm2813 -O analog -samples 1

Vendor specific protocols

Most (all?) devices using a vendor specific protocol use either RS232 or a USB-to-serial converter, thus the connection string is the same as for DMMs with serial connection.