Re: Serial (RS232) communication - failing to detect stop bit



On Sep 13, 10:37 pm, Doug Mitton <doug_mit...@xxxxxxxxxxxxx> wrote:
"arka.n.roy" <arka.n....@xxxxxxxxx> wrote:
I need to use my Gentoo machine to obtain data from an external
instrument via a 9-pin serial port. Very old stuff.

It was not working, so I have been trying to diagnose the problem.

I bought a cable that is called a "cross cable" in Japan (where I am
located), I think this corresponds to what is called a "null-modem
cable" in America. Both ends are female, and it is used to directly
connect 2 PCs.

So here is the setup:

PC-1: Gentoo OS
PC-2: Has partitions for both Windows XP and Xandros Linux.

I have narrowed things down to where I realize I am getting the
following.

If I run the following command on the Gentoo machine (PC-1):
cat /proc/tty/driver/serial
I get, along with the number of bytes transfered by rx and tx, I also
get fe:2, which I assume means two frame errors.

The rx figure is correct in that it jives with the number of bytes I
sent from PC-2... this indicates that the Gentoo machine IS receiving
data. However maybe the fe:2 means that it is not detecting the stop
bits, and this is preventing it from displaying output text in
minicom.

I have checked and rechecked that all the settings (bit rate, parity
etc) all match on both machines. I am wondering if there is some
factor in the kernel that is making it not recognize the stop bit. I
have had other indications as well that a stop bit or a terminator is
not being detected (long story). What are some possible causes?
(e.g. the OS is doing too much interrupting or not enough?)

There is one other area to check in Linux ... the "terminal settings".
The defaults can be different between distros.

This is the `stty` command.

For instance, my dialup modem looks like this:
<P8>:~$ stty -F /dev/ttyS2
speed 115200 baud; line = 0;
min = 1; time = 0;
-brkint -icrnl -imaxbel
-opost -onlcr
-isig -icanon -iexten -echo -echoe -echok -echoctl -echoke
<P8>:~$

and my direct connect line looks like this:
<P8>:~$ stty -F /dev/ttyS1
speed 9600 baud; line = 0;
-brkint -imaxbel
<P8>:~$

Hope this helps! Good luck!
--
------------------------------------------------
http://www3.sympatico.ca/dmitton
SPAM Reduction: Remove "x." from my domain.
------------------------------------------------

Thanks Doug, I will compare these on the Gentoo and Xandros machines!
I am away from the office for the next couple of days.
Arka

.



Relevant Pages

  • Re: Demise of Western Union [Telecom]
    ... They were low speed Baudot machines. ... quiet-running 300 baud ASCII terminals and I believe Control Data ... It made very good sense that WU set up a "Data Services" ...
    (comp.dcom.telecom)
  • RE: [Full-Disclosure] Re: [tool] the new p0f 2.0.1 is now out
    ... detecting. ... >> the system on machines that connect to your box, ... >> even if the device is behind a fascist packet firewall. ...
    (Full-Disclosure)
  • Re: your tax dollars at work
    ... If they are better at detecting a radiation source, then they may be able to prevent a device which could kill people couldn't it? ... If it can prevent someone or a lot of someones from dying, should we be making a cost benefit analysis to determine whether to use these machines or not? ... materials at ports, a report from the National Research Council says. ...
    (soc.retirement)
  • Re: Why is James Cameroons output so less?
    ... > Lance Henrikson was originally going to be the Terminator. ... advanced resources/ technology, thus they could make Arny, the ... But, after a few years, rebels could gather enough resources/ ... self-awareness to machines on its returned, ...
    (rec.arts.movies.current-films)
  • RE: Faulty detection routine for MS08-024 (KB947864)?
    ... I am using ITMU v3 for SMS to deploy these patches, but visiting Windows ... Update with the same computer also shows that MS08-024 - Cumulative update ... None of the machines actually have MS08-024 ... Windows Update is not correctly detecting the ...
    (microsoft.public.windowsupdate)