[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Data from a serial port



On 10/04/2014 12:56 AM, Joel Rees wrote:
On Sat, Oct 4, 2014 at 11:05 AM, Jerry Stuckle <jstuckle@attglobal.net> wrote:
On 10/3/2014 9:52 PM, Joel Rees wrote:
On Sat, Oct 4, 2014 at 9:54 AM, Jerry Stuckle <jstuckle@attglobal.net> wrote:
On 10/3/2014 8:19 PM, Joel Rees wrote:
On Sat, Oct 4, 2014 at 5:52 AM, Jerry Stuckle <jstuckle@attglobal.net> wrote:
On 10/2/2014 8:24 PM, Ethan Rosenberg wrote:
[...]

In addition to Dan's comments - is your cable OK?  Do you need a
straight-through cable or a cross-over cable?  Does the terminal
require/honor DSR/TSR and RTS/CTS?  If so, are these lines active?

You may need a breakout box on the cable to see what's happening on the
lines.

If, for some reason, you can't get a breakout box, you may be able to
do basic tests on the cable with a multimeter (ohm-meter or
connectivity function), the pin diagrams, some patience, and maybe an
extra pair of hands (if you can't find small-mouth alligator clips or
pin clips). Just don't tell whoever handles requisitions/budget unless
they understand that patience costs time and money when doing things
like this. You have to be really careful to keep the leads from
slipping, and not noticing a slipped lead can cost hours of
unnecessary work.And there are tests you really don't want to try
without a breakout box or the equivalent.


Why couldn't he?  They're cheap, i.e.
http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_14285_-1.

Note if he's using DB9 connectors he would need a pair of DB9-DB25
connectors.  But they are also cheap.

Uhm, maybe he has a multimeter now, and doesn't want to wait for
overnight shipping or take the time to run down to a supply house
downtown or even wait for said supply house to do a same-day delivery.

Or maybe finances at the company are really, really tight right at the moment.

Now, of course, if the supply house is next door, and his company is
okay with people bringing in tools paid for out-of-pocket, going and
getting it would be a good excuse to take a half-hour break anyway
(assuming no lines at the supply house).

My point was simply that connectivity checks don't need a breakout box.

Breakout boxes do make them more convenient, and quicker, and give
more reliable results. Not to mention enabling more in-depth testing,
especially if you have an oscilloscope with data capture.

I'm not arguing with you on this one, Jerry, I was just offering an
alternative. Not a great alternative, but maybe a useful one.


If his company cannot afford $9.95 + shipping for a breakout box, then
that company is in deep crap anyway.

That's not the only possibility I mentioned, but I have worked for
such companies in the past. (Twice.) Whether my reasons for not
bailing immediately were valid or not is not something I care to
dredge up.

Come to think of it, I have also worked for companies where
requisitions seemed to be on greased rails, and found out the hard way
the problems you can buy yourself when you get lots of tools you don't
know how to use.

And if he's a consultant and can't
afford the basic tools to do his job, he shouldn't be in the business.
And he's already worked on this much more than overnight (or even
second-day) delivery would have caused a delay.

And maybe he would rather order a breakout box now, but still spend
fifteen minutes doing things the hard way, so that when the breakout
box comes he can be pretty confident about which end of the cable he
wants to hang it on to start with, and what extra test data he wants
to try to push down the pipe.

An oscilloscope (with or without data capture) is much more expensive,
and still can't monitor all of the lines concurrently - at least unless
you have an 8 channel scope (*very expensive*).  And a multimeter will
work for one wire at a time - if you have access to the lines.

And having a breakout box (or two, even) can help make the signals
available if he decides he wants to look at waveforms. Even a single
channel with trigger will allow you to get a llook at a byte of data
going one direction, or watch a handshake line that you might suspect
of being intermittent or having impedance problems. Or check that when
you tell the system to use handshake, it really does.

But, yeah, four or eight channels is really convenient, saves a lot of
time and crossed eyeballs and scratching your head when you have to do
this kind of stuff regularly. Not to mention much time it saves to be
able to store a sample.

But if
he has molded plugs and no access to the interior connections of the
terminal or the computer, neither a multimeter nor an oscilloscope will
be any good.

But then again, maybe he has a connector that he has popped out of the
shell for just this purpose. (Although that is essentially making a
poor-man's breakout box, and, considering the cost of a simple
breakout box and the speed of shipping, is probably a waste of time.
Unless he decides he needs something to keep his hands busy while he
takes a break, or unless he just wants to play with the tools.) Or
maybe he is not above using a (horrors! impedance problems! Induced
noise!) paper clip or breadboard wire.

Would you be too horrified if I admit that I usually just use aW
paperclip and a multimeter when I want a want a quick (but not
perfect) continuity check? Saves me rummaging through the tools for
the breakout box, usually, since what I really want to know is whether
I should be looking harder at the port/device settings, and I'm
usually not running over 100 kHz data rates.

It's all about having the *right tools* to do the job.  In this case the
right tool is inexpensive and easily obtainable.

If he has to do the job more than once, even if he improvises now,
sure, he wants to get the right tools, if he doesn't have them. Even
if he hopes not to have to do this again, he should probably get the
right tools. Mentioning an improvisation might have the bad effect of
inducing him to decide not to get the right tools, and that might be
lamentable.

Or maybe the OP knows all about how to do it the hard way, in which
case my thoughts (and this sub-thread) have been wasted.

And I'm arguing with you, which I didn't want to do. Oh, well. I've
said more than I intended to at this point, so I'm going to drop it.
Got other things I need to do.

P.S. As I've told you before - there is no need to copy me.  I am
subscribed to the mailing list.

I really should set up a real MUA, so I can point it to the list for
replies and not find myself saying to myself, just after I hit the
send button, "Woops! I forgot to delete the To: field again." Sorry.
One of these days.

---
Thanks to all.

Sorry for the delayed reply.  By mistake I created two threads.

To repeat the problem:

If I open minicom and tap W <return>, the scale returns status [in bits]and the Weight in lbs.

Therefore, the cable is OK.

If this helps,

The purpose is to take the output from the scale and write it to a file.

root@meow:/home/ethan#  lsof /dev/ttyS0
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
screen  3871 root    6u   CHR   4,64      0t0 1119 /dev/ttyS0

Also, the manual says "The scale is DTE".

$cat /dev/ttyS0|tee -a scale.txt
bash: /dev/ttyS0: Permission denied
root@meow:/home/ethan#
root@meow:/home/ethan# ls -l /dev/ttyS0
crw-rw---- 1 root dialout 4, 64 Oct  4 23:00 /dev/ttyS0
root@meow:/home/ethan# chown ethan /dev/ttyS0
root@meow:/home/ethan# ls -l /dev/ttyS0
crw-rw---- 1 ethan dialout 4, 64 Oct  4 23:00 /dev/ttyS0
root@meow:/home/ethan# $cat /dev/ttyS0|tee -a scale.txt
bash: /dev/ttyS0: Permission denied
root@meow:/home/ethan# $cat /dev/ttyS0|tee -a scale.txt

Hope this helps.


TIA

Ethan



Reply to: