Summary: | DS1074Z/DS1104Z memory acquisition not working | ||
---|---|---|---|
Product: | libsigrok | Reporter: | Mariusz Białończyk <manio+sigrokbug> |
Component: | Driver: rigol-ds | Assignee: | Nobody <nobody> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | hugo.laloge, philippschmid2 |
Priority: | Normal | ||
Version: | unreleased development snapshot | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Attachments: |
sigrok-cli obtaining 1 frame
sigrok-cli scan output patch for hardcoding the datasource patch for more frames then 1 PCAP file with obtaining full memory waveform using DSRemote tool Patch correct read completion |
Description
Mariusz Białończyk
2019-03-11 10:49:40 CET
Created attachment 507 [details]
sigrok-cli obtaining 1 frame
Created attachment 508 [details]
sigrok-cli scan output
Created attachment 509 [details]
patch for hardcoding the datasource
Created attachment 510 [details]
patch for more frames then 1
Created attachment 511 [details]
PCAP file with obtaining full memory waveform using DSRemote tool
Can confirm with DS1104Z, rigol_ds_receive stops systematically after acquired one frame. Created attachment 591 [details]
Patch correct read completion
I might have a fix: the rigol_ds_receive prodedure while reading exactly what it was expecting, and the called `sr_scpi_read_complete`. However, `sr_scpi_read_complete` return false if the last read received exactly the number of requested byte.
A simple fix is to ask for one more byte at the last read, so when the driver ask to read the trailing \n, it now ask for two bytes.
Hugo, Great you are working on this. Tell me if your patch is for reading memory or live "data source" from the scope? Actually, the patch fixes reading the samples in multiple time. In LIVE mode, all the data can be retrieved in one time, so the bug is not noticeable (although there was the error "Read should have been completed"). In memory, the number of samples is too large to retrieve them at once, so the bug is encountered. So this fix is for both mode, but the result is mainly noticeable when reading from memory. Note that I still encounter some other bugs, not related to the data "reading". For instance, the driver does not yet specify the sample rate in memory mode. |