D-Link DIR-120

Cheap and simple router with printer support. No wireless.

Image of DIR-120

A not so wild guess is that this device is a DI-524UP without wireless. During boot it mentions DI-524UP and the wireless commands are commented.

Hardware Highlights

CPU Ram Flash Network USB Serial JTag
Realtek RTL8650B SoC@180MHz 16MB 4MB 4 + 1 Yes Yes Probably

Note: Memory is clocked at 130MHz. J1 is most likley the JTag. Multiple lanes going directly, through resistors, into the CPU.

Installation

Currently not supported by OpenWrt.

Hardware

Info

Architecture: MIPS
Vendor: Realtek
Bootloader: ???
System-On-Chip: Realtek RTL8650B
CPU Speed: 180 Mhz
Flash-chip: SPANSION S29AL032D90TFI04
Flash size: 4 MiB
SDRAM-Chip: Hynix HY57V281620FTP-H
RAM: 16 MiB
Wireless: None
Ethernet: Switch in CPU
USB: Yes, v1.1
Serial: Yes
JTAG: Yes

Opening the case

Note: This will void your warranty!

  • The cover is mount by two screws under the two rubber feet at the back.
  • There are two screws holding the PCB to the bottom cover.

Main PCB

Serial

38400 8n1

JP1

  • RX
  • Missing
  • 3.3V?
  • GND
  • TX

I used a simple rs232 shifter which worked perfectly.

JTAG

Not tested, but from the looks of it, it should be possible.

Buttons

There is one reset button.

Additional Information

Boot log

!@#$^&*()-+|abcdefghijklmnopqrstuvwxyz. 00.01.19(uClinux) (Aug 31 2006 19:22:07) System Clock Rate: 180MHz, Memory Clock Rate: 130MHz Detected flash size: total 4MB. SDRAM MCR: E2A01000 SDRAM size: 16MB Press 'w' for alpha's web upgrade. Press 'r' to update run image, or 'a' to change config, or 'l' to update loader, or 'g' to load run image without updating Flash, or '2' to enter L2 switch mode(50A), or '3' to enter L2 switch mode(50B) … ForceRunLoader=0 … Loading runtime image … Imag Start Address =0xbe030000 Find a 7zip self-decompressed kernel image, Just GO! Powered by Realtek RTL8650B SoC, rev 1 CPU revision is: 0000ff00 Init MMU (16 entries) Primary instruction cache 0kB, linesize 0 bytes. Primary data cache 0kB, linesize 0 bytes. Linux version 2.4.26-uc0 (root@redhat9) (gcc version 3.3.3) #1 Thu Jun 7 21:02:11 CST 2007 Determined physical RAM map: memory: 01000000 @ 00000000 (usable) NOFS reserved @ 0x80332ba0 On node 0 totalpages: 4096 zone(0): 4096 pages. zone(1): 0 pages. zone(2): 0 pages. Kernel command line: root=/dev/mtdblock3 rootfstype=squashfs IRR(0)=c0000000 Calibrating delay loop… 178.99 BogoMIPS Memory: 12924k/16384k available (2269k kernel code, 3460k reserved, 104k data, 88k init, 0k highmem) Dentry cache hash table entries: 2048 (order: 2, 16384 bytes) Inode cache hash table entries: 1024 (order: 1, 8192 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: 4096 (order: 2, 16384 bytes) Checking for 'wait' instruction… unavailable. POSIX conformance testing by UNIFIX NEW PCI Driver…isLinuxCompliantEndianMode=False(Big Endian) [PCI] Reset Bridge ….. Finish! No PCI device exist!! Linux NET4.0 for Linux 2.4 Based upon Swansea University Computer Society NET3.039 Initializing RT netlink socket Starting kswapd devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au) devfs: boot_options: 0x1 pty: 256 Unix98 ptys configured Serial driver version 5.05c (2001-07-08) with MANY_PORTS SERIAL_PCI enabled ttyS00 at 0xbd011100 (irq = 4) is a 16550A ttyS01 at 0xbd011000 (irq = 3) is a 16550A Probing RTL8651 home gateway controller… Initialize RTL865x ASIC and driver chip name: 8650B, chip revid: 1 Initialize mbuf… creating default 2 interfaces…eth0 IRR(6)=c0040000 eth1 …OK »>now is rome 3.4 running …….. DQoS module initialization success! PPP generic driver version 2.4.2 PPP BSD Compression module registered Amd/Fujitsu Extended Query Table v1.1 at 0x0040 number of CFI chips: 1 cfi_cmdset_0002: Disabling fast programming due to code brokenness. Looking for mtd device mtd1: Found a mtd1 image (0x20000), with size (0x10000). Looking for mtd device mtd2: Found a mtd2 image (0x30000), with size (0x9cd2c). Looking for mtd device mtd3: Found a mtd3 image (0xccd2c), with size (0x140000). Creating 4 MTD partitions on "Physically mapped flash": 0x00000000-0x00020000 : "ldr" 0x00020000-0x00030000 : "alphafs" 0x00030000-0x000ccd2c : "kernel" 0x000ccd2c-0x0020cd2c : "squashfs" usb.c: registered new driver usbdevfs usb.c: registered new driver hub USB configurate change f0000001 host/usb-ohci-rtl865x.c: USB OHCI at membase 0xbd000000, IRQ 1 host/usb-ohci-rtl865x.c: usb- usb.c: new USB bus registered, assigned bus number 1 IRR(1)=f0040000 write minterval 27782edf swap df2e7827 read fminterval 27782edf swap df2e7827 usb dev vender id = 0 usb dev product id = 0 hub.c: USB hub found hub.c: 1 port detected usb.c: registered new driver usblp printer.c: v0.13: USB Printer Device Class driver NET4: Linux TCP/IP 1.0 for NET4.0 IP Protocols: ICMP, UDP, TCP, IGMP IP: routing cache hash table of 512 buckets, 4Kbytes TCP: Hash tables configured (established 1024 bind 2048) GRE over IPv4 tunneling driver NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. VFS: Mounted root (squashfs filesystem) readonly. Mounted devfs on /dev Freeing unused kernel memory: 88k freed IRR(3)=f3040000 initial console created on /dev/tts/1 Shell invoked to run file: /etc/rc Command: #### Stanley dynamic mknode #### Command: mknod /dev/wlchr c 13 0 Command: mknod /dev/ptyp0 c 2 0 Command: mknod /dev/ptyp1 c 2 1 Command: mknod /dev/ptyp2 c 2 2 Command: mknod /dev/ptyp3 c 2 3 Command: mknod /dev/ptyp4 c 2 4 Command: mknod /dev/ptyp5 c 2 5 Command: mknod /dev/ptyp6 c 2 6 Command: mknod /dev/ptyp7 c 2 7 Command: mknod /dev/ptyp8 c 2 8 Command: mknod /dev/ptyp9 c 2 9 Command: mknod /dev/ptypa c 2 10 Command: mknod /dev/ptypb c 2 11 Command: mknod /dev/ptypc c 2 12 Command: mknod /dev/ptypd c 2 13 Command: mknod /dev/ptype c 2 14 Command: mknod /dev/ptypf c 2 15 Command: mknod /dev/tty0 c 4 0 Command: mknod /dev/tty1 c 4 1 Command: mknod /dev/tty2 c 4 2 Command: mknod /dev/tty3 c 4 3 Command: mknod /dev/tty4 c 4 4 Command: mknod /dev/tty5 c 4 5 Command: mknod /dev/ttyS0 c 4 64 Command: mknod /dev/ttyS1 c 4 65 Command: mknod /dev/ttyp0 c 3 0 Command: mknod /dev/ttyp1 c 3 1 Command: mknod /dev/ttyp2 c 3 2 Command: mknod /dev/ttyp3 c 3 3 Command: mknod /dev/ttyp4 c 3 4 Command: mknod /dev/ttyp5 c 3 5 Command: mknod /dev/ttyp6 c 3 6 Command: mknod /dev/ttyp7 c 3 7 Command: mknod /dev/ttyp8 c 3 8 Command: mknod /dev/ttyp9 c 3 9 Command: mknod /dev/ttypa c 3 10 Command: mknod /dev/ttypb c 3 11 Command: mknod /dev/ttypc c 3 12 Command: mknod /dev/ttypd c 3 13 Command: mknod /dev/ttype c 3 14 Command: mknod /dev/ttypf c 3 15 Command: mknod /dev/video0 c 81 0 Command: mknod /dev/usblp0 c 180 0 Command: mknod /dev/node c 254 0 Command: mknod /dev/node1 c 254 1 Command: #### end dynamic mknode #### Command: mount -t proc proc /proc Command: mount -t ramfs ramfs /var Command: mount -t usbdevfs none /proc/bus/usb Command: mkdir /var/tmp Command: mkdir /var/ppp/ Command: mkdir /var/log Command: mkdir /var/run Command: mkdir /var/lock Command: mkdir /var/flash Command: mkdir /var/usbmnt Command: mkdir /var/webcam Command: mkdir /var/spool Command: mkdir /var/spool/lpd Command: mkdir /var/spool/lpd/lp0 Command: mkdir /var/spool/lpd/lp1 Command: mkdir /var/spool/lpd/lp2 Command: mkdir /var/spool/lpd/lp3 Command: # add hostname for lprng. Command: # /etc/hosts also need have same name. Command: hostname alpharg Command: #lpd Command: #iwcontrol is required for RTL8185 Wireless driver Command: #iwcontrol auth & Command: Command: #busybox insmod /lib/modules/2.4.26-uc0/kernel/drivers/usb/quickcam.o Command: #++++ Stanley add for Di-524up english and chinese 2005.10.18 Command: ln -s /webpage/en /var/www Command: #—- Stanley Command: /bin/webs -u root -d /www -i /var/run/thttpd.pid & [14] Command: Command: #ifconfig wlan0 up promisc Command: Command: Command: Command: Execution Finished, Exiting Sash command shell (version 1.1.1) /> System initializing…Check the crc=0x6c1f2172,file_des→chksum=0x6c1f2172! Config info: table total size[54380|0xd46c] === max[196608|0x30000]! rtl8651_user_pid set to 14 WAN/LAN, Rx shift=10002 ================runDNSProxy================== session 0 do not have dns server ip… [21] cfg wan to dhcp client … Set IGMP Default Upstream interface (eth0) … SUCCESS!! [27] info, client (v0.9.9-pre) started [29] url filter default set to accept PPPoE Passthru disabled. Drop Unknown PPPoE PADT disabled. IPv6 Passthru disabled. IPX Passthru disabled. NETBIOS Passthru disabled. WebRemoteAccessCset drule=0 onfig signature error !! signature error !! /www/Status/st_blocked.htm: No such file or directory [32] [34] get lan ip c0a80001 enable 1 my host is =routers.dlink.com=buffer from user space=QoSEnable=0 DetectWanBand=0 ! Find a pair, argumenit=QoSEnable, value=0!pBuf=DetectWanBand=0 ! Find a pair, argumenit=DetectWanBand, value=0!pBuf=! tmpUpBW=0, tmpRsBW=0! get parameter: DQoS_enable= 0! get parameter: upLinkBandWidth=0 kbits! get parameter: VoIP reserved bandwidth=0 kbits! the printer cmdline=lpd -I eth1 -Z 1 -U 1 &! interface: eth1 config : /var/neap.conf get vendor = ALPHA get model = DIR-120 get version = v0.5.0 get secret = eth1: ip:192.168.0.1, mask:255.255.255.0, mac 00:22:b0:8a:96:e2 eth1 (ip) = 192.168.0.1, (netmask) = 255.255.255.0, adapter index 3 adapter hardware address 00:22:b0:8a:96:e2 Into Server listen!! [36] [38] Stanley: /bin/alpha_reg -a reg -p 80 -t 2 -n "DIR-120-HTTP" nothing to monitor [46] info, server (v0.9.9-pre) started error, max_leases value (254) not sane, setting to 100 instead error, Unable to open /var/udhcpd.leases for reading auto ,en ,french ,german ,italian ,spanish ,dir = /www mDNSResponderPosix: Starting in foreground mode, PID 42 dhcpc client deconfig ifCfgParam[0].ipAddr: 0.0.0.0 ifCfgParam[0].ipMask: 0.0.0.0 ifCfgParam[0].gwAddr: 0.0.0.0 ifCfgParam[0].dnsPrimaryAddr: 0.0.0.0 rtl8651_delNaptMapping: ret -6 rtl8651_delRoute(default): ret -3 rtl8651_delIpIntf: ret -2710 target 239.0.0.0 SIOCDELRT: No such process shiang(36): Set_lpd_pid(5) shiang_lpd:s=515, Lpd_listen_port_DYN=(null), Lpd_port_DYN=515 shiang_Ipp:s=off, Ipp_listen_port_DYN=off shiang_Unix:s=/var/run/lprng, Unix_socket_path_DYN=/var/run/lprng Registered interface eth1 mDNSResponderPosix: Registered service 0, name 'DIR-120-HTTP', type '_http._tcp', port 80 50: the pid_str=50 pofd 17 17! 50: jobQueue_Init success! 50: Into printer_Hotplug_Action()! 50: After reset pDev_Queue, we check each entries! 50: pclose! 50: create socket success! 50:The unix socket file path=/var/run/pof.d p9100d daemon server in .. after fork ..

CPU info

/> cat /proc/cpuinfo system type : Philips Nino processor : 0 cpu model : R3000 V0.0 BogoMIPS : 178.99 wait instruction : no microsecond timers : no tlb_entries : 16 extra interrupt vector : no hardware watchpoint : no VCED exceptions : not available VCEI exceptions : not available

Interface Configuration

/> ifconfig eth0 Link encap:Ethernet HWaddr 00:22:B0:8A:96:E3 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 iB) TX bytes:0 (0.0 iB) Interrupt:6 eth1 Link encap:Ethernet HWaddr 00:22:B0:8A:96:E2 inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 iB) TX bytes:0 (0.0 iB) Interrupt:6 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MULTICAST MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 iB) TX bytes:0 (0.0 iB)

Processes

PID PORT STAT SIZE SHARED %CPU COMMAND 1 S 1100K 0K 4.5 /sbin/init uart1 2 S 0K 0K 0.0 keventd 3 S 0K 0K 0.0 ksoftirqd_CPU0 4 S 0K 0K 0.0 kswapd 5 S 0K 0K 0.0 bdflush 6 S 0K 0K 0.0 kupdated 9 S 0K 0K 0.1 mtdblockd 10 S 0K 0K 0.0 khubd 14 S 18340K 0K 3.3 /bin/webs -u root -d /www -i /var/run/thttpd.pid 15 S0 R 828K 0K 0.1 /bin/sh 21 S 980K 0K 0.3 /bin/dnrd -c off 23 S 1676K 0K 0.0 /bin/udhcpc -HDIR-120 27 S 836K 0K 0.3 /bin/syslogd -L -F sysact -F attack -F drop -F notice 29 S 1676K 0K 0.0 /bin/klogd 32 S 852K 0K 0.2 neaps -i eth1 -c /var/neap.conf 38 S 808K 0K 0.2 usbmon 43 S 828K 0K 0.0 lld2d eth1 44 S 1096K 0K 1.1 mDNSResponderPosix -f /var/Bonjour.txt -v 2 46 S 1676K 0K 0.0 /bin/udhcpd 48 S 1580K 0K 0.0 /bin/telnetd -p 5457 50 S 1160K 0K 0.0 lpd -I eth1 -Z 1 -U 1 51 S 1160K 0K 0.0 lpd Waiting 56 S 768K 0K 0.0 rawlpd -i eth1 0

Back to top

toh/d-link/dir-120.txt · Last modified: 2010/04/05 14:05 (external edit)