Debug-port in router

Perhaps this article should be one of the first articles to make the router not as a black box with in- and outputs for us but as a fully-featured board on which base we can realize our ideas. Development board or starter kit – choose the name you like the most.

Let’s take to pieces the box and check the board. My dlink looks like this from the inside:

Actually, all the modern boards look to be the same. There are processor, RAM and flash memory. And of course it is obligatory on-board connector for debug console. Usually this connector is connected directly to the uart of the processor. This board is no exception, besides the router manufacturer saw fit to install it.

I think in some time the router manufacturers will connect the in- and output ports to the jack and other available interfaces that will make their application field wider.

For the connection to the uart we should use an adapter. It can be made by ourselves or can be bought from us. Let’s start for example the minicom on the speed of 115200 and switch on the power supply of the router. After connecting to the debug-port we can feel ourselves as a full master of this board.

Log of the downloading:


CFE version 1.0.37 for BCM947XX (32bit,SP,LE)
Build Date: Wed Mar 18 10:12:27 CST 2009 (leon@enzo)
Copyright (C) 2000,2001,2002,2003 Broadcom Corporation.

Initializing Arena
Initializing Devices.
Boot partition size = 262144(0x40000)
et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller
CPU type 0x29029: 240MHz
Total memory: 32768 KBytes

Total memory used by CFE: 0x80300000 - 0x803C0720 (788256)
Initialized Data: 0x80337730 - 0x8033AE50 (14112)
BSS Area: 0x8033AE50 - 0x8033C720 (6352)
Local Heap: 0x8033C720 - 0x803A0720 (409600)
Stack Area: 0x803A0720 - 0x803C0720 (131072)
Text (code) segment: 0x80300000 - 0x80337730 (227120)
Boot area (physical): 0x003C1000 - 0x00401000
Relocation Factor: I:00000000 - D:00000000

alpha bootcode ver 0.1.3
cmd = ifconfig eth0 -addr= -mask=
We disable the arp for self.
We disable the arp for self.
Device eth0: hwaddr 1C-BD-B9-34-2A-F9, ipaddr, mask
gateway not set, nameserver not set
cmd = go;
cmd = load -raw -addr=0x803c0720 -max=0x3a0000 :
Loader:raw Filesys:tftp Dev:eth0 File:: Options:(null)
Loading: Failed.
Could not load :: Timeout occured
Dest=80001000, source =803c0720, filename=flash1.trx
cmd = boot -raw -z -addr=0x80001000 -max=0x3a0000 flash0.os:
Loader:raw Filesys:raw Dev:flash0.os File: Options:(null)
Loading: entry point=80001000
.. 4136 bytes read
Entry at 0x80001000
Closing network.
Starting program at 0x80001000
Linux version (dima@dima-desktop) (gcc version 4.3.3 (GCC) ) #19 Sun Dec 5 17:42:53 MSK 2010
CPU revision is: 00029029 (Broadcom BCM3302)
ssb: Sonics Silicon Backplane found at address 0x18000000
Determined physical RAM map:
memory: 02000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
Normal 0x00000000 -> 0x00002000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0x00000000 -> 0x00002000
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200

Buy an adapter for the connecting to the debug-port from us: an adapter for the connecting to the debug-port: