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

This is a discussion on Do I need to use Different Serial cable ( RS232 ) for ( Linux to Solaris ) and ( Linux to Windows ) within the Linux Networking forums, part of the Linux Forums category; HI I am working on a multi-platorm application ( i.e Windows, Linux , Solaris , AIX ) which communicates using RS232 port ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2006
nurxb01@gmail.com
 
Posts: n/a
Default Do I need to use Different Serial cable ( RS232 ) for ( Linux to Solaris ) and ( Linux to Windows )

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
  #2 (permalink)  
Old 04-17-2006
Manuel Tobias Schiller
 
Posts: n/a
Default Re: Do I need to use Different Serial cable ( RS232 ) for ( Linux to Solaris ) and ( Linux to Windows )

On 2006-04-17, nurxb01@gmail.com <nurxb01@gmail.com> 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
  #3 (permalink)  
Old 04-18-2006
Moe Trin
 
Posts: n/a
Default Re: Do I need to use Different Serial cable ( RS232 ) for ( Linux to Solaris ) and ( Linux to Windows )

On 17 Apr 2006, in the Usenet newsgroup comp.os.linux.networking, in article
<1145271031.989458.230530@i39g2000cwa.googlegroups .com>, nurxb01@gmail.com
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
  #4 (permalink)  
Old 04-18-2006
Manuel Tobias Schiller
 
Posts: n/a
Default Re: Do I need to use Different Serial cable ( RS232 ) for ( Linux to Solaris ) and ( Linux to Windows )

On 2006-04-18, Moe Trin <ibuprofin@painkiller.example.tld> 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
  #5 (permalink)  
Old 04-19-2006
nurxb01@gmail.com
 
Posts: n/a
Default Re: Do I need to use Different Serial cable ( RS232 ) for ( Linux to Solaris ) and ( Linux to Windows )

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
  #6 (permalink)  
Old 04-20-2006
Moe Trin
 
Posts: n/a
Default Re: Do I need to use Different Serial cable ( RS232 ) for ( Linux to Solaris ) and ( Linux to Windows )

On 19 Apr 2006, in the Usenet newsgroup comp.os.linux.networking, in article
<1145449581.753037.249230@v46g2000cwv.googlegroups .com>, nurxb01@gmail.com
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

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



All times are GMT +1. The time now is 07:45 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0