Commit Graph

5114 Commits

Author SHA1 Message Date
Guido Trentalancia 396af5ad7d hameg-hmo: Beautify trigger pattern.
Beautify the trigger pattern by removing the quotes from the SCPI response
using sr_scpi_unquote_string() and improve the string pattern handling.
2019-07-26 00:55:40 +02:00
Guido Trentalancia a058de0410 hameg-hmo: Add missing 1ns timebase for some models.
Extend the timebase setting down to 1ns from the current limit
of 2ns for all supported series except the HMO Compact.
2019-07-26 00:55:40 +02:00
Guido Trentalancia 0184aca19d hameg-hmo: Add missing quotes for SCPI_CMD_SET_TRIGGER_PATTERN. 2019-07-26 00:11:07 +02:00
Guido Trentalancia b720f16eb5 hameg-hmo: Add RTA4000 MSO support (untested).
According to the latest available version of the manual, as
for the RTB2000 and RTM3000 series, the RTA4000 series also
uses a slightly different dialect than other previously
supported models, in particular when it comes to the POD
(logic channel groups) handling.

I do not have such model available for testing therefore, as
for the RTB2000 and RTM3000 support recently introduced, I do
not know whether or not the RTA4000 also understands the
existing dialect. In doubt, the new official dialect is
implemented by this patch.
2019-07-26 00:11:07 +02:00
Guido Trentalancia aac3063300 hameg-hmo: Add RTB2000 and RTM3000 MSO support (untested).
According to the latest available version of the manual, they
both use a slightly different dialect than currently supported
models, in particular when it comes to the POD (logic channel
groups) handling.

I do not have any of the above models available for testing
therefore I do not know whether or not they also understand
the existing dialect. In doubt, the new official dialect is
implemented by this patch.
2019-07-26 00:11:07 +02:00
Guido Trentalancia 3a247d0359 hameg-hmo: Add SR_CONF_LOGIC_ANALYZER drvopt. 2019-07-26 00:11:07 +02:00
Guido Trentalancia 4f3cb1eaf7 hameg-hmo: Fix the upper limit for the vertical scale. 2019-07-26 00:11:07 +02:00
Guido Trentalancia 1203acc78f hameg-hmo: Only update states after successful SCPI SET.
Update the oscilloscope state with new settings only after
they have been successfully stored in the device to avoid
an inconsistent state in case of SCPI SET command failure.
2019-07-26 00:11:07 +02:00
Guido Trentalancia 39e1972347 hameg-hmo: Fix for an incorrect samplerate being returned.
The hameg-hmo driver returns an incorrect sample rate: to reproduce this
bug, set the maximum sample rate from the ACQUIRE menu.

This patch fixes the driver so that the correct sample rate is returned.
2019-07-26 00:11:07 +02:00
Guido Trentalancia 3883934404 hameg-hmo: Avoid bogus SCPI timeouts.
During the initial configuration phase of the hameg-hmo driver
only send an OPC command if a SCPI command has been previously
sent to the device so that bogus SCPI timeouts are avoided.
2019-07-26 00:11:07 +02:00
Guido Trentalancia 262061ff3d hameg-hmo: Use 1-based (not 0-based) POD numbers.
The current starting index for the POD name is currently wrong as it is zero.

The official POD numbering starts instead at 1 (see device panel, buttons
and manual), so the current index used for message printing and groups
naming in the driver needs to be incremented by one.
2019-07-26 00:11:07 +02:00
Guido Trentalancia 830e24b68f hameg-hmo: SR_CONF_LIMIT_SAMPLES/_FRAMES don't support _GET.
The samples and frame acquisition limits are not stored in the device or
elsewhere. Therefore they should not be read.
2019-07-26 00:11:07 +02:00
Guido Trentalancia 673989692c hameg-hmo: Avoid a double-free.
Avoid double memory freeing leading to segmentation fault in when a SCPI
command fails to get a string due conditions such as a timeout or an invalid
command.
2019-07-26 00:11:07 +02:00
Guido Trentalancia 4fa4db2c79 hameg-hmo: Add SR_CONF_TRIGGER_PATTERN support.
Introduce support for the Pattern Trigger functionality, sometimes also
called Logic Trigger.
2019-07-26 00:11:07 +02:00
Guido Trentalancia c8ecfa6ea4 hameg-hmo: When setting slope, also set trigger type to edge.
When setting the type of slope for the edge trigger function, also set the
trigger type to edge because it is not necessarily configured that way and
therefore such functionality might fail to work properly!

This fixes parts of bug #1328.
2019-07-26 00:11:07 +02:00
Guido Trentalancia a9f3fa0548 hameg-hmo: Remove unused SCPI command enums, sort entries. 2019-07-26 00:11:07 +02:00
Guido Trentalancia 4cf90b8667 hameg-hmo: Add support for the HMO1202 MSO. 2019-07-26 00:11:07 +02:00
Guido Trentalancia e35ebc6aa3 hameg-hmo: Initial R&S RTC1000 MSO support attempt.
(might need testing)
2019-07-26 00:11:07 +02:00
Guido Trentalancia e131be0ac3 hameg-hmo: Add support for SR_CONF_LOGIC_THRESHOLD/_CUSTOM.
Update the Hameg/Rohde&Schwarz HMO driver (hameg-hmo) so that it
is possible to configure the logic threshold for digital signals.

The user can get or set the logic threshold configuration using
the channel group POD0 (and/or POD1 where available), for example:

sigrok-cli --driver hameg-hmo --get logic_threshold -g POD0
sigrok-cli --driver hameg-hmo --config logic_threshold=TTL --set -g POD0

sigrok-cli --driver hameg-hmo --get logic_threshold_custom -g POD0
sigrok-cli --driver hameg-hmo --config logic_threshold_custom=0.7 --set -g POD0
2019-07-26 00:11:07 +02:00
Guido Trentalancia 3308450089 hameg-hmo: Update the default serial port options.
Update the default serial port options for Rohde&Schwarz and
Hameg mixed-signal oscilloscope devices connected through USB.

Also, remove misplaced and unused serial port configuration option.

This patch complements fa3d104f17
in terms of updating the USB PIDs for new devices (HMO series).

This fixes parts of bug #1321.
2019-07-26 00:11:07 +02:00
Guido Trentalancia 232eb33c67 hameg-hmo: Try to find a valid serialcomm if none is supplied.
If no serial port option is specified on the command-line using the
"serialcomm" driver option, but the device is connected through USB
and it requires a known default serial port option, then use it in
order to avoid data corruption or even worse problems.

Note: the easiest way to reproduce data corruption on HMO3000 series
is to start an analog data acquisition (e.g. on channel CH1) after
switching from Ethernet mode to USB VCP mode (HO732 USB/Ethernet interface).

This fixes parts of bug #1321.
2019-07-26 00:11:07 +02:00
Guido Trentalancia bb0665868e hameg-hmo: Avoid getting stuck upon SCPI timeouts.
Correctly set the length of the buffer used to hold the SCPI response
from the device containing the binary acquisition data.

If a timeout occurs, truncate the buffer and send the partial response
from the device instead of getting stuck on timeouts!

Thanks to Stefan Brüns for reviewing the first version of this patch
and spotting out a serious problem with it.

This fixes bug #1323.
2019-07-26 00:11:07 +02:00
Guido Trentalancia d779dcacb7 hameg-hmo: Add SR_CONF_LIMIT_SAMPLES support.
At the moment only the maximum number of frames to be acquired can be
configured for the Hameg/Rohde&Schwarz HMO mixed-signal oscilloscope
series driver (hameg-hmo).

This patch adds support to configure the number of samples to acquire
in both analog and digital (logic) mode.
2019-07-26 00:11:07 +02:00
Guido Trentalancia 6d0f3508f7 hameg-hmo: Add support for 16 digital (logic) channels.
This patch introduces the support for 16 digital (logic) channels for the
following oscilloscope models: HMO3032, HMO3042, HMO3052 and HMO3522
(previously only 8 digital channels were supported, i.e. only 1 POD).
2019-07-26 00:11:07 +02:00
Guido Trentalancia 91525636a6 hameg-hmo: Remove invalid HMO2522, add missing HMO3522.
This patch takes care of removing an invalid product model (HMO2522)
and adds a missing product model (HMO3522) in the hameg-hmo driver,
thus extending the number of supported oscilloscope models.

This fixes bug #1322.
2019-07-26 00:11:07 +02:00
Guido Trentalancia 14cb6aa40a hameg-hmo: Use g_byte_array_free() instead of g_free().
Use the appropriate glib function to free memory (byte array).

This fixes bug #1324.
2019-07-26 00:10:35 +02:00
Guido Trentalancia 4fff7b3c8a Update the pkg-config (.pc) entry for libsigrok. 2019-07-26 00:10:35 +02:00
Guido Trentalancia 1bb348cdbf std: std_gvar_tuple_array/_rational: Fix GVariantBuilder type.
Fix the type of container used to initialize the GVariantBuilder
structure which builds an array of tuples.
2019-07-26 00:10:35 +02:00
Uwe Hermann 80d3497569 hantek-4032l: Fix broken triggering on low signal.
The trigger range/mask "compression" procedure is apparently not
required and breaks triggering on a low line state.

This has been verified to fix the issue on a Hantek 4032L with FPGA
version 0x4303. It is possible that the procedure mentioned above
might be required for other FPGA versions, though that is unknown.

If you experience trigger issues with other FPGA versions, please
contact us for further debugging and testing.

This fixes bug #1402.
2019-07-06 23:22:47 +02:00
Uwe Hermann e6bb2984e9 hantek-4032l: Cosmetics. 2019-07-06 23:21:22 +02:00
Nadav Mavor 744d683ca7 rigol-ds: Add Agilent DSO1000B series IDs 2019-07-06 16:54:26 +02:00
Mike Walters 0b0f40d864 scpi-pps: Support HP 66312a 2019-07-03 12:43:18 +01:00
Daniel Anselmi 6c6dd7328a bindings: Avoid "using namespace" in headers.
This fixes bug #1354.
2019-06-30 19:38:56 +02:00
Uwe Hermann 1ac6436468 udev: Add Siglent SDS1104X-E VID/PID.
This fixes bug #1357.
2019-06-30 19:06:46 +02:00
Uwe Hermann be7c63dcf8 serial_hid: Don't print empty strings, [aaaa.bbbb] VID/PID format. 2019-06-20 18:16:31 +02:00
Uwe Hermann c0aa074eb2 std: Factor out std_dummy_set_params(). 2019-06-20 17:56:29 +02:00
Gerhard Sittig e378e3a2d4 dmm/bm86x: unbreak temperature modes (two probes and no probes)
The Brymen BM86x supports up to two temperature probes. The dual display
can show individual temperatures of the two probes or differences. The
previous implementation "detected" a value of zero degrees when no probe
was attached and the display showed dash lines. When cycling assignments
of probes to displays, some valid combinations did not result in values
shown by the libsigrok driver.

An implementation detail of the formerly separate brymen-bm86x driver
was lost during recent migration of the dmm/bm86x parser into the
serial-dmm driver. When the meter's temperature function is selected,
it's essential to inspect the primary display's flags and digits, to
determine the secondary display's quantity and unit. Previous versions
never bothered to explicitly check for the "----" digits text, but the
combination of the primary's last digit showing C/F as well as the
binary C/F flags before the value provided hints which the secondary
displays group of digits and flags did not.

This fixes bug #1394.
2019-06-20 17:23:48 +02:00
Gerhard Sittig 3775ef8c7a dmm/bm86x: drop local packet dump, already done in serial-dmm 2019-06-20 17:21:47 +02:00
Gerhard Sittig d4f5170c39 doc: update README.devices, victor-dmm has moved into serial-dmm 2019-06-20 17:21:47 +02:00
Gerhard Sittig a1771c26ba serial_hid: make --list-serial output compatible with conn=, print "VID.PID"
When the list of all connections gets created which are supported by the
HID serial transport, items contain a "hid/ch9325/raw=/dev/hidraw3" path
and a "1a86:e008" pair of vendor and product IDs.

Separate the VID/PID pair by a period not a colon, so that --list-serial
output immediately becomes usable with "--driver <name>:conn=<spec>"
invocations. Eliminate the necessity to adjust clipboard context by the
user. This improves usability in cases where not a single connection
gets addressed, but a group of connections gets specified by ambiguous
conn= specs.

$ sigrok-cli -d uni-t-ut32x:conn=1a86.e008 --scan
2019-06-20 17:21:47 +02:00
Gerhard Sittig 87307940f1 serial_hid: address constness nits 2019-06-20 17:21:47 +02:00
Gerhard Sittig cb5cd1538f serial-lcr: add support for packet request
Some meters require the reception of a request before they provide
acquisition data. Add support for the chip driver's .packet_request()
routine, and timeout handling in the serial-lcr driver. This follows
the serial-dmm model.
2019-06-20 16:45:36 +02:00
Gerhard Sittig 3f5473dde2 serial-lcr: add support for chip specific channel names
Allow LCR chip drivers to specify custom printf() formats for their
channel names. Default to "P1" etc in the absence of format specs.
This implementation is similar to serial-dmm.
2019-06-20 16:45:36 +02:00
Gerhard Sittig 238b874e44 lcr/es51919: minor style nits in the ES51919 packet parser
Use macros for frequency constants. They hopfully are more readable than
large number literals with their magnitude being not as apparent.
2019-06-20 16:45:36 +02:00
Gerhard Sittig 8556703a6c dmm/eev121gw: visibility nits (single display parse routine)
The EEVBlog 121GW meter support always registers the three-displays
parse routine with the serial-dmm device driver. The single-display
routine need not be public. Adjust the visibility.

Reduce indentation for a continued line in a nearby declaration
while we are here.
2019-06-20 16:45:36 +02:00
Daniel Anselmi 08ecb98e84 ipdbg-la: Fix an issue when capture rate is 100%.
If the capture ratio was set to 100%, the delay counter-value has an
overflow and a delay of 0 samples is used.

This fixes bug #1393.
2019-06-20 14:30:05 +02:00
Uwe Hermann bf6b9e7b16 serial: Shorten a few code snippets. 2019-06-15 17:35:42 +02:00
Uwe Hermann c87e9d26f4 serial_hid.h: Update SER_HID_CHUNK_SIZE comment. 2019-06-15 17:17:52 +02:00
Uwe Hermann a90ffc3730 udev: Split SiLabs CP210x/CP2110 items, mention more devices. 2019-06-15 16:39:55 +02:00
Uwe Hermann 92499a9c78 serial-lcr: Replace duplicated std_session_send_frame_end(). 2019-06-15 15:54:48 +02:00