OpenWrt Forum Archive

Topic: Cannot get 2nd serial port working (WRT54GL / AD233BK)

The content of this topic has been archived on 31 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I followed this guide and am using the same AD233BK board (albeit a newer version):
http://www.rwhitby.net/projects/wrt54gs/

Hardware:
Everything seems to be OK as far as wiring is concerned.  I had initially reversed the tx and rx, but I corrected it.  I have taken an ohm meter to almost the entire schematic with relation to the 2nd port.  The 1st port (serial WRT console) works flawlessly.

Software:
I am using minicom -o (no modem commands).  I have it setup to use /dev/tts/1 at 9600 8N1 with no flow control (have also tried it with software flow control).  Running the latest Kamikaze.

Remote device:
Cisco 2514 console port set at 9600 bps.
The Cisco router works fine connected to my PC serial port.
I don't have anything else to test with besides the router, but I tried connecting both serial ports together with a null modem cable.  I used stty -F /dev/tts/1 speed 115200 to set it to 115200 temporarily and still had no luck.

The odd part is, if I connect the rollover cable to my serial port, I no longer get output when I type in minicom, whereas if I unplug it, I seem to get a local echo (characters type but no line returns).

This is a last resort as I feel like I've checked everything.  If anyone else has seen this problem and can give any ideas, then by all means.

Thanks in advance,
JR

(Last edited by sarcaz on 3 Oct 2007, 05:30)

Did you installed the setserial package and used it to configure the second serial port?

I also followed Rod Whitby's Howto and managed to get the first serial port (/dev/tts/0) working but have so far failed to get the second (/dev/tts/1) working. I just noticed the following kernel messages from dmesg:

Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI ed
ttyS00 at 0xb8000300 (irq = 3) is a 16550A                                      
ttyS01 at 0xb8000400 (irq = 0) is a 16550A

This is odd, since /proc/interrupts says nothing about interrupt 0

           CPU0                                                                 
  3:       1738            MIPS  gpio, serial                                   
  4:          0            MIPS  eth1                                           
  5:       1086            MIPS  eth0                                           
  7:     217144            MIPS  timer                                          
                                                                                
ERR:          0

So, what does it mean that ttyS01 (which I assume is the same as /dev/tts/1) has an irq of 0? Does it mean that it's disabled or that the irq needs to be configured manually? I have two routers, a WRT54G v2.2 and a WRT54GL v1.1, and both have the same messages about serial ports, though I've only modified the WRT54G so far.

Thanks for the replies.  Both of my serial ports are using IRQ 3 by default on startup.  Any ideas?

Fixed - wiring problem - A 4-wire cable I was using to connect JP1 and JP2 wires to the cable header had a crossed wire - go figure...
Thanks all!

sarcaz wrote:

Fixed - wiring problem - A 4-wire cable I was using to connect JP1 and JP2 wires to the cable header had a crossed wire - go figure...
Thanks all!

By "crossed wire" do you mean it was shorted? I discovered that Rod Whitby's Howto seems to reverse the receive and transmit wires for the second port. I looked up the specs for the chip I received in the kit (a Sipex SP233AEP) and wired the RX and TX lines for the second port accordingly. Now, both of my ports work. There's great potential for confusion relating to the DTE/DCE model, since it's often not clear which a device should be. The chip doesn't really care, but just has two drivers in each direction.

I also discovered that while the kernel reports that ttyS00 is using irq 3 and ttyS01 irq 0, they should both be using irq 3. Until I made that change, the second port (ttyS01 or /dev/tts/1) would only reliably work at about 9600 bps. The OpenWRT setserial package has an initscript to set this, but I didn't reboot after installing it, so I didn't initially realize this.

The discussion might have continued from here.