[Pkg-electronics-devel] Bug#1036103: sigrok: Fails to work with AZDelivery Logic Analyzer, firmware fails to load.

Lisandro Damián Nicanor Pérez Meyer lisandro at debian.org
Mon May 15 14:57:52 BST 2023


Source: sigrok
Version: 0.3
Severity: normal
X-Debbugs-Cc: lisandro at debian.org

Hi!

sigrok-cli and pulseview fail to capture any data using the AZDelivery
Logic analyzer. I have tried the device with some proprietary software
and works (yes, I have cleaned up the udev rules after that).

Here is some output from sigrok-cli.

$ sudo sigrok-cli --driver fx2lafw --time 3s --output-format bits --channels D2 --triggers D2=r -l  5
sr: [00:00.000000] log: libsigrok loglevel set to 5.
sr: [00:00.000048] backend: libsigrok 0.5.2/5:1:1.
sr: [00:00.000079] backend: Libs: glib 2.74.4 (rt: 2.74.6/7406:6), libzip 1.7.3, libserialport 0.1.1/1:0:1 (rt: 0.1.1/1:0:1), libusb-1.0 1.0.26.11724 API 0x01000109, hidapi 0.12.0, bluez 5.66, libftdi 1.5.
sr: [00:00.000183] backend: Host: x86_64-pc-linux-gnu, little-endian.
sr: [00:00.000188] backend: SCPI backends: TCP, serial, USBTMC.
sr: [00:00.000192] backend: Firmware search paths:
sr: [00:00.000209] backend:  - /root/.local/share/sigrok-firmware
sr: [00:00.000217] backend:  - /usr/share/sigrok-firmware
sr: [00:00.000219] backend:  - /usr/local/share/sigrok-firmware
sr: [00:00.000226] backend:  - /usr/share/sigrok-firmware
sr: [00:00.000251] backend: Sanity-checking all drivers.
sr: [00:00.000258] backend: Sanity-checking all input modules.
sr: [00:00.000263] backend: Sanity-checking all output modules.
sr: [00:00.000272] backend: Sanity-checking all transform modules.
srd: libsigrokdecode loglevel set to 5.
sr: [00:00.008932] ezusb: uploading firmware to device on 3.21
sr: [00:00.012777] ezusb: setting CPU reset mode on...
sr: [00:00.025257] resource: Attempt to open '/root/.local/share/sigrok-firmware/fx2lafw-saleae-logic.fw' failed: No such file or directory
sr: [00:00.025318] resource: Opened '/usr/share/sigrok-firmware/fx2lafw-saleae-logic.fw'.
sr: [00:00.025365] ezusb: Uploading firmware 'fx2lafw-saleae-logic.fw'.
sr: [00:00.030346] ezusb: Uploaded 4096 bytes.
sr: [00:00.034356] ezusb: Uploaded 4024 bytes.
sr: [00:00.034400] ezusb: Firmware upload done.
sr: [00:00.034413] ezusb: setting CPU reset mode off...
sr: [00:00.035398] ezusb: Unable to send control request: LIBUSB_ERROR_PIPE.
sr: [00:00.035425] fx2lafw: Firmware upload failed for device 3.21 (logical), name fx2lafw-saleae-logic.fw.
sr: [00:00.035465] hwdriver: Scan found 1 devices (fx2lafw).
sr: [00:00.035580] device: fx2lafw: Opening device instance.
sr: [00:00.035596] fx2lafw: Firmware upload was not needed.
sr: [00:00.035930] fx2lafw: Unable to get version info: LIBUSB_ERROR_PIPE.
sr: [00:00.035961] fx2lafw: Failed to get firmware version.
sr: [00:00.035983] fx2lafw: Unable to open device.
Failed to open device.

So the firmware seems to be failing to load.

A second run will produce:

$ sudo sigrok-cli --driver fx2lafw --time 3s --output-format bits --channels D2 --triggers D2=r -l  5
sr: [00:00.000001] log: libsigrok loglevel set to 5.
sr: [00:00.000037] backend: libsigrok 0.5.2/5:1:1.
sr: [00:00.010010] backend: Libs: glib 2.74.4 (rt: 2.74.6/7406:6), libzip 1.7.3, libserialport 0.1.1/1:0:1 (rt: 0.1.1/1:0:1), libusb-1.0 1.0.26.11724 API 0x01000109, hidapi 0.12.0, bluez 5.66, libftdi 1.5.
sr: [00:00.010046] backend: Host: x86_64-pc-linux-gnu, little-endian.
sr: [00:00.010054] backend: SCPI backends: TCP, serial, USBTMC.
sr: [00:00.010069] backend: Firmware search paths:
sr: [00:00.010098] backend:  - /root/.local/share/sigrok-firmware
sr: [00:00.010104] backend:  - /usr/share/sigrok-firmware
sr: [00:00.010114] backend:  - /usr/local/share/sigrok-firmware
sr: [00:00.010122] backend:  - /usr/share/sigrok-firmware
sr: [00:00.010159] backend: Sanity-checking all drivers.
sr: [00:00.010187] backend: Sanity-checking all input modules.
sr: [00:00.010204] backend: Sanity-checking all output modules.
sr: [00:00.010229] backend: Sanity-checking all transform modules.
srd: libsigrokdecode loglevel set to 5.
sr: [00:00.037844] fx2lafw: Found an fx2lafw device.
sr: [00:00.037949] hwdriver: Scan found 1 devices (fx2lafw).
sr: [00:00.038240] device: fx2lafw: Opening device instance.
sr: [00:00.038249] fx2lafw: Firmware upload was not needed.
sr: [00:00.041830] fx2lafw: Opened device on 3.23 (logical) / usb/3-1.1.3 (physical), interface 0, firmware 1.4.
sr: [00:00.041863] fx2lafw: Detected REVID=1, it's a Cypress CY7C68013A (FX2LP).
sr: [00:00.041985] hwdriver: sr_config_list(): key 30014 (triggermatch) sdi 0x55f83e98e260 cg NULL -> [1, 2, 3, 4, 5]
sr: [00:00.042033] hwdriver: sr_config_get(): key 30000 (samplerate) sdi 0x55f83e98e260 cg NULL -> uint64 20000
sr: [00:00.042048] hwdriver: sr_config_set(): key 50001 (limit_samples) sdi 0x55f83e98e260 cg NULL -> uint64 60000
sr: [00:00.042070] session: Checking trigger:
sr: [00:00.042076] session: Stage 0 match on channel D2, match 3
sr: [00:00.042090] session: Using thread-default main context.
sr: [00:00.042096] session: Starting.
sr: [00:00.042102] hwdriver: fx2lafw: Starting acquisition.
sr: [00:00.042149] fx2lafw: submitting transfer: 0
sr: [00:00.042168] fx2lafw: submitting transfer: 1
sr: [00:00.042178] fx2lafw: submitting transfer: 2
sr: [00:00.042187] fx2lafw: submitting transfer: 3
sr: [00:00.042195] fx2lafw: submitting transfer: 4
sr: [00:00.042206] fx2lafw: submitting transfer: 5
sr: [00:00.042214] fx2lafw: submitting transfer: 6
sr: [00:00.042223] fx2lafw: submitting transfer: 7
sr: [00:00.042233] fx2lafw: submitting transfer: 8
sr: [00:00.042242] fx2lafw: submitting transfer: 9
sr: [00:00.042250] fx2lafw: submitting transfer: 10
sr: [00:00.042260] fx2lafw: submitting transfer: 11
sr: [00:00.042269] fx2lafw: submitting transfer: 12
sr: [00:00.042278] fx2lafw: submitting transfer: 13
sr: [00:00.042288] fx2lafw: submitting transfer: 14
sr: [00:00.042296] fx2lafw: submitting transfer: 15
sr: [00:00.042304] fx2lafw: submitting transfer: 16
sr: [00:00.042311] fx2lafw: submitting transfer: 17
sr: [00:00.042319] fx2lafw: submitting transfer: 18
sr: [00:00.042332] session: bus: Received SR_DF_HEADER packet.
cli: Received SR_DF_HEADER.
sr: [00:00.042354] hwdriver: sr_config_get(): key 30000 (samplerate) sdi 0x55f83e98e260 cg NULL -> uint64 20000
sr: [00:00.042394] fx2lafw: GPIF delay = 1499, clocksource = 30MHz.
sr: [00:00.070930] fx2lafw: receive_transfer(): status LIBUSB_TRANSFER_STALL received 0 bytes.
[snip many similar entries]
sr: [00:00.078453] fx2lafw: receive_transfer(): status LIBUSB_TRANSFER_STALL received 0 bytes.
sr: [00:00.078574] fx2lafw: receive_transfer(): status LIBUSB_TRANSFER_STALL received 0 bytes.
sr: [00:00.078691] fx2lafw: receive_transfer(): status LIBUSB_TRANSFER_STALL received 0 bytes.
sr: [00:00.078853] fx2lafw: receive_transfer(): status LIBUSB_TRANSFER_STALL received 0 bytes.]
sr: [00:00.079718] session: bus: Received SR_DF_END packet.
cli: Received SR_DF_END.
sr: [00:00.079776] usb: usb_source_finalize
sr: [00:00.079801] session: Stopped.
sr: [00:00.079825] hwdriver: Cleaning up all drivers.
sr: [00:00.079836] fx2lafw: Closing device on 3.23 (logical) / usb/3-1.1.3 (physical) interface 0.

But this might just be an artifact of the first fail.


-- System Information:
Debian Release: 12.0
  APT prefers buildd-unstable
  APT policy: (500, 'buildd-unstable'), (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, arm64

Kernel: Linux 6.1.0-8-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8), LANGUAGE=es
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled



More information about the Pkg-electronics-devel mailing list