All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Deepak Gupta" <deepak@cse.iitk.ac.in>
To: linux-serial@vger.kernel.org
Subject: serial communication problems
Date: Wed, 29 May 2002 16:35:11 +0530	[thread overview]
Message-ID: <NGBBLCPHOLHALDOMDOMNIEEFCAAA.deepak@cse.iitk.ac.in> (raw)

Hi,

I have a strange problem with the serial line communication in Linux
(RH 7.2, kernel 2.4.7-10).  We have some electronic locks that are
controlled by a PC.  The locks are connected by a RS485 twisted pair
(multidrop) and this line terminates in a 485-232 converter box which
is connected via the serial line to a PC.  The lock vendor has supplied
a Windows software to program the locks which works fine on this PC.
He has also given me the protocol that is followed between the PCs and
the locks.  I am trying to write my own Linux based software for
programming the locks.

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).
I know the locks use 9600 baud, 8 bits, no parity, 1 stop bit and I
am using the same.  I also tried with and without hardware flow control
(RTS/CTS) but no luck.  I know that the command I send is right since
I used another PC to listen to what the vendor software writes on the
serial line and it matches the protocol description that I have.

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.

Please help.

Deepak Gupta

             reply	other threads:[~2002-05-29 10:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-29 11:05 Deepak Gupta [this message]
2002-05-29 14:07 ` serial communication problems Gerald Emig
2002-05-30  2:55   ` Deepak Gupta
     [not found] <005401c20717$6690c0c0$294b82ce@connecttech.com>
2002-05-30  2:52 ` Deepak Gupta
     [not found] <Pine.LNX.4.33.0205300846120.17925-100000@emig4.heisch.inka.de>
2002-05-30  6:40 ` Deepak Gupta
2002-05-30  7:56   ` 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=NGBBLCPHOLHALDOMDOMNIEEFCAAA.deepak@cse.iitk.ac.in \
    --to=deepak@cse.iitk.ac.in \
    --cc=linux-serial@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.