Created attachment 701 [details] screenshot I am using PulseView 4.1 on my Raspberry Pi (4.2 is unfortunately not available). I am using Pulseview 5.0 on my PC (Windows). I am using it to do further analysis of the files obtained on Raspberry Pi. I can open the file and analyse data without any problem. However, when I want to do save the file on Windows, I get error Error while saving: invalid argument.
Hello, I'm suspecting an issue with file names or directory names. Does a directory or file name contain language-specific characters?
Created attachment 702 [details] file from PulseView 4.1
No. I have shared a sample file that creates problems.
sr: [00:25.914708] output/srzip: Unexpected unit size, discarding logic data. Okay, so the problem is the metadata says total probes=16 but also unitsize=1 which is not possible. Which device driver did you use to capture the data? My knee-jerk reaction is to say that the driver is broken and needs fixing. At the same time, it might also be nice to provide a generic solution that "soft"-fixes this - e.g. by limiting the probe count to the maximum that the unit size permits.
I am using Cypress FX2 board on Raspberry Pi 3. Yes, there are 16 probes, of which I use only 8. I have no idea what is unitsize and I do not changing this setting. By the way, despite the fact that Cypress supports frequencies up to 24MHz, I can only use up to 8MHz, because in other cases PulseView it stops recording data after about a second regardless of number of samples.
I have installed sigrok-firmware-fx2lafw on my Raspberry Pi 3, if it helps.
What's the VID:PID pair of your USB device before and after firmware upload? Closing PV, unplugging the FX2 and plugging it back in gives you the "before" pair - starting PV gives you the "after" pair as PV uploads the firmware to the FX2.
It is the same, 04b4:8613.
So is there any workaround for this problem before the bug is identified and removed? For example to edit *.sr file so that the metadata are correct?
As a workaround, you can open the .sr file in any zip archiver of your choice (it's a zip file with .sr instead of .zip) and edit the metadata file. In there, you'll see a probe count of 16 and a unit size of 1. If you're acquiring 16-bit data, probe count must be 16 and unit size must be 2. If you're acquiting 8-bit data, probe count must be 8 and unit size must be 1.
Thanks. That was very helpful. I hope you will identify and correct the bug soon.
I'm seeing the same issue, using fx2lafw 04B4:8613 on Windows 10. (fx2lafw:conn=3.2 - Cypress FX2 [S/N: Cypress FX2] with 16 channels) In PulseView it will capture and display data correctly, but cannot save as .sr file. It errors out with "Failed to save session. Error while saving: invalid argument" At the command line, I get: > sigrok-cli -d fx2lafw -c samplerate=24mhz --samples 500m -o filename.sr -C D0=CS,D1=MISO,D2=WP,D4=MOSI,D5=CLK,D6=HOLD sr: output/srzip: Unexpected unit size, discarding logic data. sr: output/srzip: Unexpected unit size, discarding logic data. sr: output/srzip: Unexpected unit size, discarding logic data. ... using sigrok-cli 0.8.0-git-7ce834c
Still present on master. The info above about editing the metadata file inside the .sr zip archive doesn't work since only total probes is present, unitsize is not. If I change probe number to 8 and put the edited metadata back into the .sr zip file, once I try to save again in pulseview, it throws the same error again. Do I need to exit the current session and open the edited .sr file as a new session?