Bug 1487 - hantek-6xxx driver loses samples on 12MB boundary
Summary: hantek-6xxx driver loses samples on 12MB boundary
Status: CONFIRMED
Alias: None
Product: libsigrok
Classification: Unclassified
Component: Driver: hantek-6xxx (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-10 21:46 CET by L29Ah
Modified: 2021-01-18 19:37 CET (History)
1 user (show)



Attachments
irc log (12.86 KB, text/x-log)
2021-01-18 17:55 CET, L29Ah
Details

Note You need to log in before you can comment on or make changes to this bug.
Description L29Ah 2020-01-10 21:46:04 CET
Summarizing the discussion in IRC: observed on DDS-120,
src/hardware/hantek-6xxx/protocol.h:#define MAX_PACKET_SIZE                (12 * 1024 * 1024)
it's interesting that hantek driver initiates one bulk transfer while fx2lafw driver does multiple at once
src/hardware/fx2lafw/protocol.h:#define NUM_SIMUL_TRANSFERS        32

Probably some code should be common between fx2lafw and hantek-6xxx? No idea how to do it properly in libsigrok tho.
Comment 1 Andy Dodd 2021-01-14 17:58:35 CET
Is there a place to see the logs of the referenced IRC conversation?

I'm seeing unexplained data captured with a Hantek 6022BL that would be explained by some data being silently dropped.

Specifically, we are seeing events in a separate diagnostic tool that indicate that rising edges are occurring on an RS232 serial line, but some of those pulses are not appearing in the captured data.
Comment 2 L29Ah 2021-01-18 17:55:56 CET
Created attachment 717 [details]
irc log
Comment 3 Andy Dodd 2021-01-18 19:37:52 CET
That sounds like exactly the issue I observed.  Initially I thought we were having yet another problem with the system we were troubleshooting, but since moving to an RS232 level shifter + fx2lafw, it's pretty clear that the hantek-6xxx was silently dropping data.

Unfortunately the nature of our signal (a "detect" signal coming from an RFID reader) is such that it's hard to identify timing, but there is definitely a problem with the hantek-6xx driver or firmware that is dropping data silently with no errors.

It looks like you were running fairly high samplerate (8 MHz?), we were only running 200 kHz samplerate, and we have cases where there are gaps of at least 150ms in our data.  (In our case, an RFID detection event is expected to be about 150ms under certain test conditions, and we expect eight total events, but only see seven on occasion when using hantek-6xxx as an oscilloscope, but see all expected events on every single data collection run when using fx2lafw in logic mode and an external RS232 level shifter.)