Serial Pass Thru garbles bytes

Hi, I’m having problems using the Serial Pass Thru Example.
I can send bytes back and forth between two laptops but the bytes are garbled in each direction.
I have search for answers in this forum and elsewhere without finding an answer. I’m fairly new at this and would appreciate any help.

I am using an UNO and using version 1.0.5 software. I am connecting an old HP Omnibook serial port thru the UNO’s hardware serial port and out the UNO’s software serial port to a RS232 to USB converter on a Dell Vostro. I am using Realterm on both computers with the display set to HEX. No CR or LF attached to bytes sent or received.

I have run the example program unaltered and also tried setting both input and output to 9600 baud on the UNO. In both cases I have the same problem with the output.

Running the program gives the same garbled output on both computers. If I enter 0x31 on the Omnibook I receive on the Dell 0x4C 0x00. If I enter 0x32, I receive 0x66 0x00. If I enter 0x33, I receive 0x06 0x00. The same happens if I transmit in the other direction Dell to Omnibook.

Why are the bytes being garbled? The same input character always gives the same output (ie. it is not a random garbling).

Why do I get two bytes out, the second byte is always 0x00.

Attached is the code I am using.

Thanks for any light you can shed on this problem.

Bob

/*
  Software serial multple serial test
 
 Receives from the hardware serial, sends to software serial.
 Receives from software serial, sends to hardware serial.
 
 The circuit: 
 * RX is digital pin 10 (connect to TX of other device)
 * TX is digital pin 11 (connect to RX of other device)
 
 Note:
 Not all pins on the Mega and Mega 2560 support change interrupts, 
 so only the following can be used for RX: 
 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69
 
 Not all pins on the Leonardo support change interrupts, 
 so only the following can be used for RX: 
 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).
 
 created back in the mists of time
 modified 25 May 2012
 by Tom Igoe
 based on Mikal Hart's example
 
 This example code is in the public domain.
 
 */
#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup()  
{
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
 // while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
 // }

 
  Serial.println("Goodnight moon!");

  // set the data rate for the SoftwareSerial port
  mySerial.begin(9600);
  mySerial.println("Hello, world?");
}

void loop() // run over and over
{
  if (mySerial.available())
     Serial.write(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());
}

For a serial connection to work correctly, both ends need to use the same serial settings (speed, start.stop bits, parity). You have two serial connections so four ends points to check. If you're getting data errors then I suspect that somewhere between these four endpoints you will find you are using different settings.

out the UNO's software serial port to a RS232 to USB converter on a Dell Vostro.

What are you doing to convert the TTL from the Arduino into RS232?
There is a logic inversion between TTL and RS232 as well as a voltage level shift.
It sounds like you are feeding an inverted signal into your Dell.