Routers with serial port inside WAN port

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page 1, 2, 3, 4, 5, 6  Next
Author Message
Eko
DD-WRT Developer/Maintainer


Joined: 07 Jun 2006
Posts: 5771

PostPosted: Sat Dec 19, 2009 6:26    Post subject: Routers with serial port inside WAN port Reply with quote
On some latest Linksys routers it is not necessary to open them (and loose warranty) to access serial console. It is inside WAN port.
As far as I know these routers have it:
- WRT150N v1.1
- WRT300N v1.1
- WRT310N v1
- WRT320N
- WRT610N v1
- WRT610N v2

If you know any other or you know of good way to make a connector for it, please tell us.



serial_in_wan.JPG
 Description:
 Filesize:  201.04 KB
 Viewed:  119047 Time(s)

serial_in_wan.JPG


Sponsor
GeeTek
DD-WRT Guru


Joined: 06 Jun 2006
Posts: 3763
Location: I'm the one on the plate.

PostPosted: Sat Dec 19, 2009 6:55    Post subject: Reply with quote
Seems to be called a "Debug Adaptor". Does not seem to be available for sale. Socal87 and Barryware are also looking for it.

http://forums.linksysbycisco.com/linksys/board/message?board.id=Wireless_Routers&thread.id=145501

https://forum.openwrt.org/viewtopic.php?id=16733&p=5

http://landley.net/notes.html
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Sat Dec 19, 2009 9:38    Post subject: Reply with quote
I was going to make one so took a RJ-45 connector, removed the lock piece and grinded the surface flat.

Remember the cardedge connector used for hard disks and floppy drives in the past?
I intended to take out 4 pins from one of them, cut the pins so they fit on the top of the RJ-45 , solder wires to them and then melt them into the the plastic or superglue them.

The project abruptly went to sleep when I realised that I don't have any of those cardedge connectors and no computer shops around here carried them.

_________________
Kernel panic: Aiee, killing interrupt handler!
Eko
DD-WRT Developer/Maintainer


Joined: 07 Jun 2006
Posts: 5771

PostPosted: Sat Dec 19, 2009 10:02    Post subject: Reply with quote
I simply had to do it NOW...

take piece of ribbon cable (old HD), strip it as on picture, bend, put piece of cable insulation bellow, straighten, apply some solder... grind...

You put it in to the red line, and simply put WAN cable in to hold it in place.

Don't do it at home, kids.... Smile



cab1.jpg
 Description:
 Filesize:  29.69 KB
 Viewed:  119024 Time(s)

cab1.jpg



cab2.jpg
 Description:
 Filesize:  33.97 KB
 Viewed:  119024 Time(s)

cab2.jpg


Eko
DD-WRT Developer/Maintainer


Joined: 07 Jun 2006
Posts: 5771

PostPosted: Sat Dec 19, 2009 10:03    Post subject: Reply with quote
Ah.. I wanted red marked cable to be +3.3, but I did it in reverse (mirror)... so be careful....
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Sat Dec 19, 2009 12:00    Post subject: Reply with quote
Very good Eko! and so easy to make.
_________________
Kernel panic: Aiee, killing interrupt handler!
socal87
DD-WRT Guru


Joined: 30 Jun 2009
Posts: 944
Location: Here

PostPosted: Sat Apr 10, 2010 16:01    Post subject: Reply with quote
I think I may have posted this in another thread...but I saw this one come back up so I wanted to reconfirm what I found out about 2 months ago.

Attached are pictures of the device...Landley says they had to use an Ethernet plug with the clip broken off to keep it in the port, and even then it was a pain in the ass.

Here's some text he included...probably elementary to a few of you guys.

--- Re-flashing a linksys router using the CFE bootloader.

-- What is the CFE bootloader?

CFE is Broadcom's "Common Firmware Environment". It's the bootloader installed
at the start of the flash on most Linksys routers, and it's the program that
takes control when the device is first turned on.

CFE website, including source code:
http://www.broadcom.com/products/communications_processors_downloads.php

CFE documentation:
http://www.broadcom.com/docs/SiByte/README-1.4.2.txt

Linksys' image flashing procedures do not replace this bootloader. If the
web GUI isn't coming up after a firmware upgrade, we can use the bootloader
to install a known working firmware image and thus "unbrick" the device.

-- What do I need?

You will need:
linksys router.
serial adapter for your router model.
ethernet cable.
firmware image file.
Laptop/desktop system with:
working serial and ethernet ports.
firmware image file (from linksys.com)
serial term program (minicom)
tftp file transfer program (tftp)

You may need:
another ethernet cable
serial passthrough cable
serial gender changer

-- What do I do?

1) Set up the serial console.

A) Attach your serial adapter to your linksys router.

On the WRT610n, the serial adapter plugs into the bottom of the internet
uplink port, pins facing downwards, and is held in place by the ethernet
cable. (You may need a "broken" ethernet cable with the latching tab
removed to fit both in. If the result falls out too easily, masking tape
is easier to remove afterwards than duct tape.)

B) Connect your laptop to the linksys adapter's serial port.

USB->serial adapters are available for laptops without serial ports.
If you need a serial extension cable use a passthrough (not null-modem)
cable. You may need a serial gender changer to make the physical
connection.

C) Run a terminal program on your laptop configured for "115k 8n1"
operation.

This program will talk to the serial console on the router.

D) Power cycle the router and see if you get any boot messages.

If the bootloader has been overwritten, the device really is bricked and
you need a JTAG to restore it, but this is unlikely. None of Linksys'
image update procedures overwrite the bootloader.

2) Get a "CFE>" prompt.

Power cycle the device, and immediately send ctrl-c a few times over the
serial connection. This should interrupt the bootloader and give you a
"CFE>" prompt.

Type "help" at this prompt and hit ENTER for a list of available
commands.

3) Set up networking.

A) Connect your laptop to one of the router's switch ports with a standard
CAT 5 ethernet patch cable.

Don't connect your laptop to the "internet" port. You may need a cat5
cable in that port to hold the serial adapter in place, but that cable
isn't the one you connect to your laptop. (This is why you may need
a second ethernet cable.)

B) On the serial console, type "printenv" and hit ENTER. The variable
NET_IPADDR should default to "192.168.1.1".

C) Set your laptop's internet address for the ethernet adapter to
"192.168.1.2". For example, on Linux you may need to execute the
following command (as root):

ifconfig eth0 192.168.1.2

4) Send and save the firmware image file from your laptop to the router.

This is a three part process:

- The laptop must send the image file through the network via TFTP.
- CFE must read the image from the network into the router's memory.
- CFE must burn the image from the router's memory into flash.

The first two of these steps must occur near-simultaneously, TFTP tends
to have fairly short timeouts, so we set up the commands in two separate
windows and press "enter" in each window.

A) On your laptop, prepare a binary tftp file transfer command to send the
firmware image to 192.168.1.1, but don't press "enter" yet. For
example, to send WRT610n firmware from Ubuntu:

(echo binary ; echo put FW_WRT610N_*_code.bin) | tftp 192.168.1.1

B) In the terminal console window, type the CFE receive command for
the firmware image, but don't press "enter" yet:

load -tftp -raw -addr=0x807a60b0 -max=0x800000 :

(Don't forget the trailing colon, it's important.)

C) Press ENTER in the tftp window and the terminal console within 5
seconds of each other.

You should get a response like so:

CMD: [load -tftp -raw -addr=0x807a60b0 -max=0x800000 :]
Loader:raw Filesys:tftp Dev:eth0 File:: Options:(null)
Loading: .. 7427072 bytes read
Entry at 0x807a60b0
*** command status = 0
CFE>

If it instead says timeout, set up the commands and try again.

D) Confirm the firmware file's size.

The "bytes read" value above should match the length of the firmware
file on the laptop. If it doesn't, then you probably did an ascii
transfer instead of binary, which won't work.

F) Tell CFE to burn the image from memory into the flash.

In the serial terminal window, at the "CFE>" prompt, type the following
flash command, using the "size" value of _your_ firmware, which is
probably NOT the one shown here. (Repeat, for -size use the "bytes
read" value above.)

flash -ctheader -mem -size=0x72312b 0x807a60b0 flash1.trx

This will take several seconds.

5) Power cycle the router.

Unplug it, plug it back in. If all went well, you should see lots of
Linux kernel boto messages scroll by as it comes up running the new
firmware image.

When a standard Linksys firmware image has finished booting, if you hit
ENTER on the serial console you should get a root shell prompt.



photo.jpg
 Description:
 Filesize:  131.13 KB
 Viewed:  118126 Time(s)

photo.jpg



photo2.jpg
 Description:
 Filesize:  141.3 KB
 Viewed:  118126 Time(s)

photo2.jpg



_________________
Click here for Eko beta
Click here for Brainslayer beta

>>>PEACOCK THREAD!<<<

I do NOT offer personal assistance.
Please do not PM me for help.

ezln
DD-WRT Novice


Joined: 03 Apr 2010
Posts: 8

PostPosted: Thu Apr 15, 2010 19:45    Post subject: Reply with quote
socal87, did you make that PCB that you posted pics of? Can you post some info on how/where you got that?
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Thu Apr 15, 2010 20:29    Post subject: Reply with quote
ezln wrote:
socal87, did you make that PCB that you posted pics of? Can you post some info on how/where you got that?

It's the device that a Cisco employee (contractor iirc?) received to use the serial connection in the WAN port. They are not publicly available.

I've added these models to the list:
WRT150N v1.1
WRT300N v1.1

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Sat May 29, 2010 4:34    Post subject: Reply with quote
I like Eko's solution better than a PCB, it's cheap, easy to do, and won't break.
_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
local.bin
DD-WRT Novice


Joined: 04 Feb 2010
Posts: 10

PostPosted: Sun May 30, 2010 23:04    Post subject: Reply with quote
With Eko's cable, do we need any conversion or can we go straight to a serial port connector?

Thanks
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Mon May 31, 2010 1:01    Post subject: Reply with quote
local.bin wrote:
With Eko's cable, do we need any conversion or can we go straight to a serial port connector?

Thanks

It's TTL so you need a level shifter. You can get a cheap CA-42 or DKU-5 USB phone cable to do it.

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
WithinRafael
DD-WRT Novice


Joined: 31 May 2010
Posts: 6

PostPosted: Sat Jun 05, 2010 4:15    Post subject: Reply with quote
Eko wrote:
I simply had to do it NOW...

take piece of ribbon cable (old HD), strip it as on picture, bend, put piece of cable insulation bellow, straighten, apply some solder... grind...

You put it in to the red line, and simply put WAN cable in to hold it in place.

Don't do it at home, kids.... Smile


How'd you strip that cable so nicely? This is proving to be quite a pain in the ass :(

EDIT: Did quite nicely with a nail file Smile
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Sat Jun 05, 2010 20:55    Post subject: Reply with quote
WithinRafael wrote:
How'd you strip that cable so nicely? This is proving to be quite a pain in the ass :(

EDIT: Did quite nicely with a nail file Smile

For future reference, you can strip cables nicely by laying a thin knife flat against the cable and gently pressing it into the jacket while you run it down the cable.
WithinRafael wrote:
I'm getting just garbage on the E3000's Rx, tried various configurations of the line. I verified the cable is working by tying Rx/Tx together.

Would this be a symptom of the CFE being corrupted? Does DD-WRT overwrite this on flash (from stock firmware upload interface)?

Like BW said, what are you using as a cable and have you figured out what the other wires are? You need to be sure to connect the cable's TX to the router's RX and vice versa. Connect the ground to ground and Vcc to Vcc. I spazzed for a day when I first did it and had my ground going to Vcc and it wasn't until I noticed an occasional spark sound that I finally realized I had it wrong.

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
WithinRafael
DD-WRT Novice


Joined: 31 May 2010
Posts: 6

PostPosted: Sat Jun 05, 2010 21:03    Post subject: Reply with quote
Thanks for the cable tip. This CA-42 cable simply has Rx, Tx, and Gnd. I should be able to simply touch my Rx w/ its Tx and see data... right? (It works in Avatar.) As the chip is receiving power from the USB port, I ignored the router's 3.3v.
Goto page 1, 2, 3, 4, 5, 6  Next Display posts from previous:    Page 1 of 6
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum