Products > Test Equipment
Rigol USBTMC/VISA interface is really terrible
Karel:
--- Quote from: pklaus on August 10, 2015, 08:19:20 am ---My kernel message log shows the following errors when plugging in my DS1054Z:
--- Code: ---[ 127.657767] usb 2-1.6: new high-speed USB device number 5 using ehci-pci
[ 127.741956] usb 2-1.6: config 1 interface 0 altsetting 0 endpoint 0x81 has an invalid bInterval 80, changing to 10
[ 127.741965] usb 2-1.6: config 1 interface 0 altsetting 0 bulk endpoint 0x82 has invalid maxpacket 64
[ 127.741969] usb 2-1.6: config 1 interface 0 altsetting 0 bulk endpoint 0x3 has invalid maxpacket 64
[ 3927.846240] usbcore: registered new interface driver usbtmc
--- End code ---
--- End quote ---
I remember seeing those messages as well at home when connecting the DS1054Z.
I'll check again tonight but I guess it has nothing todo with your problem.
pklaus:
--- Quote from: Karel on August 10, 2015, 08:58:11 am ---On your pc, and I'm sorry to read that. Here DSRemote works fine with USBTMC on OpenSuse 13.2.
Anyway, you could try to investigate what's going on on the usb bus by using wireshark:
Post the usb traffic file here, maybe somebody can shine a light on it.
--- End quote ---
Thanks Karel, that's a good suggestion. I attached the wireshark capture to this post. It seems as if the *IDN? write succeeds but the successive read operation is strange: It takes exactly five seconds for the packet with the answer to arrive (the timeout of the read operation used in DSRemote?) Then the package with the actual answer to *IDN? arrives but the URB status is: No such file or directory (-ENOENT) (-2).
Something seems to be wrong there.
I recompiled the kernel module with #define DEBUG 1, and loaded that module. The kernel output was more verbose then but I cannot really interpret were this is going wrong:
--- Code: ---[ 116.536363] usbtmc 1-1.5:1.0: usbtmc_probe called
[ 116.539555] usbtmc 1-1.5:1.0: Trying to find if device Vendor 0x1AB1 Product 0x04CE has the RIGOL quirk
[ 116.543748] usbtmc 1-1.5:1.0: Found bulk in endpoint at 130
[ 116.546456] usbtmc 1-1.5:1.0: Found Bulk out endpoint at 3
[ 116.549079] usb 1-1.5: GET_CAPABILITIES returned 1
[ 116.551017] usb 1-1.5: Interface capabilities are 0
[ 116.553192] usb 1-1.5: Device capabilities are 0
[ 116.555265] usb 1-1.5: USB488 interface capabilities are 6
[ 116.557708] usb 1-1.5: USB488 device capabilities are f
[ 116.560376] usbtmc 1-1.5:1.0: Using minor number 0
[ 116.562422] usbcore: registered new interface driver usbtmc
[ 155.809476] usbtmc 1-1.5:1.0: usb_bulk_msg_in: remaining(2097152), count(2097152)
[ 160.817424] usbtmc 1-1.5:1.0: usb_bulk_msg: retval(4294967186), done(0), remaining(2097152), actual(64)
[ 160.821577] usbtmc 1-1.5:1.0: Unable to read data, error -110
--- End code ---
The first lines come from loading the module. It detects the scope and creates /dev/usbtmc0 there.
The last three lines correspond to me trying to connect with DSRemote (see the packets from the wireshark capture)
Karel:
Actually, it's the timeout (5 sec.) of the usbtmc kernel driver.
It looks like you are running an old firmware: 00.04.03.
Can you try to upgrade to 00.04.03.SP1 and see what happens?
Also, try to connect the scope with another, high quality, usb 2.0 cable, if possible to a port on the back of your pc.
The reason I ask is the following. Contrary to most other instruments which uses USB 2.0 FS (full speed, 12 Mb/s),
the DS1054Z uses USB 2.0 HS (highspeed) connection at 480 Mb/s.
There are a lot of cables that pretend to be USB 2.0 compatibel but can cause problems at HS.
Also, the connectors on the back of the pc are usually mounted on the motherboard.
The connectors on the front uses an extra cable plus connectors inside the enclosure of the pc.
It doesn't harm to exlcude these possible source of errors.
pklaus:
--- Quote from: Karel on August 10, 2015, 06:55:31 pm ---It looks like you are running an old firmware: 00.04.03.
Can you try to upgrade to 00.04.03.SP1 and see what happens?
--- End quote ---
Wow! That really fixed it 100%!!! Works perfectly now! Thank you for the hint!
This is what helped: Upgrading from 00.04.03.00.01 (2015-05-05) to 00.04.03.01.05 (2015-06-16). That made USBTMC finally working with my Linux machine!
I didn't believe it would help because the 16 fixed issues from the changelog file don't even mention USB / USBTMC / etc.
But it works now.
Thanks again!
*update*: and for the record: all this is with the unmodified usbtmc.c kernel module shipping with the current kernel version 4.1.
Karel:
I'm glad to read you solved the problem :)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version