Add an additional Rigol quirk to skip INITIATE_CLEAR #62
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi. This patch updates usbtmc.py quirk handling to make it work better with Rigol DS1000Z-series oscilloscope (and probably also with DS2000-series).
DS1000Z does not handle INITIATE_CLEAR well, and USB response just times out (and hangs) once it receives this message. INITIATE_CLEAR is a required command as per USBTMC spec, but Rigol's implementation is known to be broken in many parts.
There's a workaround to do
echo *IDN? > /dev/usbtmc<N>
to initialize the device without sending INITIATE_CLEAR, but that's Linux-specific and user has to figure out which /dev/usbtmc* device to use. This patch will make things much easier and portable.I have tested this patch with rigolcap.py script I pasted to gist:
https://gist.github.com/tai/408053a0955bf1712a5809240aa5544f
Also, just FYI, https://github.com/jtambasco/RigolOscilloscope.git which uses python-usbtmc works with Rigol, but has a following hack to make it work:
With this patch, user of usbtmc.py can now just do this: