BeagleLogic icon indicating copy to clipboard operation
BeagleLogic copied to clipboard

Failed to set device option 'samplerate': generic/unspecified error

Open bmbtechnology opened this issue 3 years ago • 5 comments

Hi, I have installed on my linux debian machine all libsigrok libraries but when I am trying to send the following command: sigrok-cli -d beaglelogic -c samplerate=100k --continuous --channels P8_45 -O csv -o file.csv

I have the following error message:

Failed to set device option 'samplerate': generic/unspecified error

What could be the issue?

bmbtechnology avatar Aug 31 '22 13:08 bmbtechnology

sr: [00:00.000007] log: libsigrok loglevel set to 5. sr: [00:00.001735] backend: libsigrok 0.5.1/5:0:1 (rt: 0.5.1/5:0:1). sr: [00:00.002824] backend: Libs: glib 2.58.1 (rt: 2.58.3/5803:3), libzip 1.1.2, libserialport 0.1.1/1:0:1 (rt: 0.1.1/1:0:1), libusb-1.0 1.0.22.11312 API 0x01000106, libftdi 1.4. sr: [00:00.003685] backend: Host: arm-unknown-linux-gnueabihf, little-endian. sr: [00:00.004321] backend: SCPI backends: TCP, RPC, serial, USBTMC. sr: [00:00.004848] backend: Firmware search paths: sr: [00:00.005461] backend: - /root/.local/share/sigrok-firmware sr: [00:00.006009] backend: - /usr/share/sigrok-firmware sr: [00:00.006502] backend: - /usr/local/share/sigrok-firmware sr: [00:00.006993] backend: - /usr/share/sigrok-firmware sr: [00:00.007896] backend: Sanity-checking all drivers. sr: [00:00.008628] backend: Sanity-checking all input modules. sr: [00:00.009209] backend: Sanity-checking all output modules. sr: [00:00.009695] backend: Sanity-checking all transform modules. srd: libsigrokdecode loglevel set to 5. sr: [00:00.023203] hwdriver: sr_config_list(): key 2147418112 (NULL) sdi (nil) cg NULL -> [uint32 20000, 30027] sr: [00:00.033373] beaglelogic: Sent command: 'version'. sr: [00:00.046601] beaglelogic: Got response: 'BeagleLogic 1.0', length 15. sr: [00:00.047731] beaglelogic: BeagleLogic device found at beagle38 : 5555 sr: [00:00.048510] hwdriver: Scan found 1 devices (beaglelogic). The following devices were found: beaglelogic - BeagleLogic 1.0 with 14 channels: P8_45 P8_46 P8_43 P8_44 P8_41 P8_42 P8_39 P8_40 P8_27 P8_29 P8_28 P8_30 P8_21 P8_20 sr: [00:00.050127] hwdriver: Cleaning up all drivers. root@beagle47:/opt/sigrok# sigrok-cli -d beaglelogic:conn=tcp_raw/beagle38/5555 -c samplerate=10M --samples 10M --channels P8_45 -o capture.sr --loglevel 5 sr: [00:00.000006] log: libsigrok loglevel set to 5. sr: [00:00.001726] backend: libsigrok 0.5.1/5:0:1 (rt: 0.5.1/5:0:1). sr: [00:00.002789] backend: Libs: glib 2.58.1 (rt: 2.58.3/5803:3), libzip 1.1.2, libserialport 0.1.1/1:0:1 (rt: 0.1.1/1:0:1), libusb-1.0 1.0.22.11312 API 0x01000106, libftdi 1.4. sr: [00:00.003466] backend: Host: arm-unknown-linux-gnueabihf, little-endian. sr: [00:00.004265] backend: SCPI backends: TCP, RPC, serial, USBTMC. sr: [00:00.004784] backend: Firmware search paths: sr: [00:00.005375] backend: - /root/.local/share/sigrok-firmware sr: [00:00.005932] backend: - /usr/share/sigrok-firmware sr: [00:00.006590] backend: - /usr/local/share/sigrok-firmware sr: [00:00.007146] backend: - /usr/share/sigrok-firmware sr: [00:00.008059] backend: Sanity-checking all drivers. sr: [00:00.008749] backend: Sanity-checking all input modules. sr: [00:00.009331] backend: Sanity-checking all output modules. sr: [00:00.009706] backend: Sanity-checking all transform modules. srd: libsigrokdecode loglevel set to 5. sr: [00:00.023005] hwdriver: sr_config_list(): key 2147418112 (NULL) sdi (nil) cg NULL -> [uint32 20000, 30027] sr: [00:00.032932] beaglelogic: Sent command: 'version'. sr: [00:00.047065] beaglelogic: Got response: 'BeagleLogic 1.0', length 15. sr: [00:00.048245] beaglelogic: BeagleLogic device found at beagle38 : 5555 sr: [00:00.049006] hwdriver: Scan found 1 devices (beaglelogic). sr: [00:00.049743] device: beaglelogic: Opening device instance. sr: [00:00.053466] beaglelogic: Sent command: 'samplerate'. sr: [00:00.063674] beaglelogic: Got response: '10', length 2. sr: [00:00.064731] beaglelogic: Sent command: 'sampleunit'. sr: [00:00.091026] beaglelogic: Got response: '1', length 1. sr: [00:00.092163] beaglelogic: Sent command: 'memalloc'. sr: [00:00.098238] beaglelogic: Got response: '134217728', length 9. sr: [00:00.099170] beaglelogic: Sent command: 'bufunitsize'. sr: [00:00.106310] beaglelogic: Got response: '4194304', length 7. sr: [00:00.107184] beaglelogic: Sent command: 'triggerflags 1'. sr: [00:00.134922] beaglelogic: Got response: 'ERR', length 3. sr: [00:00.136187] hwdriver: sr_config_set(): key 30000 (samplerate) sdi 0x20e11d0 cg NULL -> uint64 10000000 sr: [00:00.137118] beaglelogic: Sent command: 'samplerate 10000000'. sr: [00:00.139576] beaglelogic: Got response: 'ERR', length 3. Failed to set device option 'samplerate': generic/unspecified error.

bmbtechnology avatar Aug 31 '22 14:08 bmbtechnology

First of all, apologies that I am getting to this issue too late. I hope you managed to resolved it, but in case you haven't and would still like to debug this further, it looks like this is a TCP backend issue that wasn't able to write to the right file or encountered an error in doing so.

There is a TCP backend rewrite planned but I have not been able to code it up yet but it will fix a lot of these sporadic errors. The software stack itself needs a bit of an overhaul, I will eventually get to it but in the meantime if you need help, please reopen the issue and we will take it from there.

abhishek-kakkar avatar Jan 18 '23 13:01 abhishek-kakkar

Hello Abishek,First of all , I wish you an Happy New Year 2023!Success in your projectsI appreciate your reply. I didn’t work further on the BeagleLogic , I used instead a Logic Analyzer because I need to debug an issue on my project. I would love to come back on this issue soon , would it be possible to know if we will get an update on this project ?Regards, Beninio Mbila Le 18 janv. 2023 à 14:39, Kumar Abhishek @.***> a écrit : Closed #51 as completed.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

bmbtechnology avatar Jan 20 '23 08:01 bmbtechnology

Hellow there :-) is there any workarounds on this issue by now? I think I've been facing the same issue and almost the same log, it would be perfect if it can be fixed Best regards

PD-Kerman avatar Dec 08 '23 02:12 PD-Kerman

It appears that the error happens not at 'samplerate' but at 'triggerflags' (see log above).

Can you please refer to this page for manually setting the sample rate:

https://beaglelogic.readthedocs.io/en/latest/sysfs_attributes.html

and try to set the sample rate manually? I'd like to see what error you are getting.

Also please paste the kernel (dmesg) logs once you've tried to set the sample rate. I'd like to see the error raised by the kernel driver which should ideally be in the last few lines.

Apologies for late response.

abhishek-kakkar avatar Dec 27 '23 09:12 abhishek-kakkar