D-LINK DIR-505

The discussion on the DIR-505 is in this forum post. OpenWRT has been flashed to version A1 + A2.

Supported Versions

Apparently so far there are three versions of the dlink 505: DIR-505 A1, DIR-505L A1, DIR-505L A2.

They differ a bit on the "outer" hardware (switches, power supply stability, plugs), but the main router hardware is the same for all versions. Since the main router hardware is the same for all versions, all of them work fine with Openwrt.

505L A1 = 505 + extra parts for voltage stability and the addition of a "Charge" mode on the mode switch, which allows for charging USB devices via the USB port on the unit.

505L A2 = 505L A1 + exchangeable mains plug. For EU + UK, one plug for each is supplied.

Version/Model Launch Date S/N OpenWrt Version Supported Model Specific Notes
DIR-505 A1 ?? ?? AA + trunk No "Charge Mode"
DIR-505L A1 ?? ?? AA + trunk Charge mode
DIR-505L A2 ?? ?? AA + trunk Charge mode; exchangeable mains plug

Hardware Highlights

CPU Ram Flash Network USB Serial JTag
atheros AR1311-AL1A 64MiB 8MiB 100mips x1 wifi Atheros 9380 Yes Yes No

Installation

Starting with r37834 the device can be flashed via the web interface using a prebuilt factory image. For earlier versions (AA) you need the serial connection to flash the device or build the factory image yourself.

Flash Layout

/ $ cat /proc/mtd

dev:    size   erasesize  name
mtd0: 00010000 00010000 "u-boot"
mtd1: 00010000 00010000 "art"
mtd2: 00010000 00010000 "mac"
mtd3: 00010000 00010000 "nvram"
mtd4: 00040000 00010000 "language"
mtd5: 00100000 00010000 "kernel"
mtd6: 00680000 00010000 "rootfs"
mtd7: 00120000 00010000 "rootfs_data"
mtd8: 00780000 00010000 "firmware"

OEM bootlog

U-Boot 1.1.4 (Apr 11 2012 - 12:10:08) AP121 (ar9331) U-boot DRAM: 64 MB Top of RAM usable for U-Boot at: 84000000 Reserving 161k for U-Boot at: 83fd4000 Reserving 192k for malloc() at: 83fa4000 Reserving 44 Bytes for Board Info at: 83fa3fd4 Reserving 36 Bytes for Global Data at: 83fa3fb0 Reserving 128k for boot params() at: 83f83fb0 Stack Pointer at: 83f83f98 Now running in RAM - U-Boot at: 83fd4000 ============================================ Date:Apr 11 2012 Time:12:10:08 Cameo Version: v1.00 Build:03 Module Name: D-Link DIR-505A1 ============================================ id read 0x100000ff flash size 8388608, sector count = 128 Flash: 8 MB Using default environment In: serial Out: serial Err: serial Net: ag7240_enet_initialize... : cfg1 0x5 cfg2 0x7114 eth0: 00:18:e7:91:ee:6d eth0 up : cfg1 0xf cfg2 0x7214 eth1: 00:03:7f:ff:ff:fe athrs26_reg_init_lan ATHRS26: resetting s26 ATHRS26: s26 reset done eth1 up eth0, eth1 Hit any key to stop autoboot: 0 ## Booting image at 9f080000 ... Image Name: Linux Kernel Image Created: 2012-04-09 11:02:58 UTC Image Type: MIPS Linux Kernel Image (lzma compressed) Data Size: 976469 Bytes = 953.6 kB Load Address: 80002000 Entry Point: 801fdc10 Verifying Checksum at 0x9f080040 ...OK Uncompressing Kernel Image ... OK No initrd ## Transferring control to Linux (at address 801fdc10) ... ## Giving linux memsize in bytes, 67108864 Starting kernel ... Booting AR9330(Hornet)... Linux version 2.6.31--LSDK-9.2.0_U9.915 (root@luke-ubuntu) (gcc version 4.3.3 (GCC) ) #1 Mon Apr 9 18:57:43 CST 2012 flash_size passed from bootloader = 8 arg 1: console=ttyS0,115200 arg 2: root=31:06 arg 3: rootfstype=squashfs arg 4: init=/sbin/init arg 5: mtdparts=ar7240-nor0:64k(u-boot),64k(ART),64k(mac),64k(nvram),256k(language),1024k(uImage),6656k(rootfs) arg 6: mem=64M CPU revision is: 00019374 (MIPS 24Kc) Determined physical RAM map: memory: 02000000 @ 00000000 (usable) User-defined physical RAM map: memory: 04000000 @ 00000000 (usable) Zone PFN ranges: Normal 0x00000000 -> 0x00004000 Movable zone start PFN for each node early_node_map[1] active PFN ranges 0: 0x00000000 -> 0x00004000 Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256 Kernel command line: console=ttyS0,115200 root=31:06 rootfstype=squashfs init=/sbin/init mtdparts=ar7240-nor0:64k(u-boot),64k(ART),64k(mac),64k(nvram),256k(language),1024k(uImage),6656k(rootfs) mem=64M PID hash table entries: 256 (order: 8, 1024 bytes) Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes. Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes Writing ErrCtl register=00000000 Readback ErrCtl register=00000000 Memory: 62004k/65536k available (2048k kernel code, 3456k reserved, 613k data, 124k init, 0k highmem) NR_IRQS:128 plat_time_init: plat time init done Calibrating delay loop... 266.24 BogoMIPS (lpj=532480) Mount-cache hash table entries: 512 NET: Registered protocol family 16 ===== ar7240_platform_init: 0 bio: create slab at 0 SCSI subsystem initialized usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 2048 (order: 2, 16384 bytes) TCP bind hash table entries: 2048 (order: 1, 8192 bytes) TCP: Hash tables configured (established 2048 bind 2048) TCP reno registered NET: Registered protocol family 1 AR7240 GPIOC major 0 squashfs: version 4.0 (2009/01/31) Phillip Lougher fuse init (API version 7.12) msgmni has been set to 121 alg: No test for lzma (lzma-generic) alg: No test for stdrng (krng) io scheduler noop registered (default) HDLC line discipline maxframe=4096 N_HDLC line discipline registered. Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled ttyS0: detected caps 00000000 should be 00000100 serial8250.0: ttyS0 at MMIO 0xb8020000 (irq = 19) is a 16550A console [ttyS0] enabled loop: module loaded PPP generic driver version 2.4.2 NET: Registered protocol family 24 PPTP driver version 0.8.5 PPPoL2TP kernel driver, V1.0 7 cmdlinepart partitions found on MTD device ar7240-nor0 Creating 7 MTD partitions on "ar7240-nor0": 0x000000000000-0x000000010000 : "u-boot" 0x000000010000-0x000000020000 : "ART" 0x000000020000-0x000000030000 : "mac" 0x000000030000-0x000000040000 : "nvram" 0x000000040000-0x000000080000 : "language" 0x000000080000-0x000000180000 : "uImage" 0x000000180000-0x000000800000 : "rootfs" usbcore: registered new interface driver libusual u32 classifier nf_conntrack version 0.5.0 (1024 buckets, 4096 max) CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use nf_conntrack.acct=1 kernel parameter, acct=1 nf_conntrack module option or sysctl net.netfilter.nf_conntrack_acct=1 to enable it. xt_time: kernel timezone is -0000 nf_conntrack_rtsp v0.6.21 loading IPv4 over IPv4 tunneling driver ip_tables: (C) 2000-2006 Netfilter Core Team nf_nat_rtsp v0.6.21 loading TCP cubic registered NET: Registered protocol family 17 arch/mips/ar7240/gpio.c (ar7240_simple_config_init) AP_RESET_GPIO: 12 ar7240wdt_init: Registering WDT success VFS: Mounted root (squashfs filesystem) readonly on device 31:6. Freeing unused kernel memory: 124k freed init started: BusyBox v1.01 (2012.04.09-10:59+0000) multi-call binary ln: /sbin/hotplug: File exists TFTP main standard_tftp_server launched on port 69. Please press Enter to activate this console. init NVRAM_SPACE from mtdblock size init nvram memory map size: 0x10000 order of pages: 0x4 nvram module init: /dev/nvram major number 225 glues to mtd: "nvram" size: 0x00010000 nvram_space: 0x00010000 mapped via mmap(2) openfile :/var/etc/nvram.default gpio_module: module license 'unspecified' taints kernel. Disabling lock debugging due to kernel taint ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver Port Status 1c000004 ar7240-ehci ar7240-ehci.0: ATH EHCI ar7240-ehci ar7240-ehci.0: new USB bus registered, assigned bus number 1 ehci_reset Intialize USB CONTROLLER in host mode: 3 ehci_reset Port Status 1c000000 ar7240-ehci ar7240-ehci.0: irq 3, io mem 0x1b000000 ehci_reset Intialize USB CONTROLLER in host mode: 3 ehci_reset Port Status 1c000000 ar7240-ehci ar7240-ehci.0: USB 2.0 started, EHCI 1.00 usb usb1: configuration #1 chosen from 1 choice hub 1-0:1.0: USB hub found hub 1-0:1.0: 1 port detected Initializing USB Mass Storage driver... usbcore: registered new interface driver usb-storage USB Mass Storage support registered. ATHR_GMAC: Length per segment 1536 ATHR_GMAC: fifo cfg 3 01f00140 ATHR_GMAC: unit 0 --> 00:18:e7:91:ee:6d ATHR_GMAC: Max segments per packet : 1 ATHR_GMAC: Max tx descriptor count : 40 ATHR_GMAC: Max rx descriptor count : 252 ATHR_GMAC: Mac capability flags : 5403 ATHR_GMAC: unit 1 --> 00:03:7f:ff:ff:fe ATHR_GMAC: Max segments per packet : 1 ATHR_GMAC: Max tx descriptor count : 40 ATHR_GMAC: Max rx descriptor count : 96 ATHR_GMAC: Mac capability flags : 25D93 killall: netbios_checker: no process killed Enabling Auto Neg on port:4 Phy status:1000 killall: wlan_schedule: no process killed killall: klogd: no process killed killall: syslogd: no process killed killall: timer: no process killed killall: timer: no process killed Sat Jan 1 00:00:00 UTC 2011 killall: inadyn: no process killed killall: lighttpd: no process killed ath_hal: 0.9.17.1 (AR9380, REGOPS_FUNC, WRITE_EEPROM, 11D) killall: dnsmasq: no process killed ath_rate_atheros: Copyright (c) 2001-2005 Atheros Communications, Inc, All Rights Reserved ath_dev: Copyright (c) 2001-2007 Atheros Communications, Inc, All Rights Reserved killall: udhcpc: no process killed killall: pppd: no process killed killall: udhcpd: no process killed domain empty DHCP server start. device_lan_ip=192.168.0.1 , device_lan_subnet_mask=255.255.255.0 Unable to open /var/misc/udhcpd.leases for reading ath_ahb: 9.2.0_U9.915 (Atheros/multi-bss) __ath_attach: Set global_scn[0] ACBKMinfree = 48 ACBEMinfree = 32 ACVIMinfree = 16 ACVOMinfree = 0 CABMinfree = 48 UAPSDMinfree = 0 Restoring Cal data from Flash ath_get_caps[4913] rx chainmask mismatch actual 1 sc_chainmak 0 ath_get_caps[4888] tx chainmask mismatch actual 1 sc_chainmak 0 killall: pppd: no process killed wifi0: Atheros 9380: mem=0xb8100000, irq=2 killall: openl2tpd: no process killed cp: /www/xml/help.xml: No such file or directory killall: ppp_redial: no process killed killall: ppp_monitor: no process killed 512+0 records in 512+0 records out tar: Invalid tar magic killall: wan_timer: no process killed rm: cannot remove `/tmp/lang_ver.txt': No such file or directory rm: cannot remove `/tmp/*.xml': No such file or directory wlan_vap_create : enter. devhandle=0x833e42c0, opmode=IEEE80211_M_HOSTAP, flags=0x1 wlan_vap_create : exit. devhandle=0x833e42c0, opmode=IEEE80211_M_HOSTAP, flags=0x1. VAP device ath0 created ath0 Interface doesn't accept private ioctl... HALDbg (8BE0): Operation not permitted killall: inadyn: no process killed route: SIOC[ADD|DEL]RT: No such process athr_gmac_ring_alloc Allocated 640 at 0x83936800 athr_gmac_ring_alloc Allocated 4032 at 0x83a0c000 Setting Drop CRC Errors, Pause Frames and Length Error frames Setting PHY... Failed to kill daemon: No such file or directory ieee80211_ioctl_siwmode: imr.ifm_active=131712, new mode=3, valid=1 device ath0 entered promiscuous mode br0: port 1(ath0) entering learning state killall: lld2d: no process killed br0: port 1(ath0) entering forwarding state ieee80211_ioctl_siwmode: imr.ifm_active=393856, new mode=3, valid=1 Scan in progress.. Cancelling it br0: port 1(ath0) entering disabled state DEVICE IS DOWN ifname=ath0 DEVICE IS DOWN ifname=ath0 br0: port 1(ath0) entering learning state SIOCGIFFLAGS: No such device br0: port 1(ath0) entering forwarding state killall: miniupnpd: no process killed ERROR:: paprd failed with error code = -2 ath_paprd_cal PAPRD excessive failure disabling PAPRD now

OpenWrt bootlog

## Booting image at 81000000 ... Image Name: MIPS OpenWrt Linux-3.3.8 Created: 2012-11-26 17:01:44 UTC Image Type: MIPS Linux Kernel Image (lzma compressed) Data Size: 4269201 Bytes = 4.1 MB Load Address: 80060000 Entry Point: 80060000 Verifying Checksum at 0x81000040 ...OK Uncompressing Kernel Image ... OK No initrd ## Transferring control to Linux (at address 80060000) ... ## Giving linux memsize in bytes, 67108864 Starting kernel ... [ 0.000000] Linux version 3.3.8 (dzubey@Spartan) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #6 Mon Nov 26 10:01:28 MST 2012 [ 0.000000] bootconsole [early0] enabled [ 0.000000] CPU revision is: 00019374 (MIPS 24Kc) [ 0.000000] SoC: Atheros AR9330 rev 1 [ 0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.000MHz [ 0.000000] Determined physical RAM map: [ 0.000000] memory: 04000000 @ 00000000 (usable) [ 0.000000] Initrd not found or empty - disabling initrd [ 0.000000] Zone PFN ranges: [ 0.000000] Normal 0x00000000 -> 0x00004000 [ 0.000000] Movable zone start PFN for each node [ 0.000000] Early memory PFN ranges [ 0.000000] 0: 0x00000000 -> 0x00004000 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256 [ 0.000000] Kernel command line: board=DIR-505-A1 console=ttyATH0,115200 mtdparts=spi0.0:64k(u-boot)ro,64k(art)ro,64k(mac)ro,64k(nvram)ro,256k(language)ro,1024k(kernel),6656k(rootfs),7680k@0x80000(firmware) rootfstype=squashfs,jffs2 noinitrd [ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes) [ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) [ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) [ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes. [ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes [ 0.000000] Writing ErrCtl register=00000000 [ 0.000000] Readback ErrCtl register=00000000 [ 0.000000] Memory: 58492k/65536k available (2121k kernel code, 7044k reserved, 401k data, 3432k init, 0k highmem) [ 0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] NR_IRQS:51 [ 0.000000] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104) [ 0.080000] pid_max: default: 32768 minimum: 301 [ 0.080000] Mount-cache hash table entries: 512 [ 0.090000] NET: Registered protocol family 16 [ 0.090000] gpiochip_add: registered GPIOs 0 to 29 on device: ath79 [ 0.100000] MIPS: machine is D-Link DIR-505 A1 [ 0.350000] bio: create slab at 0 [ 0.360000] Switching to clocksource MIPS [ 0.360000] NET: Registered protocol family 2 [ 0.370000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.370000] TCP established hash table entries: 2048 (order: 2, 16384 bytes) [ 0.380000] TCP bind hash table entries: 2048 (order: 1, 8192 bytes) [ 0.380000] TCP: Hash tables configured (established 2048 bind 2048) [ 0.390000] TCP reno registered [ 0.390000] UDP hash table entries: 256 (order: 0, 4096 bytes) [ 0.400000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) [ 0.400000] NET: Registered protocol family 1 [ 6.810000] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 6.820000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc. [ 6.830000] msgmni has been set to 114 [ 6.830000] io scheduler noop registered [ 6.830000] io scheduler deadline registered (default) [ 6.840000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled [ 6.840000] ar933x-uart: ttyATH0 at MMIO 0x18020000 (irq = 11) is a AR933X UART [ 6.850000] console [ttyATH0] enabled, bootconsole disabled [ 6.850000] console [ttyATH0] enabled, bootconsole disabled [ 6.870000] m25p80 spi0.0: found mx25l6405d, expected m25p80 [ 6.870000] m25p80 spi0.0: mx25l6405d (8192 Kbytes) [ 6.880000] 8 cmdlinepart partitions found on MTD device spi0.0 [ 6.880000] Creating 8 MTD partitions on "spi0.0": [ 6.890000] 0x000000000000-0x000000010000 : "u-boot" [ 6.890000] 0x000000010000-0x000000020000 : "art" [ 6.900000] 0x000000020000-0x000000030000 : "mac" [ 6.900000] 0x000000030000-0x000000040000 : "nvram" [ 6.910000] 0x000000040000-0x000000080000 : "language" [ 6.910000] 0x000000080000-0x000000180000 : "kernel" [ 6.920000] 0x000000180000-0x000000800000 : "rootfs" [ 6.920000] mtd: partition "rootfs" set to be root filesystem [ 6.930000] mtd: partition "rootfs_data" created automatically, ofs=6E0000, len=120000 [ 6.940000] 0x0000006e0000-0x000000800000 : "rootfs_data" [ 6.940000] 0x000000080000-0x000000800000 : "firmware" [ 6.970000] ag71xx_mdio: probed [ 6.970000] eth0: Atheros AG71xx at 0xb9000000, irq 4 [ 7.530000] ag71xx ag71xx.0: eth0: connected to PHY at ag71xx-mdio.1:04 [uid=004dd041, driver=Generic PHY] [ 7.540000] TCP cubic registered [ 7.540000] NET: Registered protocol family 17 [ 7.540000] Bridge firewalling registered [ 7.550000] 8021q: 802.1Q VLAN Support v1.8 [ 7.580000] Freeing unused kernel memory: 3432k freed - preinit - Press the [f] key and hit [enter] to enter failsafe mode [ 10.530000] eth0: link up (100Mbps/Full duplex) - regular preinit - [ 11.540000] eth0: link down - init - [ 11.860000] Compat-drivers backport release: compat-drivers-2012-09-04-2-gddac993 [ 11.860000] Backport based on wireless-testing.git master-2012-09-07 [ 11.870000] compat.git: wireless-testing.git [ 11.900000] cfg80211: Calling CRDA to update world regulatory domain [ 11.910000] cfg80211: World regulatory domain updated: [ 11.910000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp) [ 11.920000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) [ 11.930000] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm) [ 11.940000] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm) [ 11.950000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) [ 11.950000] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) [ 12.030000] NET: Registered protocol family 10 [ 12.170000] usbcore: registered new interface driver usbfs [ 12.170000] usbcore: registered new interface driver hub [ 12.180000] usbcore: registered new device driver usb [ 12.330000] ieee80211 phy0: Atheros AR9330 Rev:1 mem=0xb8100000, irq=2 [ 12.340000] cfg80211: Calling CRDA for country: US [ 12.340000] cfg80211: Regulatory domain changed to country: US [ 12.340000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp) [ 12.350000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm) [ 12.360000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm) [ 12.370000] cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) [ 12.380000] cfg80211: (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) [ 12.380000] cfg80211: (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) [ 12.390000] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm) [ 12.470000] PPP generic driver version 2.4.2 [ 12.510000] tun: Universal TUN/TAP device driver, 1.6 [ 12.510000] tun: (C) 1999-2004 Max Krasnyansky [ 12.610000] ip_tables: (C) 2000-2006 Netfilter Core Team [ 12.780000] NET: Registered protocol family 24 [ 12.800000] nf_conntrack version 0.5.0 (967 buckets, 3868 max) [ 13.320000] xt_time: kernel timezone is -0000 [ 13.760000] Netfilter messages via NETLINK v0.30. [ 13.780000] Ebtables v2.0 registered [ 14.030000] ip6_tables: (C) 2000-2006 Netfilter Core Team [ 14.270000] ctnetlink v0.93: registering with nfnetlink. [ 14.420000] pwm: module license 'unspecified' taints kernel. [ 14.430000] Disabling lock debugging due to kernel taint [ 14.430000] pwm: Unknown symbol device_unregister (err 0) [ 14.440000] pwm: Unknown symbol put_device (err 0) [ 14.440000] pwm: Unknown symbol __class_register (err 0) [ 14.450000] pwm: Unknown symbol device_create (err 0) [ 14.450000] pwm: Unknown symbol sysfs_create_group (err 0) [ 14.460000] pwm: Unknown symbol queue_work (err 0) [ 14.460000] pwm: Unknown symbol __alloc_workqueue_key (err 0) [ 14.470000] pwm: Unknown symbol class_find_device (err 0) [ 14.510000] i2c /dev entries driver [ 14.530000] gpio_pwm: Unknown symbol pwm_unregister (err 0) [ 14.530000] gpio_pwm: Unknown symbol pwm_register (err 0) [ 14.590000] usbcore: registered new interface driver usbserial [ 14.600000] USB Serial support registered for generic [ 14.600000] usbcore: registered new interface driver usbserial_generic [ 14.610000] usbserial: USB Serial Driver core [ 14.650000] Linux video capture interface: v2.00 [ 14.710000] USB Serial support registered for FTDI USB Serial Device [ 14.720000] usbcore: registered new interface driver ftdi_sio [ 14.720000] ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver [ 14.750000] USB Serial support registered for pl2303 [ 14.750000] usbcore: registered new interface driver pl2303 [ 14.760000] pl2303: Prolific PL2303 USB to serial adaptor driver [ 14.840000] fuse init (API version 7.18) [ 14.870000] usbcore: registered new interface driver uvcvideo [ 14.880000] USB Video Class driver (1.1.1) Please press Enter to activate this console. [ 16.910000] ADDRCONF(NETDEV_UP): eth0: link is not ready [ 16.910000] device eth0 entered promiscuous mode [ 16.920000] ADDRCONF(NETDEV_UP): br-lan: link is not ready [ 17.530000] eth0: link up (100Mbps/Full duplex) [ 17.530000] br-lan: port 1(eth0) entered forwarding state [ 17.540000] br-lan: port 1(eth0) entered forwarding state [ 17.540000] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 17.550000] ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready [ 19.540000] br-lan: port 1(eth0) entered forwarding state

Specific Configuration

Interfaces

The default network configuration is: TODO (Yet to be filled in)

Buttons

BUTTON Event
Reset RESET/FACTORY DEFAULTS
WPS Secure Easy Setup

Mode-switch

There is a 4 position switch on the top of the unit. The fourth position is used by the DIR-505L model to shutdown the software and operate as a USB charger - on the DIR-505 the case keeps the switch from going into the fourth position.

You can use the mode switch for pretty much anything you want – however, keep in mind that the "Charge" position turns the router off and is pretty easy to accidentally switch to.

The switch seems to modify GPIO 19,20,21,22 and 23:

Switch position GPIO
"WiFi Hotspot" 01001
"Repeater" 11001
"Router/AP" 10001
"Charger" 11000

Hardware

Info

Architecture: MIPS 24Kc
Vendor: Atheros
Bootloader: UBoot 1.1.4
System-On-Chip: SoC: Atheros AR9330 rev 1
CPU/Speed Atheros AR9330 400.000MHz
Flash-Chip: NANYA NT5TU32M16DG-AC
Flash size: 8192 KiB
RAM: 64 MiB
Wireless: 802.11b/g/n
Ethernet: 10/100 full duplex
USB: Yes 1 x 2.0 ar7240-ehci
Serial: Yes - tested working over TTL converter (3.3V!)
JTAG: Nope

Photos

Model Number

Front: Back:

Note: those pads are really meant for Pogo pins (which you can get at places like sparkfun). If you solder to them, use a low-wattage soldering iron (15-30 watts) and use solder flux to clean the pads first. Then only solder magnet wire or a single strand of stranded copper wire (32 awg).

More photos: http://galeria.tech-blog.pl/D-Link_DIR-505/

Opening the case

Note: This will void your warranty! (duh)

  • remove white sticker on the back, just below the power plug, and remove exposed screw.
  • pry the now unfastened cap straight up over power plug
  • remove yellow/green sticker
  • pry two remaining halves apart - there are three plastic tabs, one above reset hole, and one on each side of mode switch
    • Just stick a screwdriver in the hole at the bottom next to the ethernet port, and pry the two halves apart.
    • Then stick the screwdriver in on the other side in the topmost air vent and pry the top part of the shell apart.
  • pull power module straight up away from cpu board
  • pop cpu board up (two plastic tabs hold it down).

Serial

port.serial general information about the serial port, serial port cable, etc.

How to connect to the Serial Port of this specific device:

See above photo for connections. 115200 bps, 8N1. You can use any 3.3V serial dongle for this, I used a 3.3v arduino serial programming cable.

JTAG

port.jtag general information about the JTAG port, JTAG cable, etc.

How to connect to the JTAG Port of this specific device:

No JTAG connectors are known for this device.

Debricking

So there's two levels of "bricking"…mis-flashing the firmware, and overwriting the boot loader.

Since there's no jtag, if you overwrite the bootloader and it doesn't boot again, you're sol. That's almost impossible to do accidentally.

However, if you hold down the reset button at boot time, the original bootloader has a web interface that comes up, where you can re-flash the unit from.

Plug in your computer to the unit, assign it an ip address of 192.168.0.100, and boot the unit up while holding down the reset. Once the red light starts to blink slowly, release the reset, and go to 192.168.0.1 on your web browser. From there you can upload a new image. After successful flashing, you'll see a "Success" page in your browser.

LED red/green/on/off

After getting the "success" page in your browser you might notice a different behaviour of the LED, depending on which image you flashed:

Plesiu's AA image

Please keep in mind, that the LED might not come on after flashing / rebooting, since it usually signals WiFi, which might not be up right after flashing. So don't misinterpret the off-LED as "it's not working", when it's just showing: "Wifi is off". Try to access the router by telnet 192.168.1.1.

Trunk image

The LED goes from blinking red to blinking green, and then to steady green. Congratulations, your DIR-505 just has booted and is waiting for you to telnet 192.168.1.1 (at least it should be).

Bootloader Mods

  1. you could read about bootloader in general and about Das U-Boot in particular.

U-Boot 1.1.4 modification for routers

Forum member pepe2k made a modification of U-Boot 1.1.4 for Qualcomm Atheros SoCs based devices (the project is still being developed, so new devices and SoCs will be supported in the future). Up to date information, binary images and sources can be found on official GitHub repository.

This modification started from wr703n-uboot-with-web-failsafe project, but supports more devices, all modern web browsers, has a lot of improvements and other modifications (like U-Boot NetConsole, custom commands, overclocking possibilities etc.).

More information:

Hardware mods

  1. as a beginner, you really should inform yourself about soldering in general and then obtain some practical experience! (It's really not that hard, just go try it.)
  2. The internal WiFi antenna sometimes has a tendancy to short to the board. If you open the device, slip a piece of electrical tape, (or even better, shrink wrap tubing) around the vertical piece of metal that extends over the board to keep it from bouncing around. Otherwise if it shorts, the smoke comes out of the processor.

Notes

Other than similar routers (e.g., the TP-Link TL-WR703N), the D-Link DIR-505 uses the interface eth1 rather than eth0. This means that if you build your own firmware, you must configure /etc/config/network accordingly (option ifname 'eth1'), or you will not be able to connect later on via Ethernet.

config interface 'lan'
        option ifname 'eth1'
        option proto 'dhcp'

Custom OpenWrt image with LuCi integrated

Tags

For some Help with the Tags, please have a look here: tags

Back to top

toh/d-link/dir-505.txt · Last modified: 2014/09/17 19:17 by tmomas