[PLUG] com port in guest to usb in host (virtual box)
Russell Senior
russell at personaltelco.net
Sun Dec 10 06:49:32 UTC 2017
russell at vanhorn:~$ sigrok-cli --help
Usage:
sigrok-cli [OPTION...]
Help Options:
-h, --help Show help options
Application Options:
-V, --version Show version and support list
-l, --loglevel Set loglevel (5 is most verbose)
-d, --driver The driver to use
-c, --config Specify device configuration options
-i, --input-file Load input from file
-I, --input-format Input format
-o, --output-file Save output to file
-O, --output-format Output format
-C, --channels Channels to use
-g, --channel-group Channel groups
-t, --triggers Trigger configuration
-w, --wait-trigger Wait for trigger
-P, --protocol-decoders Protocol decoders to run
-S, --protocol-decoder-stack Protocol decoder stack
-A, --protocol-decoder-annotations Protocol decoder annotation(s) to show
-M, --protocol-decoder-meta Protocol decoder meta output to show
-B, --protocol-decoder-binary Protocol decoder binary output to show
--scan Scan for devices
--show Show device detail
--time How long to sample (ms)
--samples Number of samples to acquire
--frames Number of frames to acquire
--continuous Sample continuously
--set Set device options only
"--samples 10" means to print 10 samples. You could replace that with
"--continuous". However, your report that nothing comes out suggests
that either it talks a different protocol than the one you are
specifying, or somehow serial access is disabled at the DMM, or
perhaps something in the middle is broken.
What happens when you use --scan or --show. Something like:
sigrok-cli --driver mastech-mas345:conn=/dev/ttyUSB0 --scan
or
sigrok-cli --driver mastech-mas345:conn=/dev/ttyUSB0 --show
On Sat, Dec 9, 2017 at 9:29 PM, Denis Heidtmann
<denis.heidtmann at gmail.com> wrote:
> The Fluke example certainly sends the data to the screen. The example the
> sigrok site gave (sigrok-cli --driver mastech-mas345:conn=/dev/ttyUSB0
> --samples 10) has --samples 10 tacked on. It is not clear to me which sw
> reads that. I tried changing that to other stuff but I just get sigrok
> help screens. That means to me that sigrok is reading the --samples 10.
> But none of those screens list --samples as an option.
>
> I should mention that I got sigrok-cli as an ubuntu package.
>
> On Sat, Dec 9, 2017 at 6:21 PM, Russell Senior <russell at personaltelco.net>
> wrote:
>
>> https://www.youtube.com/watch?v=TWwuiIfq_Z4
>>
>> On Sat, Dec 9, 2017 at 6:19 PM, Russell Senior
>> <russell at personaltelco.net> wrote:
>> > I don't actually know what sigrok does, but I would naively expect it
>> > to blurt data out onto the screen. Time to go looking for helpful
>> > youtube videos.
>> >
>> > On Sat, Dec 9, 2017 at 6:17 PM, Denis Heidtmann
>> > <denis.heidtmann at gmail.com> wrote:
>> >> The loop-back worked. Running sigrok-cli --driver
>> >> mastech-mas345:conn=/dev/ttyUSB0 --samples 10 w/sudo produced the same
>> >> result as earlier--a 10 second silent delay.
>> >>
>> >> Should the results, ascii according to the protocol, appear in the
>> terminal
>> >> used to launch the command?
>> >>
>> >> On Sat, Dec 9, 2017 at 5:14 PM, Russell Senior <
>> russell at personaltelco.net>
>> >> wrote:
>> >>
>> >>> Try loopback on your usb-serial adapter. That is, connect pin 2 and
>> >>> pin 3 (tx and rx, or vice versa). Then run something like:
>> >>>
>> >>> screen /dev/ttyUSB0 115200
>> >>>
>> >>> and type some letters on the keyboard and see if they echo back at
>> >>> you. If so, the serial cable is working. If not, you might need a
>> >>> different serial cable.
>> >>>
>> >>> You can kill off the screen session with Ctrl-A k, or just yank the
>> >>> usb connector and screen will helpfully exit.
>> >>>
>> >>> Another thought, you might need to fix the permissions. Often the
>> >>> usb-serial device file will be created owned by the dialout group.
>> >>>
>> >>> ls -al /dev/ttyUSB*
>> >>>
>> >>> If your user isn't in the dialout group, then you might not be able to
>> >>> open it. Trying it as root will test that theory. To fix the group
>> >>> ownership in the future, try adding your user name to the dialout
>> >>> group in /etc/group. You will need to log out and then back in before
>> >>> the change will take effect (unless there is a shortcut I don't know
>> >>> about).
>> >>>
>> >>>
>> >>> Russell
>> >>>
>> >>> On Sat, Dec 9, 2017 at 4:34 PM, Denis Heidtmann
>> >>> <denis.heidtmann at gmail.com> wrote:
>> >>> > Some progress. I executed "sigrok-cli --driver
>> >>> > mastech-mas345:conn=/dev/ttyUSB0 --samples 10" forgetting that the
>> meter
>> >>> > was not plugged into the adapter--got "sr: serial: Didn't find a
>> valid
>> >>> > packet (read 0 bytes).
>> >>> > No devices found." Plugged in the meter, then got no response, but
>> >>> exactly
>> >>> > 10 seconds delay 'till the prompt returned. And the default data
>> rate is
>> >>> > 1/sec. So it seems something was listening for the 10 samples. But
>> if
>> >>> the
>> >>> > samples were acquired I do not know where they went. I was expecting
>> >>> they
>> >>> > would appear in the terminal.
>> >>> >
>> >>> > Clues?
>> >>> >
>> >>> > -Denis
>> >>> >
>> >>> > On Wed, Dec 6, 2017 at 11:25 PM, Russell Senior <
>> >>> russell at personaltelco.net>
>> >>> > wrote:
>> >>> >
>> >>> >> There is an example on the wiki page:
>> >>> >>
>> >>> >> https://sigrok.org/wiki/MASTECH_MAS345
>> >>> >>
>> >>> >> that says:
>> >>> >>
>> >>> >> sigrok-cli --driver mastech-mas345:conn=/dev/ttyUSB0 --samples 10
>> >>> >>
>> >>> >> I would try that. That might or might not be the right serial
>> device
>> >>> >> (i.e. ttyUSB0)... check dmesg, unplug/replug your cable and check
>> >>> >> again, if necessary.
>> >>> >>
>> >>> >> On Wed, Dec 6, 2017 at 9:14 PM, Denis Heidtmann
>> >>> >> <denis.heidtmann at gmail.com> wrote:
>> >>> >> > I agree completely. I have downloaded sigrok-cli. Now I have to
>> try
>> >>> to
>> >>> >> > understand how to use it. (I feel a bit overwhelmed.)
>> >>> >> > Where do I put the driver? Is output/input with respect to the
>> >>> external
>> >>> >> > device or the software? I assume the device, judging by the
>> longer
>> >>> list
>> >>> >> of
>> >>> >> > output formats. What is the protocol? Do I need to know, or
>> will
>> >>> the
>> >>> >> > driver decide?
>> >>> >> >
>> >>> >> > sigrok-cli -V
>> >>> >> > sigrok-cli 0.5.0
>> >>> >> >
>> >>> >> > Using libsigrok 0.3.0 (lib version 2:0:0).
>> >>> >> > Using libsigrokdecode 0.3.0 (lib version 2:0:0).
>> >>> >> >
>> >>> >> > Supported hardware drivers:
>> >>> >> > .
>> >>> >> > .
>> >>> >> > .
>> >>> >> > mastech-mas345 MASTECH MAS345
>> >>> >> > .
>> >>> >> > .
>> >>> >> > .
>> >>> >> > Supported input formats:
>> >>> >> > binary Raw binary
>> >>> >> > chronovu-la8 ChronoVu LA8
>> >>> >> > csv Comma-separated values (CSV)
>> >>> >> > vcd Value Change Dump
>> >>> >> > wav WAV file
>> >>> >> >
>> >>> >> > Supported output formats:
>> >>> >> > analog Analog data
>> >>> >> > ascii ASCII
>> >>> >> > binary Raw binary
>> >>> >> > bits Bits
>> >>> >> > chronovu-la8 ChronoVu LA8
>> >>> >> > csv Comma-separated values (CSV)
>> >>> >> > gnuplot Gnuplot
>> >>> >> > hex Hexadecimal
>> >>> >> > ols OpenBench Logic Sniffer
>> >>> >> > vcd Value Change Dump (VCD)
>> >>> >> >
>> >>> >> > Supported protocol decoders:
>> >>> >> > avr_isp AVR In-System Programming
>> >>> >> > can Controller Area Network
>> >>> >> > dcf77 DCF77 time protocol
>> >>> >> > ds1307 Dallas DS1307
>> >>> >> > edid Extended Display Identification Data
>> >>> >> > guess_bitrate Guess bitrate/baudrate
>> >>> >> > i2c Inter-Integrated Circuit
>> >>> >> > i2cdemux I²C demultiplexer
>> >>> >> > i2cfilter I²C filter
>> >>> >> > i2s Integrated Interchip Sound
>> >>> >> > ir_nec IR NEC
>> >>> >> > ir_rc5 IR RC-5
>> >>> >> > jtag Joint Test Action Group (IEEE 1149.1)
>> >>> >> > jtag_stm32 Joint Test Action Group / ST STM32
>> >>> >> > lm75 National LM75
>> >>> >> > lpc Low-Pin-Count
>> >>> >> > maxim_ds28ea00 Maxim DS28EA00 1-Wire digital thermometer
>> >>> >> > midi Musical Instrument Digital Interface
>> >>> >> > mlx90614 Melexis MLX90614
>> >>> >> > mx25lxx05d Macronix MX25Lxx05D
>> >>> >> > mxc6225xu MEMSIC MXC6225XU
>> >>> >> > nunchuk Nintendo Wii Nunchuk
>> >>> >> > onewire_link 1-Wire serial communication bus (link
>> layer)
>> >>> >> > onewire_network 1-Wire serial communication bus (network
>> layer)
>> >>> >> > pan1321 Panasonic PAN1321
>> >>> >> > parallel Parallel sync bus
>> >>> >> > rgb_led_spi RGB LED string decoder (SPI)
>> >>> >> > rtc8564 Epson RTC-8564 JE/NB
>> >>> >> > sdcard_spi Secure Digital card (SPI mode)
>> >>> >> > spi Serial Peripheral Interface
>> >>> >> > tlc5620 Texas Instruments TLC5620
>> >>> >> > uart Universal Asynchronous Receiver/Transmitter
>> >>> >> > usb_packet Universal Serial Bus (LS/FS) packet
>> >>> >> > usb_signalling Universal Serial Bus (LS/FS) signalling
>> >>> >> > xfp 10 Gigabit Small Form Factor Pluggable
>> Module
>> >>> >> (XFP)
>> >>> >> > z80 Zilog Z80 CPU
>> >>> >> >
>> >>> >> >
>> >>> >> > On Wed, Dec 6, 2017 at 3:17 PM, Russell Senior <
>> >>> >> russell at personaltelco.net>
>> >>> >> > wrote:
>> >>> >> >
>> >>> >> >> The sigrok route is probably a better investment of your time
>> than a
>> >>> >> >> vendor-software horror show, imho.
>> >>> >> >>
>> >>> >> >> On Wed, Dec 6, 2017 at 3:02 PM, Denis Heidtmann
>> >>> >> >> <denis.heidtmann at gmail.com> wrote:
>> >>> >> >> > here is the link:
>> >>> >> >> >
>> >>> >> >> > https://sigrok.org/wiki/Multimeter_ICs#Metex_14-byte_ASCII
>> >>> >> >> >
>> >>> >> >> > I would need to study it and educate myself on how to make use
>> of
>> >>> it.
>> >>> >> >> >
>> >>> >> >> > -Denis
>> >>> >> >> >
>> >>> >> >> > On Wed, Dec 6, 2017 at 2:29 PM, Denis Heidtmann <
>> >>> >> >> denis.heidtmann at gmail.com>
>> >>> >> >> > wrote:
>> >>> >> >> >
>> >>> >> >> >> I have found this:
>> >>> >> >> >> Protocol
>> >>> >> >> >>
>> >>> >> >> >> The protocol is (partially) documented in the vendor
>> software's
>> >>> >> "Help"
>> >>> >> >> >> window (seems to apply to MAS343, MAS344, and MAS345; the
>> M9803R
>> >>> >> >> protocol
>> >>> >> >> >> is different).
>> >>> >> >> >>
>> >>> >> >> >> See Multimeter_ICs#Metex_14-byte_ASCII for the DMM IC
>> protocol.
>> >>> >> >> >>
>> >>> >> >> >> I looked in the software's help window, but with the sw I have
>> >>> there
>> >>> >> is
>> >>> >> >> no
>> >>> >> >> >> discussion of protocol. Maybe the note above is referring to
>> >>> other
>> >>> >> >> >> software. The MAS344 is not a current instrument.
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> On Wed, Dec 6, 2017 at 2:15 PM, Russell Senior <
>> >>> >> >> russell at personaltelco.net>
>> >>> >> >> >> wrote:
>> >>> >> >> >>
>> >>> >> >> >>> Have you googled at all about the protocol? You might be
>> able to
>> >>> >> just
>> >>> >> >> >>> talk ASCII at it from Linux and get what you need.
>> >>> >> >> >>>
>> >>> >> >> >>> On Wed, Dec 6, 2017 at 1:22 PM, Denis Heidtmann
>> >>> >> >> >>> <denis.heidtmann at gmail.com> wrote:
>> >>> >> >> >>> > I want to use a DMM with a serial connection. The sw for
>> the
>> >>> DMM
>> >>> >> is
>> >>> >> >> for
>> >>> >> >> >>> > windows. It runs under Win2k (guest) on the desktop which
>> has a
>> >>> >> >> serial
>> >>> >> >> >>> > port. Is it possible to get it to run under Win2k
>> (guest) on
>> >>> the
>> >>> >> >> >>> laptop
>> >>> >> >> >>> > which does not have a serial port? I purchased a Sabrent
>> usb
>> >>> to
>> >>> >> >> serial
>> >>> >> >> >>> > adapter that I hoped to use for this.
>> >>> >> >> >>> >
>> >>> >> >> >>> > I expect the problem is that I cannot get VB to pass the
>> >>> virtual
>> >>> >> com
>> >>> >> >> >>> port
>> >>> >> >> >>> > data from the guest to the usb port in the host (ubuntu).
>> If
>> >>> >> this is
>> >>> >> >> >>> > impossible or too difficult to be practical I will pursue
>> >>> linux sw
>> >>> >> >> for
>> >>> >> >> >>> the
>> >>> >> >> >>> > DMM, although I may run into a similar problem. The DMM is
>> >>> >> Mastech
>> >>> >> >> >>> MAS-344.
>> >>> >> >> >>> >
>> >>> >> >> >>> > Thanks for any clues.
>> >>> >> >> >>> >
>> >>> >> >> >>> > -Denis
>> >>> >> >> >>> > _______________________________________________
>> >>> >> >> >>> > PLUG mailing list
>> >>> >> >> >>> > PLUG at pdxlinux.org
>> >>> >> >> >>> > http://lists.pdxlinux.org/mailman/listinfo/plug
>> >>> >> >> >>> _______________________________________________
>> >>> >> >> >>> PLUG mailing list
>> >>> >> >> >>> PLUG at pdxlinux.org
>> >>> >> >> >>> http://lists.pdxlinux.org/mailman/listinfo/plug
>> >>> >> >> >>>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> > _______________________________________________
>> >>> >> >> > PLUG mailing list
>> >>> >> >> > PLUG at pdxlinux.org
>> >>> >> >> > http://lists.pdxlinux.org/mailman/listinfo/plug
>> >>> >> >> _______________________________________________
>> >>> >> >> PLUG mailing list
>> >>> >> >> PLUG at pdxlinux.org
>> >>> >> >> http://lists.pdxlinux.org/mailman/listinfo/plug
>> >>> >> >>
>> >>> >> > _______________________________________________
>> >>> >> > PLUG mailing list
>> >>> >> > PLUG at pdxlinux.org
>> >>> >> > http://lists.pdxlinux.org/mailman/listinfo/plug
>> >>> >> _______________________________________________
>> >>> >> PLUG mailing list
>> >>> >> PLUG at pdxlinux.org
>> >>> >> http://lists.pdxlinux.org/mailman/listinfo/plug
>> >>> >>
>> >>> > _______________________________________________
>> >>> > PLUG mailing list
>> >>> > PLUG at pdxlinux.org
>> >>> > http://lists.pdxlinux.org/mailman/listinfo/plug
>> >>> _______________________________________________
>> >>> PLUG mailing list
>> >>> PLUG at pdxlinux.org
>> >>> http://lists.pdxlinux.org/mailman/listinfo/plug
>> >>>
>> >> _______________________________________________
>> >> PLUG mailing list
>> >> PLUG at pdxlinux.org
>> >> http://lists.pdxlinux.org/mailman/listinfo/plug
>> _______________________________________________
>> PLUG mailing list
>> PLUG at pdxlinux.org
>> http://lists.pdxlinux.org/mailman/listinfo/plug
>>
> _______________________________________________
> PLUG mailing list
> PLUG at pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
More information about the PLUG
mailing list