Hello, I'm currently trying to add a new ID for the KORAD KA3005P V4.2 power supply. I have opened a BZ[1] to track this change, and submitted a pull request in GitHub[2].
It would appear I've been successful: $ sigrok-cli --driver=korad-kaxxxxp:conn=/dev/ttyACM0 --scan --loglevel 5 sr: [00:00.000001] log: libsigrok loglevel set to 5. sr: [00:00.000102] backend: libsigrok 0.5.2/5:1:1. sr: [00:00.000176] backend: Libs: glib 2.64.1 (rt: 2.64.1/6401:1), libzip 1.6.1, libserialport 0.1.1/1:0:1 (rt: 0.1.1/1:0:1), libusb-1.0 1.0.22.11312 API 0x01000106, hidapi 0.9.0, libftdi 1.4. sr: [00:00.000201] backend: Host: x86_64-redhat-linux-gnu, little-endian. sr: [00:00.000233] backend: SCPI backends: TCP, RPC, serial, USBTMC. sr: [00:00.000247] backend: Firmware search paths: sr: [00:00.000300] backend: - /home/sysadm/.local/share/sigrok-firmware sr: [00:00.000327] backend: - /usr/share/sigrok-firmware sr: [00:00.000341] backend: - /usr/local/share/sigrok-firmware sr: [00:00.000353] backend: - /usr/share/sigrok-firmware sr: [00:00.000407] backend: Sanity-checking all drivers. sr: [00:00.000445] backend: Sanity-checking all input modules. sr: [00:00.000459] backend: Sanity-checking all output modules. sr: [00:00.000481] backend: Sanity-checking all transform modules. srd: libsigrokdecode loglevel set to 5. sr: [00:00.020399] hwdriver: sr_config_list(): key 2147418112 (NULL) sdi (nil) cg NULL -> [uint32 20000, 20001] sr: [00:00.020471] serial: Opening serial port '/dev/ttyACM0' (flags 1). sr: [00:00.021717] serial: Parsing parameters from "9600/8n1". sr: [00:00.022035] serial: Setting serial parameters on port /dev/ttyACM0. sr: [00:00.022097] serial: DBG: serial_set_params() rate 9600, 8n1 sr: [00:00.022119] serial: Flushing serial port /dev/ttyACM0. sr: [00:00.022141] korad-kaxxxxp: Want max 34 bytes. sr: [00:00.022181] korad-kaxxxxp: Sending '*IDN?'. sr: [00:00.022245] serial: Wrote 5/5 bytes. sr: [00:00.067409] serial: Read 28/34 bytes. sr: [00:00.113299] serial: Read 2/6 bytes. sr: [00:04.562017] korad-kaxxxxp: Received: 'KORAD KA3005P V4.2 SN:53815993'. sr: [00:04.562125] korad-kaxxxxp: Received: 0, KORAD KA3005P V4.2 SN:53815993 sr: [00:04.562160] korad-kaxxxxp: Found: Korad KA3005P (idx 5, ID 'KORAD KA3005P V4.2'). sr: [00:04.562208] korad-kaxxxxp: Sending 'IOUT1?'. sr: [00:04.562680] serial: Wrote 6/6 bytes. sr: [00:04.584732] serial: Read 5/5 bytes. sr: [00:04.584823] korad-kaxxxxp: Received: '0.000'. sr: [00:04.585254] korad-kaxxxxp: value: 0.000000 sr: [00:04.643013] korad-kaxxxxp: Sleeping for processing 57226 usec sr: [00:04.643125] korad-kaxxxxp: Sending 'ISET1?'. sr: [00:04.643546] serial: Wrote 6/6 bytes. sr: [00:04.665688] serial: Read 5/5 bytes. sr: [00:04.665779] korad-kaxxxxp: Received: '3.000'. sr: [00:04.665817] korad-kaxxxxp: value: 3.000000 sr: [00:04.724152] korad-kaxxxxp: Sleeping for processing 47790 usec sr: [00:04.724262] korad-kaxxxxp: Sending 'VOUT1?'. sr: [00:04.724670] serial: Wrote 6/6 bytes. sr: [00:04.746693] serial: Read 5/5 bytes. sr: [00:04.746787] korad-kaxxxxp: Received: '00.00'. sr: [00:04.746822] korad-kaxxxxp: value: 0.000000 sr: [00:04.805090] korad-kaxxxxp: Sleeping for processing 57490 usec sr: [00:04.805199] korad-kaxxxxp: Sending 'VSET1?'. sr: [00:04.805290] serial: Wrote 6/6 bytes. sr: [00:04.827671] serial: Read 5/5 bytes. sr: [00:04.827760] korad-kaxxxxp: Received: '05.00'. sr: [00:04.827800] korad-kaxxxxp: value: 5.000000 sr: [00:04.886410] korad-kaxxxxp: Sleeping for processing 57867 usec sr: [00:04.886492] korad-kaxxxxp: Sending 'STATUS?'. sr: [00:04.886561] serial: Wrote 7/7 bytes. sr: [00:04.905778] serial: Read 1/1 bytes. sr: [00:04.906292] korad-kaxxxxp: Received: ''. sr: [00:04.906350] korad-kaxxxxp: Status: 0x12 sr: [00:04.906379] korad-kaxxxxp: Status: CH1: constant current CH2: constant voltage. Tracking would be series and independent. Output is disabled. OCP is disabled, OVP is disabled. Device is beeping. sr: [00:04.906654] serial: Closing serial port /dev/ttyACM0. sr: [00:04.915644] hwdriver: Scan found 1 devices (korad-kaxxxxp). The following devices were found: korad-kaxxxxp - Korad KA3005P with 2 channels: V I sr: [00:04.915978] hwdriver: Cleaning up all drivers. sr: [00:04.916038] serial: Closing serial port /dev/ttyACM0. sr: [00:04.916189] serial-libsp: Cannot close unopened serial port /dev/ttyACM0. However, a second attempt to scan the same device fails with: $ sigrok-cli --driver=korad-kaxxxxp:conn=/dev/ttyACM0 --scan --loglevel 5 sr: [00:00.000001] log: libsigrok loglevel set to 5. sr: [00:00.000101] backend: libsigrok 0.5.2/5:1:1. sr: [00:00.000179] backend: Libs: glib 2.64.1 (rt: 2.64.1/6401:1), libzip 1.6.1, libserialport 0.1.1/1:0:1 (rt: 0.1.1/1:0:1), libusb-1.0 1.0.22.11312 API 0x01000106, hidapi 0.9.0, libftdi 1.4. sr: [00:00.000276] backend: Host: x86_64-redhat-linux-gnu, little-endian. sr: [00:00.000299] backend: SCPI backends: TCP, RPC, serial, USBTMC. sr: [00:00.000314] backend: Firmware search paths: sr: [00:00.000351] backend: - /home/sysadm/.local/share/sigrok-firmware sr: [00:00.000368] backend: - /usr/share/sigrok-firmware sr: [00:00.000382] backend: - /usr/local/share/sigrok-firmware sr: [00:00.000396] backend: - /usr/share/sigrok-firmware sr: [00:00.000450] backend: Sanity-checking all drivers. sr: [00:00.000507] backend: Sanity-checking all input modules. sr: [00:00.000524] backend: Sanity-checking all output modules. sr: [00:00.000547] backend: Sanity-checking all transform modules. srd: libsigrokdecode loglevel set to 5. sr: [00:00.019724] hwdriver: sr_config_list(): key 2147418112 (NULL) sdi (nil) cg NULL -> [uint32 20000, 20001] sr: [00:00.019841] serial: Opening serial port '/dev/ttyACM0' (flags 1). sr: [00:00.021175] serial: Parsing parameters from "9600/8n1". sr: [00:00.021347] serial: Setting serial parameters on port /dev/ttyACM0. sr: [00:00.021426] serial: DBG: serial_set_params() rate 9600, 8n1 sr: [00:00.021458] serial: Flushing serial port /dev/ttyACM0. sr: [00:00.021483] korad-kaxxxxp: Want max 34 bytes. sr: [00:00.021499] korad-kaxxxxp: Sending '*IDN?'. sr: [00:00.021541] serial: Wrote 5/5 bytes. sr: [00:00.066708] serial: Read 27/34 bytes. sr: [00:00.112019] serial: Read 2/7 bytes. sr: [00:04.565224] korad-kaxxxxp: Received: 'ORAD KA3005P V4.2 SN:53815993'. sr: [00:04.565326] korad-kaxxxxp: Received: 0, ORAD KA3005P V4.2 SN:53815993 sr: [00:04.565361] korad-kaxxxxp: Unknown model ID 'ORAD KA3005P V4.2' detected, aborting. sr: [00:04.565391] hwdriver: Scan found 0 devices (korad-kaxxxxp). sr: [00:04.565448] hwdriver: Cleaning up all drivers. because, apparently, the device is not sending the entire ID this time. Have you faced a similar error before? Is this related to serial console management? Turning the device off and on resets the serial communication and the scan succeeds again. Any pointers appreciated. A second question: as you can see in the BZ, it has been suggested to use 5.1 amps as the value in the model definition. However, the datasheet and the manual, both say 5 amps. I'm keeping the suggestion, though, because I assume it comes from someone more knowledgeable than me, but I can't find a source to verify it. Again, any ponters appreciated. [1]: https://sigrok.org/bugzilla/show_bug.cgi?id=1522 [2]: https://github.com/sigrokproject/libsigrok/pull/47
_______________________________________________ sigrok-devel mailing list sigrok-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sigrok-devel