On Dec 19, 2007 3:41 PM, A.Krishnan <ridgetwo@xxxxxxxxxxxxx> wrote: > Hello, > > I am using two computers. The serial i/o chip is 16550A based. It is > an old hardware and could not find more details. The two serial ports > (ttyS0) are connected by a null-modem cable. I am sending a simple > string (This is the tester) from one end to another end. I am running > 2.6.9 kernel. With 9600 baudrate the receiving end I get either > This is the test > or > This is the test > er > > If I use a baudrate of 19200 or 38400, I get the following string: > T<00>his is > I interpreted this as a data corruption. So I used 9600 baudrate at > both ends. I put a printk debug statement in 8250.c program ( procedure: > static void receive_chars(struct uart_8250_port *up, unsigned int > *status) ) The printk is after the following line: > do { > ch = serial_inp(up, UART_RX); > > Analysis of the received character did not reveal any missing of > characters. I don't exactly know the flow of the serial driver > functions and hence not exactly knowing the next step in debugging. So > I would like to get some guidance/direction/suggestions from others. > Also, I would like to have references for a HowTo/architecture of Linux > serial driver. Please let me know your input. Any help is appreciated to > solve this problem. > > A. Krishnan Damn, I haven't worked on serial ports in 10+ years. Brings back memories. Historically the issue with serial ports is the handshaking. You don't say what your doing, but you almost always need the UART to be managing the handshaking without the kernel being involved. If you are expecting the kernel to always respond to every interrupt before the data overflows the UARTs buffer, your going to be unhappy eventually. (unless your writing a realtime app, etc.) And of course you need the 2 UARTs set to the same handshaking mode (Xon/Xoff or hardware). If you go with hardware, then you have to ensure you have the correct pins connected on the serial connector. To verify that I always used a serial breakout box with little lights. Used to be available for $10 or $20 each for cheap ones. $100 or so for a good one. Personally, I used to start with Xon/Xoff (cntrl-s/cntrl-q) because it was the easiest to get working. Then, I would move to using hardware handshaking because it was more reliable. (RTS/CTS etc. iirc) Greg -- Greg Freemyer Litigation Triage Solutions Specialist http://www.linkedin.com/in/gregfreemyer First 99 Days Litigation White Paper - http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf The Norcross Group The Intersection of Evidence & Technology http://www.norcrossgroup.com -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ