Networking Forums

Networking Forums > Computer Networking > Linux Networking > Do I need to use Different Serial cable ( RS232 ) for ( Linux to Solaris ) and ( Linux to Windows )

Reply
Thread Tools Display Modes

Do I need to use Different Serial cable ( RS232 ) for ( Linux to Solaris ) and ( Linux to Windows )

 
 
nurxb01@gmail.com
Guest
Posts: n/a

 
      04-17-2006, 10:50 AM
HI

I am working on a multi-platorm application ( i.e Windows, Linux
, Solaris , AIX ) which communicates using RS232 port to an another
third party application running on the another system which could also
be on different platform ( i.e Windows, Linux , Solaris , AIX ).

My question is do i need to use different kind of serial cable to
communicate between two application if
a] both the application are running or same typeof systems ( System
having same endianess ) like ( Windows Windows ) or ( Linux Linux ) or
( Windows Linux )
and
b] both the applicatons are running or system with different endianness
( Windows and AIX ) , ( Linux and Aix ) or ( Linux and Solaris )


Thanks is advance.

 
Reply With Quote
 
 
 
 
Manuel Tobias Schiller
Guest
Posts: n/a

 
      04-17-2006, 11:25 AM
On 2006-04-17, (E-Mail Removed) <(E-Mail Removed)> wrote:
> HI
>
> I am working on a multi-platorm application ( i.e Windows, Linux
> , Solaris , AIX ) which communicates using RS232 port to an another
> third party application running on the another system which could also
> be on different platform ( i.e Windows, Linux , Solaris , AIX ).
>
> My question is do i need to use different kind of serial cable to
> communicate between two application if
> a] both the application are running or same typeof systems ( System
> having same endianess ) like ( Windows Windows ) or ( Linux Linux ) or
> ( Windows Linux )
> and
> b] both the applicatons are running or system with different endianness
> ( Windows and AIX ) , ( Linux and Aix ) or ( Linux and Solaris )
>
>
> Thanks is advance.
>

Well, as long as you get the wiring of the cabling right, communication
over the serial port should be byte order independent because bits are
transmitted serially so one should read data at the recieving end which
is byte-wise identical to what was sent. If it's an ordinary RS232 port
you are using, it should be possible to use the same kind of cable for
all platforms; after all, there's a standard pinout for RS232 ports.

What might be a problem is that the applications you use might not agree
on the order in which longer integer and floating point types are
written to and read from bytes. So you have the classical endianness
problem, and it is in no way connected to using a serial cable. I can't
help you there, because I don't know what applications you use. If they
use some kind of textual representation of everything they send and
recieve, you shouldn't run into problems, though. Hopefully, I could
help to clarify things a little.

Kind regards

Manuel
--
Homepage: http://www.hinterbergen.de/mala
OpenPGP: 0xA330353E (DSA) or 0xD87D188C (RSA)
 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      04-18-2006, 12:10 AM
On 17 Apr 2006, in the Usenet newsgroup comp.os.linux.networking, in article
<(E-Mail Removed) .com>, (E-Mail Removed)
wrote:

>I am working on a multi-platorm application ( i.e Windows, Linux
>, Solaris , AIX ) which communicates using RS232 port to an another
>third party application running on the another system which could also
>be on different platform ( i.e Windows, Linux , Solaris , AIX ).


That's fine - it's RS-232.

>My question is do i need to use different kind of serial cable to
>communicate between two application if
>a] both the application are running or same typeof systems ( System
>having same endianess ) like ( Windows Windows ) or ( Linux Linux ) or
>( Windows Linux )
>and
>b] both the applicatons are running or system with different endianness
>( Windows and AIX ) , ( Linux and Aix ) or ( Linux and Solaris )


There are two types of cable. One (pin to pin) is used when talking to
a modem (or similar - a Date Communications Equipment device) and a
terminal (or computer - a Date Terminal Equipment), and the other,
called a null modem cable, is used when talking to like devices (computer
to computer for example). This is a serial device, and when using the
common serial port, you stick a byte into a UART, and the byte comes out
of the UART on the other end. In fact, over the wire, the bits are
ALWAYS transmitted LSB first. Now, how many bits may be in a byte,
parity, and the number of stop bits are under the control of the
application. There is no byte ordering other than what the application
and hardware is doing. As most serial ports are run from a single byte
wide data address (example - IBM said COM 1 is at 0x3f8), the application
is going to be pumping bytes sequentially so this isn't really relevant
anyway.

Old guy
 
Reply With Quote
 
Manuel Tobias Schiller
Guest
Posts: n/a

 
      04-18-2006, 04:52 PM
On 2006-04-18, Moe Trin <(E-Mail Removed)> wrote:
> [...] This is a serial device, and when using the
> common serial port, you stick a byte into a UART, and the byte comes out
> of the UART on the other end. In fact, over the wire, the bits are
> ALWAYS transmitted LSB first. Now, how many bits may be in a byte,
> parity, and the number of stop bits are under the control of the
> application. There is no byte ordering other than what the application
> and hardware is doing. As most serial ports are run from a single byte
> wide data address (example - IBM said COM 1 is at 0x3f8), the application
> is going to be pumping bytes sequentially so this isn't really relevant
> anyway.
>
> Old guy

Well, if the application does write binary data (say 32 bit integers) in
host byte order to a device file, the recieving side will be able to
read these in the sender's byte order and things may go wrong if they
don't match. Usually, the kernel feeds the bytes to the UART and the
application just sees something that looks very much like a file. If the
applications is well behaved, it will not just write host byte order
without sending a note about the order used along as well, or it may
even specify byte order explicitly (and always write and read in, let's
say, big endian mode, for example), and things will work. But if the
application is not well behaved in that respect, things are headed for
trouble.

Manuel
--
Homepage: http://www.hinterbergen.de/mala
OpenPGP: 0xA330353E (DSA) or 0xD87D188C (RSA)
 
Reply With Quote
 
nurxb01@gmail.com
Guest
Posts: n/a

 
      04-19-2006, 12:26 PM
Thanks a lot Mr. Manuel & Mr. Moe Trin for you very informative
inputs. I am a dummy in Serial Communication and this whole question
arises when one of our Engineers reported following issue. Please look
at the below statement In his own words

----------"In the serial connection between our Application's computer
and ThirdPary's computer, if two computers are one PC and UNIX
workstation, usually users need to put a Null Modem plus a serial
cable. For an example, for ThirdPary application running on AIX UNIX
workstation, if users choose Solaris UNIX workstation to run our
Application, there is no need for Null Modem in the connection, just a
serial cable will do the job. But if users choose Linux to run our
Application and Third Party is still running on AIX, then this is a PC
to UNIX case, so the connection will need a Null Modem in addition to a
regular serial cable."-----------------------

[ Mr. Moe Trin wrote :-
>> There are two types of cable. One (pin to pin) is used when

talking to
>>a modem (or similar - a Date Communications Equipment device) and a


>>terminal (or computer - a Date Terminal Equipment), and the other,
>>called a null modem cable, is used when talking to like devices

(computer
>>to computer for example). ]


But after looking at your replies I think we should always use NULL
Modem Cable. Please correct me if I am wrong.

 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      04-20-2006, 12:37 AM
On 19 Apr 2006, in the Usenet newsgroup comp.os.linux.networking, in article
<(E-Mail Removed) .com>, (E-Mail Removed)
wrote:

>I am a dummy in Serial Communication and this whole question
>arises when one of our Engineers reported following issue.


-rw-rw-r-- 1 gferg ldp 268131 Feb 20 13:59 Serial-HOWTO
-rw-rw-r-- 1 gferg ldp 41557 Aug 28 2001 Serial-Programming-HOWTO

The second one is dated.

>----------"In the serial connection between our Application's computer
>and ThirdPary's computer, if two computers are one PC and UNIX
>workstation, usually users need to put a Null Modem plus a serial
>cable. For an example, for ThirdPary application running on AIX UNIX
>workstation, if users choose Solaris UNIX workstation to run our
>Application, there is no need for Null Modem in the connection, just a
>serial cable will do the job. But if users choose Linux to run our
>Application and Third Party is still running on AIX, then this is a PC
>to UNIX case, so the connection will need a Null Modem in addition to a
>regular serial cable."-----------------------


I suspect your engineer is confusing something else using the serial port,
and hasn't tried this.

>But after looking at your replies I think we should always use NULL
>Modem Cable. Please correct me if I am wrong.


That would be correct. Actually a more common problem is matching up the
right connectors. RS-232 is officially a 25 pin connector. Most serial ports
on PC type hardware are using 9 pin connectors. Section 20.1 of the Serial-
HOWTO noted above explains this. For that matter, the Macintosh is even
worse, as it's actually using a similar but different standard that is
"close enough" to be electrically compatible, but uses DIN connectors.

Old guy
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux stuck when serial cable is disconnected hagit Linux Networking 9 10-22-2007 06:11 AM
serial RS232 down writethem Linux Networking 3 09-22-2007 07:04 AM
Linux-HA serial cable pin-out configuration details sipitai Linux Networking 2 11-01-2004 11:17 AM
USB Serial Converters to RS232 Grahame Linux Networking 4 10-04-2004 02:37 AM
wireless 9-pin serial/rs232 Dan Irwin Wireless Internet 13 04-06-2004 03:16 AM



1 2 3 4 5 6 7 8 9 10 11