Arduino & WRT54GL serial communication

Hi all,

Today I got a WRT54GL and I'm a little unsure about getting the serial on the router to communicate with an arduino.

Can I used a MAX232 to convert the routers 3.3v Logic to the arduino's logic?

I really don't understand RS232 and how it works and if that has anything to do with the arduino's RX/TX pins.

i found this diagram that is used with a pic that they used http://www.jbprojects.net/projects/wifirobot/pic_sch.jpg

I would really appreciate any help so i know if a MAX232 is the way to go.

Thanks in advance

http://www.dd-wrt.com/wiki/index.php/WRT54GL_MAX232_Serial

If you're comfortable soldering it can be done. That chip will add two serial ports to the unit but you only get tx and rx.

you do NOT need a max232. The serial ports on the router and the arduino are both "logic level" serial ports. If you were to run your arduino at 3.3V, you should be able to directly connect them... With the arduino at 5V and the router at 3.3V, you should probably have some conversion in there, but you'd be looking for 5V/3V LOGIC conversion, and NOT "rs232"; there is no reason to have rs232 present anywhere...

(well, one reason to have rs232 is that you could convert the router to rs232 with a max3232 or something, and the arduino to rs232 with a max232 or similar, and then you could connect the rs232 sides to each other or any other rs232 device, with less fear...)

thanks for the replies :slight_smile: I have come to the conclusion that both the arduino and the wrt54gl use Transistor-Transistor-Logic NOT rs232 and therefore the only thing that needs to be changed is the voltages between them.

Im guessing that you would only want to use a MAX232 to communicate with a PC... or the serial version of the arduino.

So i guess that this will do the trick: Logic Level Converter sku: BOB-08745. From sparkfun electronics.

I hope that summerises it up :wink:

Hi Tim,

Have you successfully made your router ( WRT54GL) communicate with the Arduino microcontroller like what Jon Benet ( JB projects) did with his wifi robot?

Your reply would be of great help

Regards

yep i got it going great - untill i cooked the wrt54GL by putting the wires round the wrong way. (stupid me) :frowning:

But however before that happened it was running well :smiley:

How it worked:

R/C car contains a chip commonly known as RX2 chip. If you have a car you simply get the datasheet for the pinouts of the car driver IC and solder the forward, left, right etc wires on top of the pins and connect them to the arduino. (A digitalWrite HIGH to a pin will make it do what ever its soldered to).

To get the communication going I used the Logic Level Converter between the TX and RX (a TX on the arduino goes to the RX of the router and vice versa). I had a little trouble at first but turned out I had the converter round the wrong way. Once fixed i could use JB's code without making any changes. ;D

Hope that helps :slight_smile:

Thanks for the help Tim!

I will try it and keep you posted

My microcontroller: http://mcukits.com/2009/03/12/assembling-the-freeduino-serial-v20-board-max232/
Goal: Exactly same as what you have done

question:

What wires did you mix up that caused the router to be cooked?
Did you remove the auto reset feature of the Arduino? How?

Regards
Hope for your reply

What wires did you mix up that caused the router to be cooked?
Did you remove the auto reset feature of the Arduino? How?

I simply tried to connect the router to a 12v sla battery (since you can't plug it in) and got confused with the wiring diagram since it was in black and white!

Positive was negative negative was positive :-/

Did you remove the auto reset feature of the Arduino? How?

Regards
Hope for your reply

i used the USB version of the arduino. Are you meaning the reset pin on the RS232 version of the Arduino? If So i think JB grounds the reset pin in the 232 connector so it doesn't reset when it receives data from the router.

Im am not sure of this because i haven't got a rs232 serial arduino :-/. I reckon it's easier to use the RX/TX pins on the ardino and convert the logic voltages TTL. (if your board has TX/TX pins)

a few random notes:

the router speaks it's TX/RX logic signals at 3.3v aka 3.3TTL
the arduio speaks its TX/RX logic at 5v (this is a problem) aka 5vTTL
the serial arduino is completly different type of serial communication aka RS232

If you are trying to connect the RS232 Seial version which it seem you are (its what JB did) Youll have to use a MAX232 IC to convert arduino's RS232 logic into Router 3.3vTTL logic.

There's a little bit more on the "RS-232 is not the same as 'Serial'" theme, and what to do about it, at....

There's a link there to an inexpensive solution.