I just received a couple of USB-capable devices (merci eBay !) and I'm trying to make them talk to my Linux-based computer.
Mastech MS8250D : a good-looking handheld multimeter (I needed to replace my 15yo Wavetek)
1254400.843474] usb 2-1.2: new full-speed USB device number 32 using ehci-pci
[1254400.923681] usb 2-1.2: New USB device found, idVendor=10c4, idProduct=ea60
[1254400.923687] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[1254400.923690] usb 2-1.2: Product: CP2102 USB to UART Bridge Controller
[1254400.923694] usb 2-1.2: Manufacturer: Silicon Labs
[1254400.923696] usb 2-1.2: SerialNumber: 0001
[1254400.926106] cp210x 2-1.2:1.0: cp210x converter detected
[1254400.927227] usb 2-1.2: cp210x converter now attached to ttyUSB0
So it's apparently easy to connect, the interface chip is well known but the data format is weird. I setup the port with wild guesses:
stty 1200 cs8 raw -echo -echoe -echonl -echoprt -echoctl -echoke -parenb -F /dev/ttyUSB0
od -An -v -w1 -t x1 /dev/ttyUSB0 shows a constant stream of bytes that are cryptic but repetitive, and vary with the measured voltage. Maybe @Alain Mauer can help ?
At 1200baud, I detect a repetitive pattern of 9 bytes: here with no input in DC Volts
00 20 85 a1 24 01 00 00 00
from time to time I see transmission errors...
The pattern changes when I change the input voltage.
Axiomet AX6002P programmable lab PSU : A pretty nice cheap system, but a definite plus for my lab !
I only have "analog" PSUs and this one can set the voltage easily :-) It features a RS232+USB connector, and the documentation gives some hints about the parameters : 9600, 8N1
I found the manual of the following model (the more capable 6003P, that handles 3A instead of 2, and with LCD instead of LED display) and it mentions SCPI.
stty 9600 cs8 raw -echo -echoe -echonl -echoprt -echoctl -echoke -parenb -F $TTY
the command echo -n "*IDN?" > $TTY returns the string "KORADKA6002PV2.0"
weird though : SCPI says that commands end with \n or \lf\n, but I only got the response with the "-n" option of echo, which doesn't send a newline char... And no other standard command seems to be recognised ? and the vendor string is unknown to Google...
Really I don't want to use Windows and install their crappy software because that would not let me use the tools as I intend - I don't need a fancy useless buggy interface when I already have the tools in hand, I want to script and use both the multimeter and PSU at the same time, not separately... What's the point otherwise ?