Traduzioni di questa pagina?:

WRT54G as wireless rs232

A friend needed a 70mt rs232.
As you can know an rs232 can be only few meter long, so you have some alternatives:

  1. 2 rs485-rs232 converter (we have some trouble to pass 4 wire cable in the ground)
  2. 2 ethernet-power-line adapter (we have a 380V with two phases, and some motors may introduce noise on main)
  3. Buy a quite expansive wireless adpter
  4. Home made adapter using Linksys!


2x WRT54G
2x MAX3232CPE
10x Electrolitic capacitor 0.1 uF 16V
2x 8+8 DIL socked
4x DB9 Male Some jumpers male/female, flat cable, vetronite board..

I don't provide schematic, since it's the same design as provided by MAXIM.
I provide two photo that you can use as example.

WRT54G connector

      GND - 10 | O O | 9  - GND     
     n.c. -  8 | O O | 7  - n.c.    
 Rx ttyS0 -  6 | O O | 5  - Rx ttyS1
 Tx ttyS0 -  4 | O O | 3  - Tx ttyS1
     3.3V -  2 | O O | 1  - 3.3V    


IC Pin  13 <- Pin 2 DB9
IC Pin  14 -> Pin 3 DB9
WRT Pin  4 -> IC Pin 11
WRT Pin  6 -> IC Pin 12
WRT Pin 10 -> Pin 5 DB9
Pin 2 DB9  -> Pin 6 DB9

IC Pin  8  <- Pin 2 DB9
IC Pin  7  -> Pin 3 DB9
WRT Pin 3  -> IC Pin 10
WRT Pin 5  -> IC Pin  9
WRT Pin 9  -> Pin 5 DB9
Pin 2 DB9  -> Pin 6 DB9





For this I used OpenWRT Whiterussian RC5 I suppose you know what you are doing, so I haven't a lot to say.

Build the 2 rs232-ttl devices, Buy a couple of null modem cable Find out an old Analogic modem to use as tester!

On both router:

rm /etc/init.d/S45firewall

On device slave

rm /etc/init.d/S50dnsmasq

Configure device Master as access point (without encription for 1st stage)
Configure device slave as bridge sta (without encription for 1st stage)

Download from the next section the software needed and install it on your router

Configure ip for device master as
Configure ip for device slave as

In this case the serial device is connected on slave, while the pc host on master.

root@master:~# serialoverip -d /dev/tts/1 115200-8n1 -s 3000
root@slave:~# serialoverip -c 3000 -d /dev/tts/1 115200-8n1

Create a script named /etc/init.d/S90serialoverip.master

  serialoverip -c 3000 -d /dev/tts/1 115200-8n1 &

Create a script named /etc/init.d/S90serialoverip.salve

  serialoverip -d /dev/tts/1 115200-8n1 -s 3000 &


chmod 755 /etc/init.d/S90serialoverip.*


Precompiled package for OpenWRT Whiterussian-mips
OpenWRT package patches for WRT and Makefiles





2011/08/26 07:46

Tools personali