On 08/13/2012 09:05 PM, Lisandro Damián Nicanor Pérez Meyer wrote: > Hi everyone! I've started to write a lib to interface USB GPIB devices. So > far > it's **very** simple, but it starts to work :-) > > If anyone has a usbtmc device, it can check out the code from > > <git://gitorious.org/libusbtmc/libusbtmc.git> > > All you need is CMake and libusb[x]. It ships with a simple test that will > check for usbtmc devices and tried to open the first one it gets, and sends a > GPIB message (implemented byte-wise, as it's a sub-class of TMC). > > So, if anyone has a usbtmc device, feel free to check the code.
Hi Lisandro I tried your code with a Rohde & Schwarz signal generator. I get the following error: usbtmc version: Major: 0 Minor: 0 Patch: 4 Release candidate suffix: GIT describe: 0.0.4 Product: SMBV, Manufacturer: Rohde & Schwarz GmbH & Co. KG, Serial number: 257799, Interface number: 0, Vendor ID: 0xaad, Product ID 0x5f, Path: 0001:0002:00 Bulk message failed. Answer to *IDN?: There's also a lot of messages like this in the kernel log: [ 1079.599627] xhci_hcd 0000:26:00.0: WARN: short transfer on control ep [ 1079.601630] xhci_hcd 0000:26:00.0: WARN: short transfer on control ep [ 1079.603628] xhci_hcd 0000:26:00.0: WARN: short transfer on control ep Serial number, interface, vendor, product all look identical to what is set up on the instrument. Also, I had to chown the USB device and manually remove the "usbtmc" kernel module that was automatically loaded when I plugged in the USB cable. By the way, after I run your test, the device also stops working with the "usbtmc" kernel driver. This happens when I try to read and write /dev/usbtmc3: [ 1967.869816] usbtmc 1-2:1.0: usb_bulk_msg returned -110 [ 1997.751512] usbtmc 1-2:1.0: Unable to send data, error -110 It only started working again after I power cycled the instrument. Best regards Tomaž ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ sigrok-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sigrok-devel

