Bug 785

Summary: Capture with USBTMC does not work (REQUEST_DEV_DEP_MSG_IN missing)
Product: libsigrok Reporter: Stefan Brüns <stefan.bruens>
Component: Driver: hameg-hmoAssignee: Nobody <nobody>
Status: CONFIRMED ---    
Severity: normal CC: info
Priority: Normal    
Version: unreleased development snapshot   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Stefan Brüns 2016-04-16 22:42:31 CEST
The driver issues a ":chan<n>:data?" request and then waits for an event on the read queue.

This works for the serial transport, as an event will happen as soon as there is data available. With USBTMC, the data has to be requested with an REQUEST_DEV_DEP_MSG_IN message.
Comment 1 Stefan Brüns 2016-04-17 19:23:18 CEST
The USBTMC transport has another problem in this area. Several drivers add an event source on the usb file descriptor.

Non-obviously, the POLLIN event will only fire if the transfer is submitted via libusb_transfer(), a libusb_bulk_read() is not sufficient.

With USBTMC, the first read will not be triggerd by a POLLIN event, but by a timeout. As the hameg-hmo receive callback filters everything but POLLIN revents, every capture will hang.
Comment 2 Stefan Brüns 2016-05-03 19:39:27 CEST
*** Bug 703 has been marked as a duplicate of this bug. ***