Hi all,

In my application I have to interface with more than 6 external interfaces using serial ports. Lets consider 3 of them say A,B,C. And B sends data in a special way where every packet of B is a single line of the form
$abcde,f,g,h,i,j*hh<CR><LF> where hh is the checksum.
Port configuration for B is
Code:
tcgetattr(Fd,&mOldtio); 
   mNewtio.c_cflag = BAUDRATE2 | CS8 | CLOCAL | CREAD |CRTSCTS;
   mNewtio.c_iflag = 0;//setting the input flag to icrnl causes a blank frame to be displayed after every frame.
   mNewtio.c_oflag = 0;
   mNewtio.c_lflag =ICANON;
   mNewtio.c_cflag &=~PARENB;
   mNewtio.c_cflag &= ~CSTOPB;
   mNewtio.c_cc[VEOL]=0;//setting VEOL to '\r' or '\n' causes a blank frame to be displayed after every frame.
   mNewtio.c_cc[VKILL] = 0;     /* @ */
   mNewtio.c_cc[VSTART] = 0;     /* Ctrl-q */
   mNewtio.c_cc[VSTOP]  = 0;     /* Ctrl-s */
   mNewtio.c_cc[VMIN]=0;
   mNewtio.c_cc[VTIME]=0;
   tcflush(Fd, TCIFLUSH);
   tcflow(Fd,TCION);
   tcsetattr(Fd,TCSANOW,&mNewtio);
The BAUDRATE2 etc are macros for actual stuff. I m using RHEL4,Qt4.2.1 and C++. Also, I read 100 bytes at a time into a char buffer and then check for packet validity according to interface rules.
When I run A & B together, everything is fine. But when C is introduced after 3-4 hrs I receive frames from B such that every character of
frame is followed by a newline and after some more time only $ is received as the only character followed by a newline. But when I close the application window and open it again (without closing the parent window) it runs fine. This leads me to believe that may be there is something wrong with the port setting. Because when I add CRTSCTS to subsystem C and run A,B,C together then B goes down after 10-15 minutes itself. Can somebody point out as to where is the problem?

Secondly, I haven't found a tutorial where every option and its practical relevance has been delved into, most of the tutorials referred to are just man pages or just a line or two for explanation. The practical relevance of options are non existent. The links on the net finally lead to just one or two of the tutorials like mike and one or two others. If someone has the relevant material please do share it.