problems in serial communication

problems in serial communication

Post by CHOI EUN SEO » Tue, 17 Feb 1998 04:00:00



Dear all unix programmers...

I have problems in serial communication.

Two unix hosts are connected by modem.
I 'll make a daemon program to send messages to remote host
and to receive message from remote host.
This daemon also communicate with other local applications by message queue.

          while (1) {
               if (_is_data_in_queue()) {
                  _recv_data_from_queue();
                  _send_data_to_comm();
               }
               if (_is_data_in_comm()) {
                  _recv_data_from_comm();
                  _send_data_to_queue();
               }
          }

Message Format :
+----+---------------+------------------+-----------+---+
|STX|HEADER(20Byte)|DATA(Max1024Byte)|CRC(2Byte)|ETX|
+----+---------------+------------------+-----------+---+

One host can send messages to remote host at any time.
But there are some data loss
in simultaneously data transfer between two host .
This is my problem.

How can I reduce the data loss ?
Is there any good protocol of implementing
simultaneously serial communication ?

 
 
 

problems in serial communication

Post by Robert Spiko » Tue, 17 Feb 1998 04:00:00


I believe you could use SLIP or PPP to communicate "simultaneously".  (It would
seem to be simultaneous).  This would be a bit of work. People usually do not
use RS-232 asynch. for the type of comm. that you are attempting.


> Two unix hosts are connected by modem.
> I 'll make a daemon program to send messages to remote host
> and to receive message from remote host.
> This daemon also communicate with other local applications by message queue.
> One host can send messages to remote host at any time.
> But there are some data loss
> in simultaneously data transfer between two host .
> This is my problem.

> How can I reduce the data loss ?
> Is there any good protocol of implementing
> simultaneously serial communication ?


 
 
 

problems in serial communication

Post by CHOI EUN SEO » Wed, 18 Feb 1998 04:00:00


I also see SLIP and PPP.
But my host do not support them.
As a matter of fact my hosts are too old.

In detail our network topology is this:

                                                  HOST(LAN)
                                                     |
                                  ---------------+--------------------
                                                     |
                                       Terminal Server
                                        /      /      |      \     \
                                      /       /       |       \      \
                                     /       /        |        \       \
                         HOST(ASY) ...... HOST(ASY)

( Terminal Server translate async data to tcp data,
   HOST(LAN) relay HOSTs(ASY). )

Robert Spikol  wrote ...

Quote:>I believe you could use SLIP or PPP to communicate "simultaneously".  (It
would
>seem to be simultaneous).  This would be a bit of work. People usually do
not
>use RS-232 asynch. for the type of comm. that you are attempting.