Re: [PLUG] Serial communication with dmm

2018-01-07 Thread Denis Heidtmann
The meter schematic I have shows two opto-isolators connected to the serial
pins.  The output from the meter is an emitter follower driving the RxD pin
and the emitter resistor connected to RTS.  The collector is connected to
DTR.  The input to the meter drives an LED in series with a 3.3K resistor,
TxD (+) to GND .  Does this explain the RTS being driven low?

The protocol I have seen documented is:

data format: 7n2 at 600 baud (7 bits, no parity, 2 stop bits).
Control lines:
   DTR and RTS lines are used to power the TX line: RTS is clear
   for -12 supply; DTR is set for +12 supply. Data transmission is
   solicited sending whatever character to the RX line.
Data string format:
   MAS-345 sends a 14 bytes string with:
 < >< >
   :  two bytes with the oerating mode: DC, AC, OH, CA, TE ...
   :  one byte with - or space
   : five bytes with four digits and one decimal dot.
   : four bytes with the units: mV, A, kOhm, nF ...
   : '\r'
   One space is inserted between  and , one between
and .
The data string (without the '\r') is sent to the output device.

The changes I made to the code to get some results were line 116 timeout
changed from 0.1 to 3.0 and  commented out 129,  self.s.setTimeout(1) since
it generated an error msg. indicating serial had no such object.   These
changes gave me output if the meter was set at dc volts, otherwise an
instruction to change it to dc volts.   Later I changed line 56 to make
debug = True.  This gave me a listing of the what was coming from the meter
(repeatedly), matching the above listing.

So for starters I need to get it to poll the meter no more rapidly than
1/sec.  But I guess even in its wounded condition I could try to see if it
will work with the usb-serial adapter.

-Denis

On Sun, Jan 7, 2018 at 2:18 PM, Denis Heidtmann 
wrote:

> My goal is to be able to get data from the dmm using my laptop, which has
> only USB.  I have an RS-232--USB adapter.  Eventually I want to make the
> choices more friendly.
>
> Later today I will study the details of your observations.  The protocol I
> have seen described elsewhere says the host needs to send a single byte
> (H?) to get the dmm to send one reading.  I had to change two time values
> and remove the setTimeout line to get it to work.  At present it locks the
> meter for some time.  I expect that is because the host is sending bytes
> too fast, causing the meter to try to respond before it is ready, a
> difficulty I saw referenced in another description of how to deal with this
> meter.
>
> Thanks for looking at the code.
>
> -Denis
>
> On Sun, Jan 7, 2018 at 12:35 PM, Galen Seitz 
> wrote:
>
>> On 01/07/18 10:04, Denis Heidtmann wrote:
>> >>
>> >> On Mon, Jan 1, 2018 at 11:46 AM, Denis Heidtmann <
>> >> denis.heidtm...@gmail.com>
>> >> wrote:
>> >>
>> >>> I am looking into ways to examine the serial traffic to/from my dmm.
>> >>
>> > 
>> >
>> > I found a python script intended to interface with the mas-345:
>> > https://github.com/markrages/py_test_interface
>> > https://github.com/markrages/py_test_interface/blob/master/mas345.py
>> >
>> > I gave it a try on my desktop (which has a serial port).  To get it to
>> run
>> > I changed a couple of parameters and commented out one that was
>> generating
>> > a no-such-parameter error.  Then I put it into debug mode so I could see
>> > the traffic from the meter.  The good news is it appears that the meter
>> > does report values as the documented protocol indicates.  How the
>> > communication is done is buried in the "serial" Python module. Someone
>> who
>> > understands Python could learn from this; I cannot.
>>
>> I've used the python serial module a few times.  Looking at that code, I
>> see a few things that strike me as unusual.  First is RTS is
>> cleared(line 125).  Normally both DTR and RTS would be set during serial
>> communication.  The second thing is that the meter apparently requires
>> the host to send 14 null characters(line 138) in order to cause it to
>> send its measurement data.  Finally, requiring two stop bits(line 117)
>> is unusual.  (Note that two stop bits and seven bit data is equivalent
>> to one stop bit and including a mark parity bit in eight bit data.)
>>
>> Since its working with the python script, I suggest you continue using
>> python.  It's not as hard as it might at first appear.  I don't recall
>> your goal for this, but if you look at lines 169-197, I think you'll
>> begin to see how it might be modified to suit you.
>>
>> galen
>> --
>> Galen Seitz
>> gal...@seitzassoc.com
>> ___
>> PLUG mailing list
>> PLUG@pdxlinux.org
>> http://lists.pdxlinux.org/mailman/listinfo/plug
>>
>
>
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Serial communication with dmm

2018-01-07 Thread Denis Heidtmann
My goal is to be able to get data from the dmm using my laptop, which has
only USB.  I have an RS-232--USB adapter.  Eventually I want to make the
choices more friendly.

Later today I will study the details of your observations.  The protocol I
have seen described elsewhere says the host needs to send a single byte
(H?) to get the dmm to send one reading.  I had to change two time values
and remove the setTimeout line to get it to work.  At present it locks the
meter for some time.  I expect that is because the host is sending bytes
too fast, causing the meter to try to respond before it is ready, a
difficulty I saw referenced in another description of how to deal with this
meter.

Thanks for looking at the code.

-Denis

On Sun, Jan 7, 2018 at 12:35 PM, Galen Seitz  wrote:

> On 01/07/18 10:04, Denis Heidtmann wrote:
> >>
> >> On Mon, Jan 1, 2018 at 11:46 AM, Denis Heidtmann <
> >> denis.heidtm...@gmail.com>
> >> wrote:
> >>
> >>> I am looking into ways to examine the serial traffic to/from my dmm.
> >>
> > 
> >
> > I found a python script intended to interface with the mas-345:
> > https://github.com/markrages/py_test_interface
> > https://github.com/markrages/py_test_interface/blob/master/mas345.py
> >
> > I gave it a try on my desktop (which has a serial port).  To get it to
> run
> > I changed a couple of parameters and commented out one that was
> generating
> > a no-such-parameter error.  Then I put it into debug mode so I could see
> > the traffic from the meter.  The good news is it appears that the meter
> > does report values as the documented protocol indicates.  How the
> > communication is done is buried in the "serial" Python module. Someone
> who
> > understands Python could learn from this; I cannot.
>
> I've used the python serial module a few times.  Looking at that code, I
> see a few things that strike me as unusual.  First is RTS is
> cleared(line 125).  Normally both DTR and RTS would be set during serial
> communication.  The second thing is that the meter apparently requires
> the host to send 14 null characters(line 138) in order to cause it to
> send its measurement data.  Finally, requiring two stop bits(line 117)
> is unusual.  (Note that two stop bits and seven bit data is equivalent
> to one stop bit and including a mark parity bit in eight bit data.)
>
> Since its working with the python script, I suggest you continue using
> python.  It's not as hard as it might at first appear.  I don't recall
> your goal for this, but if you look at lines 169-197, I think you'll
> begin to see how it might be modified to suit you.
>
> galen
> --
> Galen Seitz
> gal...@seitzassoc.com
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Serial communication with dmm

2018-01-07 Thread Denis Heidtmann
I am indeed seeing data values.  The options the sw provides are not ideal,
at least as I am able to understand it, but data does come across.

I would need to understand more (i.e., something) about pyserial to make
the change to ttyUSB0, but all  this is more progress than I have had in
all the time spent beating on this.

-Denis

On Sun, Jan 7, 2018 at 11:37 AM, Russell Senior 
wrote:

> Do you mean you are seeing data values from the DMM? If so, does the same
> software work with the USB-serial cable? You might need to modify the code
> to use /dev/ttyUSB0 instead of /dev/ttyS0.
>
> On Jan 7, 2018 10:04 AM, "Denis Heidtmann" 
> wrote:
>
> >
> > On Mon, Jan 1, 2018 at 11:46 AM, Denis Heidtmann <
> > denis.heidtm...@gmail.com>
> > wrote:
> >
> > > I am looking into ways to examine the serial traffic to/from my dmm.
> >
> 
>
> I found a python script intended to interface with the mas-345:
> https://github.com/markrages/py_test_interface
> https://github.com/markrages/py_test_interface/blob/master/mas345.py
>
> I gave it a try on my desktop (which has a serial port).  To get it to run
> I changed a couple of parameters and commented out one that was generating
> a no-such-parameter error.  Then I put it into debug mode so I could see
> the traffic from the meter.  The good news is it appears that the meter
> does report values as the documented protocol indicates.  How the
> communication is done is buried in the "serial" Python module. Someone who
> understands Python could learn from this; I cannot.
>
> -Denis
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] [OT ?] Assisting brother while 1000 miles away

2018-01-07 Thread Richard England
For future reference, another option to investigate might be using the 
Chrome Browser and the "Chrome Remote Desktop" on both your systems:


 
https://chrome.google.com/webstore/detail/chrome-remote-desktop/gbchcmhmhahfdphkhkmpfmihenigjmpp


On 01/07/2018 09:57 AM, Richard Owlett wrote:
Thanks for the links. They aren't needed at the moment as just 
Received a phone call that reading the links I had sent led to a 
identifying questionable mouse.


As the Windows end is preinstalled, that leads to using for a couple 
of unrelated projects.




On 01/07/2018 11:29 AM, Mark Phillips wrote:

Richard,

Rdesktop,or similar software apps, are used by tech support companies
worldwide to access the client's computer and fix things, 
communicating to
the office computer from home, and as a teaching aid because you both 
can
see what is on the client's screen, and you can share the mouse. 
There is

no software to install on the Windows client, just allow RDP in system
properties. Windows includes all the remote desktop software, one 
just has

to enable it. The rdesktop software is installed on your Linux computer,
but there are many other options in the Debian and Ubuntu 
repositories for

remote desktop access between windows and Linux.

https://www.itworld.com/article/2988289/linux/how-to-install-and-use-rdesktop-the-remote-desktop-client-for-linux.html 



http://www.rdesktop.org/

https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/remote-desktop-clients 



If you have two computers, you may want to put windows 10 on one of them
and Linux on the other. Then you can try out rdesktop and other Linux
flavors of remote desktop access over your lan to see how it works.

Once caveat, the connection will be slower over the Internet than 
over your

lan.

Good luck!

Mark



On Sun, Jan 7, 2018 at 5:33 AM, Richard Owlett  
wrote:



On 01/06/2018 08:51 PM, Mark Phillips wrote:


A few ideas off the top of my head...

* Maybe you could use rdesktop (or some equivalent) to gain access
to his computer and show him how to work on it? I did this years ago
on older Windows machines from Linux, not sure if you can do it today
with newer windows. Google will help you with this.



I'd be uncomfortable having him install software that I'm unfamiliar 
with.




* Set up a virtual machine on your Linux box and install Windows 10.
Then you and he will have a common vocabulary. The rdesktop idea
should also  work in this setup.



That has possibilities. A VM has been suggested for an unrelated 
series of
projects. I like to experiment with install/configuration options 
(primary
machine has 5 installs of Debian with a sixth being seriously 
considered)




* Just go see him, forget the computers, and drink some beer;)



Mobility issues make traveling that distance difficult. Also his 
house is

not handicapped accessible.

Thanks all.



___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug




___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug



___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Serial communication with dmm

2018-01-07 Thread Galen Seitz
On 01/07/18 10:04, Denis Heidtmann wrote:
>>
>> On Mon, Jan 1, 2018 at 11:46 AM, Denis Heidtmann <
>> denis.heidtm...@gmail.com>
>> wrote:
>>
>>> I am looking into ways to examine the serial traffic to/from my dmm.
>>
> 
> 
> I found a python script intended to interface with the mas-345:
> https://github.com/markrages/py_test_interface
> https://github.com/markrages/py_test_interface/blob/master/mas345.py
> 
> I gave it a try on my desktop (which has a serial port).  To get it to run
> I changed a couple of parameters and commented out one that was generating
> a no-such-parameter error.  Then I put it into debug mode so I could see
> the traffic from the meter.  The good news is it appears that the meter
> does report values as the documented protocol indicates.  How the
> communication is done is buried in the "serial" Python module. Someone who
> understands Python could learn from this; I cannot.

I've used the python serial module a few times.  Looking at that code, I
see a few things that strike me as unusual.  First is RTS is
cleared(line 125).  Normally both DTR and RTS would be set during serial
communication.  The second thing is that the meter apparently requires
the host to send 14 null characters(line 138) in order to cause it to
send its measurement data.  Finally, requiring two stop bits(line 117)
is unusual.  (Note that two stop bits and seven bit data is equivalent
to one stop bit and including a mark parity bit in eight bit data.)

Since its working with the python script, I suggest you continue using
python.  It's not as hard as it might at first appear.  I don't recall
your goal for this, but if you look at lines 169-197, I think you'll
begin to see how it might be modified to suit you.

galen
-- 
Galen Seitz
gal...@seitzassoc.com
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Serial communication with dmm

2018-01-07 Thread Russell Senior
Do you mean you are seeing data values from the DMM? If so, does the same
software work with the USB-serial cable? You might need to modify the code
to use /dev/ttyUSB0 instead of /dev/ttyS0.

On Jan 7, 2018 10:04 AM, "Denis Heidtmann" 
wrote:

>
> On Mon, Jan 1, 2018 at 11:46 AM, Denis Heidtmann <
> denis.heidtm...@gmail.com>
> wrote:
>
> > I am looking into ways to examine the serial traffic to/from my dmm.
>


I found a python script intended to interface with the mas-345:
https://github.com/markrages/py_test_interface
https://github.com/markrages/py_test_interface/blob/master/mas345.py

I gave it a try on my desktop (which has a serial port).  To get it to run
I changed a couple of parameters and commented out one that was generating
a no-such-parameter error.  Then I put it into debug mode so I could see
the traffic from the meter.  The good news is it appears that the meter
does report values as the documented protocol indicates.  How the
communication is done is buried in the "serial" Python module. Someone who
understands Python could learn from this; I cannot.

-Denis
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


[PLUG] Serial communication with dmm

2018-01-07 Thread Denis Heidtmann
>
> On Mon, Jan 1, 2018 at 11:46 AM, Denis Heidtmann <
> denis.heidtm...@gmail.com>
> wrote:
>
> > I am looking into ways to examine the serial traffic to/from my dmm.
>


I found a python script intended to interface with the mas-345:
https://github.com/markrages/py_test_interface
https://github.com/markrages/py_test_interface/blob/master/mas345.py

I gave it a try on my desktop (which has a serial port).  To get it to run
I changed a couple of parameters and commented out one that was generating
a no-such-parameter error.  Then I put it into debug mode so I could see
the traffic from the meter.  The good news is it appears that the meter
does report values as the documented protocol indicates.  How the
communication is done is buried in the "serial" Python module. Someone who
understands Python could learn from this; I cannot.

-Denis
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] [OT ?] Assisting brother while 1000 miles away

2018-01-07 Thread Richard Owlett
Thanks for the links. They aren't needed at the moment as just Received 
a phone call that reading the links I had sent led to a identifying 
questionable mouse.


As the Windows end is preinstalled, that leads to using for a couple of 
unrelated projects.




On 01/07/2018 11:29 AM, Mark Phillips wrote:

Richard,

Rdesktop,or similar software apps, are used by tech support companies
worldwide to access the client's computer and fix things, communicating to
the office computer from home, and as a teaching aid because you both can
see what is on the client's screen, and you can share the mouse. There is
no software to install on the Windows client, just allow RDP in system
properties. Windows includes all the remote desktop software, one just has
to enable it. The rdesktop software is installed on your Linux computer,
but there are many other options in the Debian and Ubuntu repositories for
remote desktop access between windows and Linux.

https://www.itworld.com/article/2988289/linux/how-to-install-and-use-rdesktop-the-remote-desktop-client-for-linux.html

http://www.rdesktop.org/

https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/remote-desktop-clients

If you have two computers, you may want to put windows 10 on one of them
and Linux on the other. Then you can try out rdesktop and other Linux
flavors of remote desktop access over your lan to see how it works.

Once caveat, the connection will be slower over the Internet than over your
lan.

Good luck!

Mark



On Sun, Jan 7, 2018 at 5:33 AM, Richard Owlett  wrote:


On 01/06/2018 08:51 PM, Mark Phillips wrote:


A few ideas off the top of my head...

* Maybe you could use rdesktop (or some equivalent) to gain access
to his computer and show him how to work on it? I did this years ago
on older Windows machines from Linux, not sure if you can do it today
with newer windows. Google will help you with this.



I'd be uncomfortable having him install software that I'm unfamiliar with.



* Set up a virtual machine on your Linux box and install Windows 10.
Then you and he will have a common vocabulary. The rdesktop idea
should also  work in this setup.



That has possibilities. A VM has been suggested for an unrelated series of
projects. I like to experiment with install/configuration options (primary
machine has 5 installs of Debian with a sixth being seriously considered)



* Just go see him, forget the computers, and drink some beer;)



Mobility issues make traveling that distance difficult. Also his house is
not handicapped accessible.

Thanks all.



___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug




___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] [OT ?] Assisting brother while 1000 miles away

2018-01-07 Thread Mark Phillips
Richard,

Rdesktop,or similar software apps, are used by tech support companies
worldwide to access the client's computer and fix things, communicating to
the office computer from home, and as a teaching aid because you both can
see what is on the client's screen, and you can share the mouse. There is
no software to install on the Windows client, just allow RDP in system
properties. Windows includes all the remote desktop software, one just has
to enable it. The rdesktop software is installed on your Linux computer,
but there are many other options in the Debian and Ubuntu repositories for
remote desktop access between windows and Linux.

https://www.itworld.com/article/2988289/linux/how-to-install-and-use-rdesktop-the-remote-desktop-client-for-linux.html

http://www.rdesktop.org/

https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/remote-desktop-clients

If you have two computers, you may want to put windows 10 on one of them
and Linux on the other. Then you can try out rdesktop and other Linux
flavors of remote desktop access over your lan to see how it works.

Once caveat, the connection will be slower over the Internet than over your
lan.

Good luck!

Mark



On Sun, Jan 7, 2018 at 5:33 AM, Richard Owlett  wrote:

> On 01/06/2018 08:51 PM, Mark Phillips wrote:
>
>> A few ideas off the top of my head...
>>
>> * Maybe you could use rdesktop (or some equivalent) to gain access
>> to his computer and show him how to work on it? I did this years ago
>> on older Windows machines from Linux, not sure if you can do it today
>> with newer windows. Google will help you with this.
>>
>
> I'd be uncomfortable having him install software that I'm unfamiliar with.
>
>
>> * Set up a virtual machine on your Linux box and install Windows 10.
>> Then you and he will have a common vocabulary. The rdesktop idea
>> should also  work in this setup.
>>
>
> That has possibilities. A VM has been suggested for an unrelated series of
> projects. I like to experiment with install/configuration options (primary
> machine has 5 installs of Debian with a sixth being seriously considered)
>
>
>> * Just go see him, forget the computers, and drink some beer;)
>>
>
> Mobility issues make traveling that distance difficult. Also his house is
> not handicapped accessible.
>
> Thanks all.
>
>
>
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


[PLUG] [RESOLVED] - [OT ?] Assisting brother while 1000 miles away

2018-01-07 Thread Richard Owlett

On 01/06/2018 04:41 PM, Richard Owlett wrote:

I abandoned WindowsXP a long time ago.
My brother, without a single geek chromosome, uses Windows 10.

His computer is emitting beeps at times other than POST.

I sent him what I thought would be useful links [snip]


Got a phone call this morning. One of the links nudged him to remember 
that he was using a different mouse. Swapped mouse with a working 
machine. Symptom gone. Thanks all.




___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] [OT ?] Assisting brother while 1000 miles away

2018-01-07 Thread Richard Owlett

On 01/06/2018 08:51 PM, Mark Phillips wrote:

A few ideas off the top of my head...

* Maybe you could use rdesktop (or some equivalent) to gain access
to his computer and show him how to work on it? I did this years ago
on older Windows machines from Linux, not sure if you can do it today
with newer windows. Google will help you with this.


I'd be uncomfortable having him install software that I'm unfamiliar with.



* Set up a virtual machine on your Linux box and install Windows 10.
Then you and he will have a common vocabulary. The rdesktop idea
should also  work in this setup.


That has possibilities. A VM has been suggested for an unrelated series 
of projects. I like to experiment with install/configuration options 
(primary machine has 5 installs of Debian with a sixth being seriously 
considered)




* Just go see him, forget the computers, and drink some beer;)


Mobility issues make traveling that distance difficult. Also his house 
is not handicapped accessible.


Thanks all.


___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug