Arduino can't read data from router's serial port

Hello!

I'm trying to get data via serial connection from my router by arduino's UART.
I'm getting incomming data, but it's garbage only!

My router has 3,7 V on UART so i decied to use MAX3232 to convert to 5V TTL levels.
After i checked port by reading router's boot log by terminal program (9600,8n1) on desktop PC with physical rs-232 COM port. Everything is readed fine!

But Arduino gets only "bad" bytes.

Here's my sketch:

#include <SoftwareSerial.h>

SoftwareSerial comSerial(4,5);

void setup()
{
comSerial.begin(9600);
}

void loop()
{
if (comSerial.available())
   {
   char comByte = comSerial.read();
   Serial.println(comByte);
   }
}

i have duino nano v3 and other devices with serial interfaces which works with my duino on same pins.
At least, some weeks ago i have tryed this scheme at first time and transmition to duino was OK !
But now i can't repeat that success. Same hardware, same sketch. What is wrong ???

Please help me, were is my mistake ?

Read this before posting a programming question

Please edit your post, select the code, and put it between [code] ... [/code] tags.

You can do that by hitting the # button above the posting area.

The arduino serial input should be TTL, so you may not have to use the max232.

As i posted earlier:

My router has 3,7 V on UART so i decied to use MAX3232 to convert to 5V TTL levels.

My router has 3,7 V on UART so i decied to use MAX3232 to convert to 5V TTL levels.
After i checked port by reading router's boot log by terminal program (9600,8n1) on desktop PC with physical rs-232 COM port. Everything is readed fine!

Hmmm... 8)

Yes, i noticed what 12V RS-232 COM port works with 5V (i've checked that by tester) Serial. That's a little strange, but 5V duino's pin must recive for sure! But he didn't. Any idea what else can i check ??

The point you may be missing is that the max232 inverts a TTL signal into an rs232 signal. AKA, using the max232 chip is probably what is causing the problem by inverting the signal. Router probably outputs a TTL signal and the arduino uses TTL input (the pc probably requires the inverted rs232).

but without max3232 Arduino can't get signal at 3,7 V, am ui right ?

tonich:
without max3232 Arduino can't get signal at 3,7 V.

Just connect the router tx to the arduino rx, and connect the the router and arduino grounds together. The arduino probably can read a voltage down to 2.2v or maybe 1.2v on its rx pin.

tonich:
but without max3232 Arduino can't get signal at 3,7 V, am ui right ?

It will probably work without it. Otherwise you need a level shifter, not the Max232.

Yes, it works without anything between router and arduino. Thank you!