connect Arduino to a serial device

Hello
I want to do a simple project using my Arduino Ethernet and a device that I connect to him with serial.

I want to see the output of the device on the serial monitor
and also to be able to write command to the device
so in the end the arduino will be something like “hyper terminal \ putty”

this is what I have so far

#include <SoftwareSerial.h>
SoftwareSerial RBSerial(6,7);
char Last [1];

void setup()
{
   Serial.begin(19200); 
  DeviceSerial.begin(19200); 
}

void loop()
{
  if (DeviceSerial.available()>0)
  {
    char Last=(DeviceSerial.read());
    Serial.print(Last);
   }

if (Serial.available())
{
  DeviceSerial.write(Serial.read());
}

I have some problem reading the output
I see only garbage on the screen - and because of it I can’t enter the device

my device is working on 19200 for sure (if I connect to him a serial cable to the computer - it’s working )

my connection is
pin6(arduino) — pin3 (RS232 device)Rx
pin7(arduino) — pin2 (RS232 device)Tx
GND(arduino) — pin5 (RS232 device)GND

I have try to change the baud rate in the device also to 115200,9600,57600 - the same thing I’m getting.

what else can I check?

Thanks ,

never mind -
found the problem , I need to use RS232 to TTl converter
no I get no garbage

I don't see how the code you posted can work because it defines RBSerial and uses DeviceSerial ?

You may find the examples in serial input basics useful.

...R

HI DEAR
I want to using connect Arduino with my computar driver softver

211006:
HI DEAR
I want to using connect Arduino with my computar driver softver

Start your own thread do not hijack a very old one.

and before starting your own thread, please read this and follow the instructions given.