]> sigrok.org Git - libsigrok.git/log
libsigrok.git
4 years agohp-3478a: Add get/set/list of measurement ranges.
Frank Stettner [Fri, 13 Dec 2019 17:23:09 +0000 (18:23 +0100)]
hp-3478a: Add get/set/list of measurement ranges.

4 years agoAdd config key SR_CONF_DIGITS.
Frank Stettner [Tue, 17 Dec 2019 13:21:06 +0000 (14:21 +0100)]
Add config key SR_CONF_DIGITS.

4 years agoAdd config key SR_CONF_RANGE.
Frank Stettner [Tue, 17 Dec 2019 13:17:55 +0000 (14:17 +0100)]
Add config key SR_CONF_RANGE.

4 years agobeaglelogic: Fix mismatched printf specifiers.
Michał Janiszewski [Wed, 31 Oct 2018 21:17:20 +0000 (22:17 +0100)]
beaglelogic: Fix mismatched printf specifiers.

4 years agoREADME.devices: Various updates.
Uwe Hermann [Thu, 19 Dec 2019 21:15:43 +0000 (22:15 +0100)]
README.devices: Various updates.

 - Mention missing drivers that require (or not) firmware uploads.

 - Update HID "chip" spec options.

 - Remove rarely useful and hard to maintain lists of drivers requiring
   serial port, HID, Bluetooth, BLE, or network conn specs.

4 years agoREADME: Clarify bluez/libbluetooth name.
Uwe Hermann [Thu, 19 Dec 2019 21:13:51 +0000 (22:13 +0100)]
README: Clarify bluez/libbluetooth name.

4 years agoasix-sigma: comment on trigger/stop position, silence warning
Gerhard Sittig [Thu, 19 Dec 2019 19:30:00 +0000 (20:30 +0100)]
asix-sigma: comment on trigger/stop position, silence warning

Add a comment on the logic which skips the upper 64 bytes of a 512 bytes
chunk in the Asix Sigma's sample memory. Move the initial assignment and
the subsequent update from a value which was retrieved from a hardware
register closer together for awareness during maintenance. Pre-setting a
high position value that will never match when the feature is not in use
is very appropriate.

Adjust the sigma_read_pos() routine to handle triggerpos identically to
stoppos. The test condition's intention is to check whether a decrement
of the position ends up in the meta data section of a chunk. The previous
implementation tested whether a pointer to the position variable ended in
0x1ff when decremented -- which is unrelated to the driver's operation.
It's assumed that no harm was done because the trigger feature is
unsupported (see bug #359).

This silences the compiler warning reported in bug #1411.

4 years agoscpi-dmm: Added minimal support for HP34401A (PR #36)
Adrian Godwin [Tue, 3 Dec 2019 22:25:37 +0000 (22:25 +0000)]
scpi-dmm: Added minimal support for HP34401A (PR #36)

4 years agokorad-kaxxxxp: Add support for RND 320-KD3005P (PR #35)
Peter Åstrand [Sun, 17 Nov 2019 06:27:47 +0000 (07:27 +0100)]
korad-kaxxxxp: Add support for RND 320-KD3005P (PR #35)

Since this model replies with a serial number, truncate before that

4 years agolecroy-xstream: Remove header read (PR #33)
Sylvain Pelissier [Wed, 30 Oct 2019 15:24:32 +0000 (16:24 +0100)]
lecroy-xstream: Remove header read (PR #33)

4 years agofluke-dmm: Fix use-after-free bugs
Andreas Sandberg [Sun, 29 Sep 2019 15:38:17 +0000 (16:38 +0100)]
fluke-dmm: Fix use-after-free bugs

The handler for fluke 18x and 28x DMMs allocates several data
structures on the stack that are used after they have been freed when
creating a data feed packet.

Restructure the code so that all handlers send their own packets. As a
bonus, this avoid a couple of small heap allocations.

4 years agokorad-kaxxxxp: Reword debug output for the status byte.
Frank Stettner [Thu, 11 Apr 2019 09:54:31 +0000 (11:54 +0200)]
korad-kaxxxxp: Reword debug output for the status byte.

4 years agokorad-kaxxxxp: Send META packet when states have changed.
Frank Stettner [Sat, 6 Apr 2019 22:03:49 +0000 (00:03 +0200)]
korad-kaxxxxp: Send META packet when states have changed.

4 years agokorad-kaxxxxp: Fix bug when setting values while acquisition is running.
Frank Stettner [Tue, 9 Apr 2019 12:20:41 +0000 (14:20 +0200)]
korad-kaxxxxp: Fix bug when setting values while acquisition is running.

By separating the variables that holds the get and set values, the output
state, OVP and OCP can now be set while the acquisition is running.
Also some variables are named more clearly.

4 years agordtech-dps: Send META package when states have changed.
Frank Stettner [Wed, 22 May 2019 13:40:08 +0000 (15:40 +0200)]
rdtech-dps: Send META package when states have changed.

4 years agordtech-dps: Handle different current/voltage digits for the various models.
Frank Stettner [Sun, 19 May 2019 10:42:04 +0000 (12:42 +0200)]
rdtech-dps: Handle different current/voltage digits for the various models.

4 years agordtech-dps: Retry sr_modbus_read_holding_registers() up to 3 times.
Frank Stettner [Wed, 1 May 2019 21:18:13 +0000 (23:18 +0200)]
rdtech-dps: Retry sr_modbus_read_holding_registers() up to 3 times.

The communication with the rdtech power supplies is not very reliable,
especially during the start. Because of that, the driver tries to read the
modbus registers up to three times.
Nevertheless there is the chance, that the communication fails.

4 years agordtech-dps: Use SR_MQFLAG_DC only for voltage and current channels.
Frank Stettner [Tue, 9 Apr 2019 17:14:04 +0000 (19:14 +0200)]
rdtech-dps: Use SR_MQFLAG_DC only for voltage and current channels.

4 years agordtech-dps: Synchronize read and write operations.
Frank Stettner [Tue, 9 Apr 2019 17:08:52 +0000 (19:08 +0200)]
rdtech-dps: Synchronize read and write operations.

4 years agoAdd udev rule for Lecroy WaveRunner oscilloscope
Sylvain Pelissier [Mon, 4 Nov 2019 13:00:23 +0000 (14:00 +0100)]
Add udev rule for Lecroy WaveRunner oscilloscope

4 years agools: introduce metadata quirks support, unbreak Logic Shrimp
Gerhard Sittig [Sat, 5 Oct 2019 11:45:49 +0000 (13:45 +0200)]
ols: introduce metadata quirks support, unbreak Logic Shrimp

Introduce quirks support for devices which provide incomplete metadata.
Add conservative logic to unbreak the Logic Shrimp. Amend previously
received information when it was incomplete, but don't interfere if a
future firmware version fixes the issue.

Without this change, the device gets detected but "has zero channels"
and would be unusable. Because when a device provides metadata, these
details are used exclusively, no fallbacks apply.

4 years agostd: Remove call to sr_dev_close from std_serial_dev_acquisition_stop
Sylvain Munaut [Sat, 13 Oct 2018 13:51:15 +0000 (15:51 +0200)]
std: Remove call to sr_dev_close from std_serial_dev_acquisition_stop

There is no reason to close the entire device in acquisition_stop and
this actually breaks pulseview on serial devices using this callback
when running multiple acquisition cycles

This fixes bug #1271.

Signed-off-by: Sylvain Munaut <redacted>
4 years agodemo: Fix memory leak
Marc Schink [Wed, 30 Oct 2019 09:11:34 +0000 (10:11 +0100)]
demo: Fix memory leak

How to reproduce:

 $ G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind --leak-check=full sigrok-cli --scan --driver demo

Signed-off-by: Marc Schink <redacted>
4 years agomooshimeter-dmm: silence compiler warning (memset() prototypes)
Gerhard Sittig [Tue, 29 Oct 2019 16:48:31 +0000 (17:48 +0100)]
mooshimeter-dmm: silence compiler warning (memset() prototypes)

The Mooshimeter driver uses mem*() and str*() library calls. Include the
<string.h> header file to silence compiler warnings.

  ...
  ./src/hardware/mooshimeter-dmm/protocol.c: In function 'lookup_tree_path':
  ./src/hardware/mooshimeter-dmm/protocol.c:275:3: warning: implicit declaration of function 'strchr' [-Wimplicit-function-declaration]
     end = strchr(path, ':');
     ^
  ./src/hardware/mooshimeter-dmm/protocol.c:275:9: warning: incompatible implicit declaration of built-in function 'strchr' [enabled by default]
     end = strchr(path, ':');
           ^
  ...

4 years agobt: apply 20s timeout to BLE connect(2) attempts
Gerhard Sittig [Tue, 29 Oct 2019 16:42:34 +0000 (17:42 +0100)]
bt: apply 20s timeout to BLE connect(2) attempts

Even working BLE devices won't immediately succeed in the first call to
connect(2), which is why the "in progress" phase was added. But absent
peers made the previous implementation try forever, getting stuck in the
sr_bt_connect_ble() call.

Try to balance these two constraints. Do terminate BLE connect attempts
after a generous timeout. When this 20s period passed, there probably is
a configuration error or unresponsive peer. Yet the timeout needs to be
in this ballpark to not erroneously fail for working setups.

4 years agobt/bt_bluez: Adjust some log levels.
Uwe Hermann [Sat, 26 Oct 2019 19:10:32 +0000 (21:10 +0200)]
bt/bt_bluez: Adjust some log levels.

4 years agobt/bt_bluez: Remove some no longer needed verbose log messages.
Uwe Hermann [Sat, 26 Oct 2019 19:08:59 +0000 (21:08 +0200)]
bt/bt_bluez: Remove some no longer needed verbose log messages.

4 years agoREADME: Mention new (optional) libgio dependency.
Uwe Hermann [Sat, 26 Oct 2019 19:30:42 +0000 (21:30 +0200)]
README: Mention new (optional) libgio dependency.

libgio may or may not be part of a larger libglib package, depending on
OS and distro.

4 years agomooshimeter-dmm: Only report successful scan upon working connection.
Uwe Hermann [Fri, 25 Oct 2019 14:58:27 +0000 (16:58 +0200)]
mooshimeter-dmm: Only report successful scan upon working connection.

4 years agoAdd support for the Mooshimeter DMM
Derek Hageman [Tue, 19 Feb 2019 23:26:27 +0000 (16:26 -0700)]
Add support for the Mooshimeter DMM

This adds support for the Mooshim Engineering BLE based Mooshimeter.
Because the meter requires raw BLE packets, the driver uses the BLE
layer directly. Since the meter has no physical way of configuring it,
the actual configuration is set entirely with sigrok device options.

4 years agoFix link errors when compiling with LTO enabled
Stefan Brüns [Sat, 14 Sep 2019 20:13:13 +0000 (22:13 +0200)]
Fix link errors when compiling with LTO enabled

When libsigrok is compiled with link-time-optimization, the linker
stumbles over the section named the same as the function. Whether this
is a compiler/linker bug or a coding error is unknown.

Renaming the special section (to the same as already used on OS X) avoids
the problem.

This fixes bug #1416.

4 years agobuild: unbreak C++ binding compilation with newer Doxygen (1.8.16)
Gerhard Sittig [Sun, 6 Oct 2019 08:08:09 +0000 (10:08 +0200)]
build: unbreak C++ binding compilation with newer Doxygen (1.8.16)

Doxygen version 1.8.16 introduced an issue which breaks the compilation
of sigrok's C++ binding (https://github.com/doxygen/doxygen/issues/7190).
Don't set the FILE_PATTERNS variable at all, instead of assigning an
empty value. This resolves bug #1422.

4 years agofx2lafw: allow for sampling at 48MHz, matching a fw change
Kate J. Temkin [Thu, 22 Aug 2019 01:12:33 +0000 (19:12 -0600)]
fx2lafw: allow for sampling at 48MHz, matching a fw change

4 years agomanson-hcs-3xxx: support new firmware for HCS-3202
Jan Luebbe [Wed, 11 Sep 2019 14:30:19 +0000 (16:30 +0200)]
manson-hcs-3xxx: support new firmware for HCS-3202

A recently bought device seems to use a different model string, but
still speaks the same protocol.

4 years agorigol-ds: Add initial Rigol MSO5000 support.
Sebastian Reichel [Wed, 15 May 2019 20:20:55 +0000 (22:20 +0200)]
rigol-ds: Add initial Rigol MSO5000 support.

This adds basic support for the Rigol MSO5000 series. It has
the same problems as the DS4000 series: Live capture provides
one digital channel per byte. Buffered memory returns the data
compressed (one byte has 8 digital channels), but the banks are
read separately. It's not possible to read uint16.

4 years agodemo: Add random analog signal generation
Miklos Marton [Wed, 10 Jul 2019 09:02:17 +0000 (11:02 +0200)]
demo: Add random analog signal generation

4 years agokorad-kaxxxxp: Add Korad KD6005P
Elen Eisendle [Sat, 20 Jul 2019 21:26:23 +0000 (23:26 +0200)]
korad-kaxxxxp: Add Korad KD6005P

4 years agolcr/vc4080: introduce LCR packet parser for Voltcraft 4080 (and PeakTech 2165)
Gerhard Sittig [Sat, 15 Jun 2019 20:38:37 +0000 (22:38 +0200)]
lcr/vc4080: introduce LCR packet parser for Voltcraft 4080 (and PeakTech 2165)

Introduce the lcr/vc4080.c source file which implements the parser for
the serial data stream of the Voltcraft 4080 LCR meter. Add the meter to
the list of supported devices in the serial-lcr driver, as well as the
PeakTech 2165 LCR meter which is another compatible device.

This implementation contains a workaround for USB based serial cables
which seem to suffer from incomplete parity handling (observed with the
FT232R based PeakTech cable). Similar approaches were seen in existing
DMM drivers.

This implementation supports the main and secondary displays. The D and Q
"displays" which are communicated in the serial packets appear unreliable
and redundant, users can have the D and Q values shown in the supported
displays.

4 years agoserial-lcr: also request packets before initial state retrieval
Gerhard Sittig [Sun, 23 Jun 2019 06:19:39 +0000 (08:19 +0200)]
serial-lcr: also request packets before initial state retrieval

Commit cb5cd1538f5d introduced packet request support in the serial-lcr
device driver. Calls were added to the detection of the device's
presence, and the periodic acquisition of measurement data. Add another
call to the device configuration retrieval that follows the presence
detection, without it communication timed out with no data received.

Also slightly raise the timeout for this device configuration gathering
phase. With one second sharp, the VC4080 was detected, but getting its
current configuration kept failing. This device's serial communication
is extra slow (1200 bps) and the packets are rather large (39 bytes).
Which made the stream detect's receive routine stop checking for the
availability of more data while a packet was being received.

4 years agoserial-lcr: move probe, dev inst creation, data read out of scan
Gerhard Sittig [Sun, 16 Jun 2019 12:51:16 +0000 (14:51 +0200)]
serial-lcr: move probe, dev inst creation, data read out of scan

Move the initial device probe (LCR packet validity check), the creation
of the device instance after successful probe, and the subsequent packet
inspection after resource allocation out of the scan routine. This shall
improve readability of the serial-lcr driver's probe logic, and reduces
diffs when handling of multiple connections gets added later.

Add a developer comment, the serial-lcr driver needs to handle multiple
connections when the conn= spec is ambiguous (multiple cables of the
same type, with the same VID:PID).

4 years agodmm/bm86x.c: reduce verbosity level (packet request)
Gerhard Sittig [Sat, 29 Jun 2019 16:44:44 +0000 (18:44 +0200)]
dmm/bm86x.c: reduce verbosity level (packet request)

Remove a debug message from the Brymen BM86x meter's packet request method.

4 years agoserial_hid: reduce verbosity, drop excessive debug messages
Gerhard Sittig [Sun, 23 Jun 2019 06:36:54 +0000 (08:36 +0200)]
serial_hid: reduce verbosity, drop excessive debug messages

The HID transport for serial communication was rather noisy at log
levels of 4 and above. Now that test coverage was increased and
operation is stable, drop a lot of the excessive and redundant debug
messages in regular code paths.

4 years agoconfig keys: Revert re-orderings to avoid ABI changes.
Uwe Hermann [Tue, 30 Jul 2019 18:50:47 +0000 (20:50 +0200)]
config keys: Revert re-orderings to avoid ABI changes.

4 years agohameg-hmo: Fix two compiler warnings (-Wstringop-truncation).
Uwe Hermann [Tue, 30 Jul 2019 18:33:20 +0000 (20:33 +0200)]
hameg-hmo: Fix two compiler warnings (-Wstringop-truncation).

  src/hardware/hameg-hmo/protocol.c: In function ‘hmo_scope_state_get’:
  src/hardware/hameg-hmo/protocol.c:1130:2: warning: ‘strncpy’ specified bound 20 equals destination size [-Wstringop-truncation]
    strncpy(state->trigger_pattern,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     sr_scpi_unquote_string(tmp_str),
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     MAX_ANALOG_CHANNEL_COUNT + MAX_DIGITAL_CHANNEL_COUNT);
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    CC       src/hardware/hp-3478a/api.lo
    CC       src/hardware/hung-chang-dso-2100/protocol.lo
  src/hardware/hameg-hmo/api.c: In function ‘config_set’:
  src/hardware/hameg-hmo/api.c:388:3: warning: ‘strncpy’ specified bound 20 equals destination size [-Wstringop-truncation]
     strncpy(state->trigger_pattern,
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      tmp_str,
      ~~~~~~~~
      MAX_ANALOG_CHANNEL_COUNT + MAX_DIGITAL_CHANNEL_COUNT);
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

4 years agohameg-hmo: Fix two compiler warnings (-Warray-bounds).
Uwe Hermann [Tue, 30 Jul 2019 18:17:32 +0000 (20:17 +0200)]
hameg-hmo: Fix two compiler warnings (-Warray-bounds).

  src/hardware/hameg-hmo/protocol.c: In function ‘hmo_scope_state_get’:
  src/hardware/hameg-hmo/protocol.c:1035:31: warning: array subscript 0 is above array bounds of ‘char *[0]’ [-Warray-bounds]
     g_free(logic_threshold_short[i]);
            ~~~~~~~~~~~~~~~~~~~~~^~~
  src/hardware/hameg-hmo/protocol.c:1035:31: warning: array subscript 0 is above array bounds of ‘char *[0]’ [-Warray-bounds]
  src/hardware/hameg-hmo/protocol.c:974:24: warning: array subscript 0 is above array bounds of ‘char *[0]’ [-Warray-bounds]
     logic_threshold_short[i] = g_strdup((*config->logic_threshold)[i]);
     ~~~~~~~~~~~~~~~~~~~~~^~~
  src/hardware/hameg-hmo/protocol.c:974:24: warning: array subscript 0 is above array bounds of ‘char *[0]’ [-Warray-bounds]

4 years agohameg-hmo: Add SR_CONF_HIGH_RESOLUTION and SR_CONF_PEAK_DETECTION.
Guido Trentalancia [Wed, 21 Nov 2018 13:48:56 +0000 (14:48 +0100)]
hameg-hmo: Add SR_CONF_HIGH_RESOLUTION and SR_CONF_PEAK_DETECTION.

Implement High Resolution mode and Peak Detection settings.

Beautify the code by reordering the Trigger Source settings
definitions.

4 years agohameg-hmo: Get SCPI_CMD_GET_HORIZONTAL_DIV at runtime.
Guido Trentalancia [Tue, 20 Nov 2018 22:24:07 +0000 (23:24 +0100)]
hameg-hmo: Get SCPI_CMD_GET_HORIZONTAL_DIV at runtime.

Get the number of horizontal divisions from the device (at runtime)
instead of hardcoding its value in the driver.

4 years agohameg-hmo: Don't hardcode POD/channel numbers.
Guido Trentalancia [Tue, 20 Nov 2018 15:00:48 +0000 (16:00 +0100)]
hameg-hmo: Don't hardcode POD/channel numbers.

Don't hardcode the number of PODs or the number of logic (digital)
channels per POD.

4 years agohameg-hmo: Remove duplicate function call.
Guido Trentalancia [Tue, 20 Nov 2018 22:24:59 +0000 (23:24 +0100)]
hameg-hmo: Remove duplicate function call.

This call was inadvertently left around in commit
8cccbac8da97397b61aa094c67e62ee922b628ed.

4 years agohameg-hmo: Rename SCPI_CMD_GET_VERTICAL_DIV to *_SCALE.
Guido Trentalancia [Tue, 20 Nov 2018 22:22:29 +0000 (23:22 +0100)]
hameg-hmo: Rename SCPI_CMD_GET_VERTICAL_DIV to *_SCALE.

Fix the name of the SCPI command used to get the vertical scale.

4 years agohameg-hmo: Beautify trigger pattern.
Guido Trentalancia [Tue, 20 Nov 2018 18:35:33 +0000 (19:35 +0100)]
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.

4 years agohameg-hmo: Add missing 1ns timebase for some models.
Guido Trentalancia [Tue, 20 Nov 2018 16:07:04 +0000 (17:07 +0100)]
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.

4 years agohameg-hmo: Add missing quotes for SCPI_CMD_SET_TRIGGER_PATTERN.
Guido Trentalancia [Sat, 1 Dec 2018 21:45:26 +0000 (22:45 +0100)]
hameg-hmo: Add missing quotes for SCPI_CMD_SET_TRIGGER_PATTERN.

4 years agohameg-hmo: Add RTA4000 MSO support (untested).
Guido Trentalancia [Tue, 20 Nov 2018 13:59:08 +0000 (14:59 +0100)]
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.

4 years agohameg-hmo: Add RTB2000 and RTM3000 MSO support (untested).
Guido Trentalancia [Mon, 19 Nov 2018 22:39:46 +0000 (23:39 +0100)]
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.

4 years agohameg-hmo: Add SR_CONF_LOGIC_ANALYZER drvopt.
Guido Trentalancia [Sat, 29 Dec 2018 16:26:30 +0000 (17:26 +0100)]
hameg-hmo: Add SR_CONF_LOGIC_ANALYZER drvopt.

4 years agohameg-hmo: Fix the upper limit for the vertical scale.
Guido Trentalancia [Wed, 21 Nov 2018 15:17:14 +0000 (16:17 +0100)]
hameg-hmo: Fix the upper limit for the vertical scale.

4 years agohameg-hmo: Only update states after successful SCPI SET.
Guido Trentalancia [Sun, 18 Nov 2018 14:32:00 +0000 (15:32 +0100)]
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.

4 years agohameg-hmo: Fix for an incorrect samplerate being returned.
Guido Trentalancia [Sun, 18 Nov 2018 00:22:51 +0000 (01:22 +0100)]
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.

4 years agohameg-hmo: Avoid bogus SCPI timeouts.
Guido Trentalancia [Sat, 17 Nov 2018 21:20:29 +0000 (22:20 +0100)]
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.

4 years agohameg-hmo: Use 1-based (not 0-based) POD numbers.
Guido Trentalancia [Fri, 16 Nov 2018 20:51:49 +0000 (21:51 +0100)]
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.

4 years agohameg-hmo: SR_CONF_LIMIT_SAMPLES/_FRAMES don't support _GET.
Guido Trentalancia [Fri, 16 Nov 2018 17:49:53 +0000 (18:49 +0100)]
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.

4 years agohameg-hmo: Avoid a double-free.
Guido Trentalancia [Fri, 16 Nov 2018 17:48:36 +0000 (18:48 +0100)]
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.

4 years agohameg-hmo: Add SR_CONF_TRIGGER_PATTERN support.
Guido Trentalancia [Fri, 16 Nov 2018 17:47:55 +0000 (18:47 +0100)]
hameg-hmo: Add SR_CONF_TRIGGER_PATTERN support.

Introduce support for the Pattern Trigger functionality, sometimes also
called Logic Trigger.

4 years agohameg-hmo: When setting slope, also set trigger type to edge.
Guido Trentalancia [Fri, 16 Nov 2018 17:47:15 +0000 (18:47 +0100)]
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.

4 years agohameg-hmo: Remove unused SCPI command enums, sort entries.
Guido Trentalancia [Fri, 16 Nov 2018 17:46:39 +0000 (18:46 +0100)]
hameg-hmo: Remove unused SCPI command enums, sort entries.

4 years agohameg-hmo: Add support for the HMO1202 MSO.
Guido Trentalancia [Fri, 16 Nov 2018 17:45:50 +0000 (18:45 +0100)]
hameg-hmo: Add support for the HMO1202 MSO.

4 years agohameg-hmo: Initial R&S RTC1000 MSO support attempt.
Guido Trentalancia [Fri, 16 Nov 2018 17:44:41 +0000 (18:44 +0100)]
hameg-hmo: Initial R&S RTC1000 MSO support attempt.

(might need testing)

4 years agohameg-hmo: Add support for SR_CONF_LOGIC_THRESHOLD/_CUSTOM.
Guido Trentalancia [Fri, 16 Nov 2018 17:43:55 +0000 (18:43 +0100)]
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

4 years agohameg-hmo: Update the default serial port options.
Guido Trentalancia [Fri, 16 Nov 2018 17:43:25 +0000 (18:43 +0100)]
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 fa3d104f17966dd66664f5ee1cccd05856a7e312
in terms of updating the USB PIDs for new devices (HMO series).

This fixes parts of bug #1321.

4 years agohameg-hmo: Try to find a valid serialcomm if none is supplied.
Guido Trentalancia [Fri, 16 Nov 2018 17:42:47 +0000 (18:42 +0100)]
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.

4 years agohameg-hmo: Avoid getting stuck upon SCPI timeouts.
Guido Trentalancia [Fri, 16 Nov 2018 17:42:16 +0000 (18:42 +0100)]
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.

4 years agohameg-hmo: Add SR_CONF_LIMIT_SAMPLES support.
Guido Trentalancia [Fri, 16 Nov 2018 17:41:30 +0000 (18:41 +0100)]
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.

4 years agohameg-hmo: Add support for 16 digital (logic) channels.
Guido Trentalancia [Fri, 16 Nov 2018 17:39:59 +0000 (18:39 +0100)]
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).

4 years agohameg-hmo: Remove invalid HMO2522, add missing HMO3522.
Guido Trentalancia [Fri, 16 Nov 2018 17:39:36 +0000 (18:39 +0100)]
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.

4 years agohameg-hmo: Use g_byte_array_free() instead of g_free().
Guido Trentalancia [Fri, 16 Nov 2018 17:38:54 +0000 (18:38 +0100)]
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.

4 years agoUpdate the pkg-config (.pc) entry for libsigrok.
Guido Trentalancia [Fri, 16 Nov 2018 17:49:19 +0000 (18:49 +0100)]
Update the pkg-config (.pc) entry for libsigrok.

4 years agostd: std_gvar_tuple_array/_rational: Fix GVariantBuilder type.
Guido Trentalancia [Sun, 18 Nov 2018 23:01:04 +0000 (00:01 +0100)]
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.

4 years agohantek-4032l: Fix broken triggering on low signal.
Uwe Hermann [Sat, 6 Jul 2019 21:22:47 +0000 (23:22 +0200)]
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.

4 years agohantek-4032l: Cosmetics.
Uwe Hermann [Sat, 6 Jul 2019 21:21:22 +0000 (23:21 +0200)]
hantek-4032l: Cosmetics.

4 years agorigol-ds: Add Agilent DSO1000B series IDs
Nadav Mavor [Sun, 23 Jun 2019 02:41:46 +0000 (22:41 -0400)]
rigol-ds: Add Agilent DSO1000B series IDs

4 years agoscpi-pps: Support HP 66312a
Mike Walters [Tue, 2 Jul 2019 23:00:09 +0000 (00:00 +0100)]
scpi-pps: Support HP 66312a

4 years agobindings: Avoid "using namespace" in headers.
Daniel Anselmi [Wed, 30 Jan 2019 11:27:23 +0000 (12:27 +0100)]
bindings: Avoid "using namespace" in headers.

This fixes bug #1354.

4 years agoudev: Add Siglent SDS1104X-E VID/PID.
Uwe Hermann [Sun, 30 Jun 2019 17:06:46 +0000 (19:06 +0200)]
udev: Add Siglent SDS1104X-E VID/PID.

This fixes bug #1357.

4 years agoserial_hid: Don't print empty strings, [aaaa.bbbb] VID/PID format.
Uwe Hermann [Thu, 20 Jun 2019 16:16:31 +0000 (18:16 +0200)]
serial_hid: Don't print empty strings, [aaaa.bbbb] VID/PID format.

4 years agostd: Factor out std_dummy_set_params().
Uwe Hermann [Thu, 20 Jun 2019 15:50:35 +0000 (17:50 +0200)]
std: Factor out std_dummy_set_params().

4 years agodmm/bm86x: unbreak temperature modes (two probes and no probes)
Gerhard Sittig [Thu, 20 Jun 2019 09:53:36 +0000 (11:53 +0200)]
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.

4 years agodmm/bm86x: drop local packet dump, already done in serial-dmm
Gerhard Sittig [Thu, 20 Jun 2019 12:46:22 +0000 (14:46 +0200)]
dmm/bm86x: drop local packet dump, already done in serial-dmm

4 years agodoc: update README.devices, victor-dmm has moved into serial-dmm
Gerhard Sittig [Thu, 20 Jun 2019 09:41:03 +0000 (11:41 +0200)]
doc: update README.devices, victor-dmm has moved into serial-dmm

4 years agoserial_hid: make --list-serial output compatible with conn=, print "VID.PID"
Gerhard Sittig [Thu, 20 Jun 2019 09:06:22 +0000 (11:06 +0200)]
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

4 years agoserial_hid: address constness nits
Gerhard Sittig [Tue, 18 Jun 2019 16:57:44 +0000 (18:57 +0200)]
serial_hid: address constness nits

4 years agoserial-lcr: add support for packet request
Gerhard Sittig [Mon, 17 Jun 2019 20:59:25 +0000 (22:59 +0200)]
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.

4 years agoserial-lcr: add support for chip specific channel names
Gerhard Sittig [Mon, 17 Jun 2019 20:51:36 +0000 (22:51 +0200)]
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.

4 years agolcr/es51919: minor style nits in the ES51919 packet parser
Gerhard Sittig [Mon, 17 Jun 2019 20:44:44 +0000 (22:44 +0200)]
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.

4 years agodmm/eev121gw: visibility nits (single display parse routine)
Gerhard Sittig [Mon, 17 Jun 2019 20:40:26 +0000 (22:40 +0200)]
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.

4 years agoipdbg-la: Fix an issue when capture rate is 100%.
Daniel Anselmi [Thu, 20 Jun 2019 12:19:57 +0000 (14:19 +0200)]
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.

4 years agoserial: Shorten a few code snippets.
Uwe Hermann [Sat, 15 Jun 2019 15:35:42 +0000 (17:35 +0200)]
serial: Shorten a few code snippets.

4 years agoserial_hid.h: Update SER_HID_CHUNK_SIZE comment.
Uwe Hermann [Sat, 15 Jun 2019 15:17:52 +0000 (17:17 +0200)]
serial_hid.h: Update SER_HID_CHUNK_SIZE comment.

4 years agoudev: Split SiLabs CP210x/CP2110 items, mention more devices.
Uwe Hermann [Sat, 15 Jun 2019 14:39:55 +0000 (16:39 +0200)]
udev: Split SiLabs CP210x/CP2110 items, mention more devices.

4 years agoserial-lcr: Replace duplicated std_session_send_frame_end().
Uwe Hermann [Sat, 15 Jun 2019 13:54:48 +0000 (15:54 +0200)]
serial-lcr: Replace duplicated std_session_send_frame_end().