|
#1
|
|||
|
|||
|
Howto add serial port to WL500gx
The Asus wl500g deluxe has uart pinout onboard, so 2 serial ports can be added to the unit.
The only difference between wl500g and wl500gx that the deluxe does not require a UART chip, so a simple RS232 transceiver will do the trick. Here are my experiences adding a single serial port to the router The parts you need: - 1 MAX3232 IC (SO-IC) - 5 1uF capacitors - cables, connectors I attached the PCB layout I made, and a few pictures that might help. There are 2 jumpers on the pcb, which switches between the Tx-Rx, so it doesn't matter what kind of serial cable you actually use. Good juper configurations: ._ ._ and _. _. Don't mix them! Next time i'm going to use a switch instead ![]() You need to connect the router's 3.3v, GND, UART_TX0, UART_RX0 pins to the left side of the pcb, set the jumpers, and connect a DB9 connector to the right side. Note: Actually i was able to add the serial port without actually removing the warranty sticker. I left the screw with the sticker untouched, and stretched the unit just enough to get the connector on the pins. Important: Don't try this, unless you know what you are doing. I take no responsibility for damaging your router Code:
CFE version 1.0.37 for BCM947XX (32bit,SP,LE)
Build Date: ¤* 7¤ë 16 19:48:38 CST 2004 (root@PaNLinux)
Copyright (C) 2000,2001,2002,2003 Broadcom Corporation.
Initializing Arena.
Initializing Devices.
et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 1.3.2.0
rndis0: Broadcom USB RNDIS Network Adapter (P-t-P)
CPU type 0x29007: 200MHz
Total memory: 0x1000000 bytes (16MB)
Total memory used by CFE: 0x80300000 - 0x80436CF0 (1273072)
Initialized Data: 0x803311B0 - 0x80333540 (9104)
BSS Area: 0x80333540 - 0x80334CF0 (6064)
Local Heap: 0x80334CF0 - 0x80434CF0 (1048576)
Stack Area: 0x80434CF0 - 0x80436CF0 (8192)
Text (code) segment: 0x80300000 - 0x803311B0 (201136)
Boot area (physical): 0x00437000 - 0x00477000
Relocation Factor: I:00000000 - D:00000000
Device eth0: hwaddr 00-11-D8-XX-XX-XX, ipaddr 192.168.1.1, mask 255.255.255.0
gateway not set, nameserver not set
Rescue Flag disable.
Reading :: TFTP Server.
Failed.: Timeout occured
Loader:raw Filesys:raw Dev:flash0.os File: Options:(null)
Loading: ...... 1748992 bytes read
Entry at 0x80001000
Closing network.
Starting program at 0x80001000
CPU revision is: 00029007
Primary instruction cache 8kB, physically tagged, 2-way, linesize 16 bytes.
Primary data cache 4kB, 2-way, linesize 16 bytes.
Linux version 2.4.29 (josephus@arrakis) (gcc version 3.3.5) #1 Sun Mar 6 02:01:59 CET 2005
__________________
Josephus HuWiCo - Hungarian Wireless Community http://www.huwico.hu |
|
#1
|
|||
|
|||
|
#2
|
|||
|
|||
|
WL500gx serial port success
I have successfully connected to the serial port on J5.
I've used a small converter board from a usb->serial cable (an old phone data cable), and will mount that board inside the case, with just a USB device port added to the back panel. Pictures later ... Here is the output from the serial console on boot (running Oleg's firmware). Code:
CFE version 1.0.37 for BCM947XX (32bit,SP,LE)
Build Date: ¤G 3¤ë 1 16:49:41 CST 2005 (root@PaNLinux)
Copyright (C) 2000,2001,2002,2003 Broadcom Corporation.
Initializing Arena.
Initializing Devices.
et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 1.3.2.0
rndis0: Broadcom USB RNDIS Network Adapter (P-t-P)
CPU type 0x29007: 200MHz
Total memory: 0x2000000 bytes (32MB)
Total memory used by CFE: 0x80300000 - 0x80436F10 (1273616)
Initialized Data: 0x803313D0 - 0x80333760 (9104)
BSS Area: 0x80333760 - 0x80334F10 (6064)
Local Heap: 0x80334F10 - 0x80434F10 (1048576)
Stack Area: 0x80434F10 - 0x80436F10 (8192)
Text (code) segment: 0x80300000 - 0x803313D0 (201680)
Boot area (physical): 0x00437000 - 0x00477000
Relocation Factor: I:00000000 - D:00000000
Device eth0: hwaddr 00-11-D8-??-??-??, ipaddr 192.168.??.??, mask 255.255.255.0
gateway not set, nameserver not set
Rescue Flag disable.
Reading :: TFTP Server.
Failed.: Timeout occured
Loader:raw Filesys:raw Dev:flash0.os File: Options:(null)
Loading: .. 3560 bytes read
Entry at 0x80001000
Closing network.
Starting program at 0x80001000
cpu probe
prom init
cpu report
CPU revision is: 00029007
Primary instruction cache 8kb, linesize 16 bytes (2 ways)
Primary data cache 4kb, linesize 16 bytes (2 ways)
Linux version 2.4.20 (root@omnibook) (gcc version 3.2.3 with Broadcom modifications) #62 Mon Mar 14 21:39:22 MSK 2005
Setting the PFC value as 0x15
Determined physical RAM map:
memory: 02000000 @ 00000000 (usable)
On node 0 totalpages: 8192
zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/mtdblock2 noinitrd init=/linuxrc console=ttyS0,115200
CPU: BCM5365 rev 1 at 200 MHz
Calibrating delay loop... 199.47 BogoMIPS
Memory: 30128k/32768k available (1755k kernel code, 2640k reserved, 220k data, 68k init, 0k highmem)
Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
Checking for 'wait' instruction... unavailable.
POSIX conformance testing by UNIFIX
PCI: Fixing up bus 0
PCI: Fixing up bridge
PCI: Fixing up bus 1
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Journalled Block Device driver loaded
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
NTFS driver v1.1.22 [Flags: R/O]
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0xb8000300 (irq = 3) is a 16550A
ttyS01 at 0xb8000400 (irq = 0) is a 16550A
loop: loaded (max 8 devices)
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
MPPE/MPPC encryption/compression module registered
Amd/Fujitsu Extended Query Table v1.1 at 0x0040
number of CFI chips: 1
Flash device: 0x400000 at 0x1c000000
Physically mapped flash: squashfs filesystem found at block 936
Creating 5 MTD partitions on "Physically mapped flash":
0x00000000-0x00040000 : "pmon"
0x00040000-0x003e0000 : "linux"
0x000ea190-0x003e0000 : "rootfs"
0x003f0000-0x00400000 : "nvram"
0x003e0000-0x003f0000 : "config"
sflash: found no supported devices
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 4096)
ip_conntrack version 2.1 (256 buckets, 2048 max) - 344 bytes per conntrack
ip_conntrack_pptp version 1.9 loaded
ip_nat_pptp version 1.5 loaded
ip_tables: (C) 2000-2002 Netfilter core team
ipt_time loading
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
IPv6 v0.8 for NET4.0
IPv6 over IPv4 tunneling driver
NET4: Ethernet Bridge 008 for NET4.0
802.1Q VLAN Support v1.7 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
FAT: bogus logical sector size 38400
FAT: bogus logical sector size 38400
NTFS: Unable to set blocksize 512.
VFS: Mounted root (squashfs filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 68k freed
Algorithmics/MIPS FPU Emulator v1.5
eth0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 1.3.2.0
robosw_attach_ocp: no Robo device on OCP bus
PCI: Enabling device 01:03.0 (0004 -> 0006)
eth1: Broadcom BCM4320 802.11 Wireless Controller 3.90.7.0
device eth1 entered promiscuous mode
eth0.1: No such device
device eth0 entered promiscuous mode
br0: port 2(eth0) entering learning state
br0: port 1(eth1) entering learning state
br0: port 2(eth0) entering forwarding state
br0: topology change detected, propagating
br0: port 1(eth1) entering forwarding state
br0: topology change detected, propagating
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb-uhci.c: $Revision: 1.275 $ time 20:26:03 Mar 3 2005
usb-uhci.c: High bandwidth mode enabled
PCI: Enabling device 01:02.0 (0000 -> 0001)
usb-uhci.c: USB UHCI at I/O 0x100, IRQ 2
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
PCI: Enabling device 01:02.1 (0000 -> 0001)
usb-uhci.c: USB UHCI at I/O 0x120, IRQ 2
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 2
hub.c: USB hub found
hub.c: 2 ports detected
usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
PCI: Enabling device 01:02.2 (0000 -> 0002)
ehci_hcd 01:02.2: PCI device 1106:3104
ehci_hcd 01:02.2: irq 2, pci mem c00af000
usb.c: new USB bus registered, assigned bus number 3
PCI: 01:02.2 PCI cache line size set incorrectly (0 bytes) by BIOS/FW, correcting to 32
ehci_hcd 01:02.2: USB 2.0 enabled, EHCI 1.00, driver 2003-Dec-29/2.4
hub.c: USB hub found
hub.c: 4 ports detected
usb.c: registered new driver usblp
printer.c: v0.13: USB Printer Device Class driver
usb.c: registered new driver audio
audio.c: v1.0.0:USB Audio Class driver
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
PCI devices found:
Class 0501: PCI device 14e4:0800 (rev 1).
Class 0200: PCI device 14e4:4713 (rev 1).
Class 1000: PCI device 14e4:4718 (rev 1).
Class 0c03: PCI device 14e4:4715 (rev 1).
Class 0604: PCI device 14e4:0804 (rev 1).
Class 0b30: PCI device 14e4:0816 (rev 1).
Class 0500: PCI device 14e4:080f (rev 1).
Class 0600: PCI device 14e4:5365 (rev 0).
Class 0c03: PCI device 1106:3038 (rev 97).
Class 0c03: PCI device 1106:3038 (rev 97).
Class 0c03: PCI device 1106:3104 (rev 99).
Class 0280: PCI device 14e4:4320 (rev 3).
echo for PaN ::: &&&PaN
Last edited by rwhitby; 13-04-2005 at 15:25.. |
|
#3
|
|||
|
|||
|
Hi,
I was wondering if you manage to send output to your serial port. There is another thread about adding USB serial ports and all people I heard (including myself) trying to actually use the port found out that the wl500 reboots after sending a few characters to that port. Maybe you run into problems just like us actually using the port. Unfortunately I do not know of any fixes for this problem. Regards Peter |
|
#4
|
|||
|
|||
|
Quote:
-- Rod Last edited by rwhitby; 13-04-2005 at 15:24.. |
|
#5
|
|||
|
|||
|
It took me a few seconds to understand the config. Related to palbeda's remark, this set-up is the other way around. Where palbeda connected a serial<->USB to the USB port of the Asus, in this set-up you connect the serial of the asus to the USB of e.g. a PC. Therefore, no max232 voltage convertor is needed. On the other hand, for home automation applications, a native serial port on the ASUS is to be prefered.
|
|
#6
|
|||
|
|||
|
Quote:
-- Rod |
|
#7
|
|||
|
|||
|
Quote:
|
|
#8
|
|||
|
|||
|
Serial port config
I have a 500gx running 1.9.2.7-5a. Before opening the case and possible break warranty I wanted to check how the internal serials are controlled.
I see the following: Code:
[admin@wl500gx root]$ more /proc/tty/driver/serial serinfo:1.0 driver:5.05c revision:2001-07-08 0: uart:16550A port:B8000300 irq:3 baud:115740 tx:630 rx:0 RTS|DTR 1: uart:16550A port:B8000400 irq:0 tx:0 rx:0 CTS|DSR|CD trying to set baud rate using busybox stty applet results in the following: Code:
[admin@wl500gx harddisk]$ ./busybox stty 9600 < /dev/tts/0 [admin@wl500gx harddisk]$ more /proc/tty/driver/serial serinfo:1.0 driver:5.05c revision:2001-07-08 0: uart:16550A port:B8000300 irq:3 baud:9615 tx:630 rx:0 RTS|DTR 1: uart:16550A port:B8000400 irq:0 tx:0 rx:0 CTS|DSR|CD Code:
before 0: uart:16550A port:B8000300 irq:3 baud:9615 tx:630 rx:0 RTS|DTR after echo "1234567890" > /dev/tts/0 it reads: 0: uart:16550A port:B8000300 irq:3 baud:9615 tx:642 rx:0 RTS|DTR Stty changes can also be made to second port; however, echoing to the second port /dev/tts/1 results in a full hang-up of the system. Need to power cycle. Does anyone has experimence with sending/receiving messages through both the serials from the shell (thus not as default serial terminal at boot-up as is shown earlier in this thread)? Another question is about the logical levels of this interface. Is it based on 3.3V or normal TTL 5V signals? In other words, can I connect a normal MAX232 for the signal conversion between RS-232 and the uart ports of the WL500G? Last edited by sodb; 22-05-2005 at 09:12.. |
|
#9
|
|||
|
|||
|
How to disable pmon on serial port
I installed the MAX3232 on serial 0 (/dev/tts/0) and it worked immediately. I used a flat cable with a dual row connector and I was able, as suggested by Josephus, to hook the connector to the internal PCB connector without removing the middle 'guarantee' screw. I even could easely close the box again and lead the flat cable out of the side of the box.
While booting I see the same messages in serial console as shown earlier in this thread. For some experiments I want to disable the console mapped to serial0. I read that console is enable in firmware (1.9.2.7-cr5). Does anyone know how to disable the console or how to kill the proces driving the consoleso that the serial port can be freed for own applications? I see output appearing in the terminal session when I do an echo "Hello" > /dev/tts/0 . I can even reset the terminal baud rate using busybox stty 9600 < /dev/tts/0 and output characters on this baudrate. However, as soon as I type a character in the serial terminal, the terminal is reset back to the original speed of 115200 baud as shown below Code:
[admin@wl500gx harddisk]$ ./busybox stty 9600 < /dev/tts/0 [admin@wl500gx harddisk]$ ./busybox stty -a < /dev/tts/0 speed 9600 baud; rows 0; columns 0; intr = <undef>; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0; -parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon ixoff -iuclc -ixany -imaxbel opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke <type a Carriage Return in terminal session> [admin@wl500gx harddisk]$ ./busybox stty -a < /dev/tts/0 speed 115200 baud; rows 0; columns 0; intr = <undef>; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0; -parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon ixoff -iuclc -ixany -imaxbel opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke Last edited by sodb; 01-06-2005 at 23:02.. |
|
#10
|
|||
|
|||
|
Disable console
I recompiled kernel with the following change in kernel.config
Code:
CONFIG_CMDLINE="root=/dev/mtdblock2 noinitrd init=/linuxrc console=null" Still, accessing second port /dev/tts/1 causes hang-up of asus. |
|
#11
|
|||
|
|||
|
have you disabled flow control on the tts/1?
|
|
#12
|
|||
|
|||
|
It works!
Hey, thanks Oleg,
i just typed Code:
/tmp/harddisk/busybox stty -crtscts < /dev/tts/1 This is what I see when doing Code:
[admin@wl500gx root]$ more /proc/tty/driver/serial serinfo:1.0 driver:5.05c revision:2001-07-08 0: uart:16550A port:B8000300 irq:3 baud:9615 tx:7 rx:0 1: uart:16550A port:B8000400 irq:3 baud:115740 tx:49 rx:24 CTS|DSR|CD Currently, I am happy with two simulaneous serial ports on the wl500gx. |
|
#13
|
|||
|
|||
|
Can you check please both ports working well at the same time? If such, maybe the patching of the kernel with disabling IRQ masking at tts/1 when ttys/0 is a console port isn't a bad idea.
I'll try o check 18xx GPL sources located on utilities CD, if Oleg didn't do so yet ![]() |
|
#14
|
|||
|
|||
|
On two sessions I started cat /dev/tts/0 and cat /dev/tts/1 respectively. Because I only have a single serial port on my laptop I can only test alternatevely. That works.
Then I did a test where I connected Rx0 to Tx1 and Rx1 to Tx0. Then 4 sessions, 2 as described before, other two with echo commands to the respective ports. On echo from /tts/1 to /tts/0 works. When I issue an echo the other way around, the cat sessions keep scrolling and the echo sessions take a long time to finish. I can CRTL-C all the sessions. I think there is a conflict with the same IRQ3 for both lines. Is there another free IRQ available and could that be used for serial /tts/1? |
|
#14
|
|||
|
|||
|
#15
|
|||
|
|||
|
Quote:
|
![]() |
| Tags |
| com port, serial port, uart |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Make an expansion board with a serial port(s) for WL-500b/g | Technik | WL-500g/WL-500gx Tutorials | 74 | 13-05-2009 17:50 |
| Use an USB-serial port converter | Technik | WL-500g/WL-500gx Tutorials | 11 | 09-10-2007 10:27 |
| USB serial port support.... | ChangKyu Beck | WL-500g Custom Development | 1 | 17-05-2005 10:52 |
| Add just 2 Pins of Serial Port for 240V Relais | Brunni | WL-500g Custom Development | 4 | 08-03-2005 21:39 |
| Serial port for WL-500g | sveasoft | WL-500g Q&A | 1 | 05-04-2004 15:44 |