public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: "Deepak Gupta" <deepak@cse.iitk.ac.in>
To: Stuart MacDonald <stuartm@connecttech.com>
Cc: linux-serial@vger.kernel.org
Subject: RE: serial communication problems
Date: Thu, 30 May 2002 08:22:33 +0530	[thread overview]
Message-ID: <NGBBLCPHOLHALDOMDOMNAEEGCAAA.deepak@cse.iitk.ac.in> (raw)
In-Reply-To: <005401c20717$6690c0c0$294b82ce@connecttech.com>

The stty settings are OK, I believe.  Here is the output of
"stty -a -F /dev/ttyS0"

speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint
ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff
-iuclc -ixany -imaxbel
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0
vt0
ff0
-isig -icanon -iexten -echo echoe
echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke

Any idea what else could be wrong?

Deepak

-----Original Message-----
From: Stuart MacDonald [mailto:stuartm@connecttech.com]
Sent: Wednesday, May 29, 2002 7:18 PM
To: Deepak Gupta
Subject: Re: serial communication problems


From: "Deepak Gupta" <deepak@cse.iitk.ac.in>
> The problem is that when the vendor software sends a command to a lock
> it replies obediently but when my program writes exactly the same sequence
> of bytes to the serial line, I don't get a response (the protocol
> says that the lock will not respond unless it gets a valid command).

Check your tty layer settings with stty when your program has the
port open. You'll need CLOCAL to be set....

> Incidentally I opened up the 232-485 converter box and saw that it
> uses only the TX, RX, SG, RTS and CTS lines on the RS232 side.  So
> it cannot be a matter of DTR or some other signal.

..because 485 doesn't have the same signal set. Also check CREAD.
You'll likely want to set the tty layer into "raw" mode so that
your commands don't get character-processed.

..Stu



       reply	other threads:[~2002-05-30  2:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <005401c20717$6690c0c0$294b82ce@connecttech.com>
2002-05-30  2:52 ` Deepak Gupta [this message]
     [not found] <Pine.LNX.4.33.0205300846120.17925-100000@emig4.heisch.inka.de>
2002-05-30  6:40 ` serial communication problems Deepak Gupta
2002-05-30  7:56   ` Deepak Gupta
2002-05-29 11:05 Deepak Gupta
2002-05-29 14:07 ` Gerald Emig
2002-05-30  2:55   ` Deepak Gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=NGBBLCPHOLHALDOMDOMNAEEGCAAA.deepak@cse.iitk.ac.in \
    --to=deepak@cse.iitk.ac.in \
    --cc=linux-serial@vger.kernel.org \
    --cc=stuartm@connecttech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox