OpenWrt Forum Archive

Topic: D-link DIR-505 support?

The content of this topic has been archived between 2 Apr 2018 and 5 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

@brsinal: Thanks. Emergency recovery of the router did the trick. I had to try a few browsers. You have the right one, when a percentage of completion display appears. Safari on my macbookpro was working ok (to give an example).

Now I can start making it another nice platform for my further developments. Great! smile

One thing remains... I ordered a few more DIR-505 (as I have a habbit to brick some sooner or later) and one that was in my post today is a A2 model.

Any ideas what to do differently with them? I guess over time these will replace the A1 completely. When nobody has tried before, I could connect serial to it and inspect uboot parms and boot log. Or do we already have that somewhere and we are already beyond that point?

As I understand it "factory" images are built to be in written from the stock d-link firmware (or d-link error recovery).
"sysupgrade" images are designed to be written from openwrt.

So if you already have openwrt, try a sysupgrade image from the openwrt interface.  OR try a factory image from the D-Link error recovery mode.

docbee wrote:

@brsinal: Thanks. Emergency recovery of the router did the trick. I had to try a few browsers. You have the right one, when a percentage of completion display appears. Safari on my macbookpro was working ok (to give an example).

Now I can start making it another nice platform for my further developments. Great! smile

One thing remains... I ordered a few more DIR-505 (as I have a habbit to brick some sooner or later) and one that was in my post today is a A2 model.

Any ideas what to do differently with them? I guess over time these will replace the A1 completely. When nobody has tried before, I could connect serial to it and inspect uboot parms and boot log. Or do we already have that somewhere and we are already beyond that point?

There is a guy here in the post that has tried the DIR-505-A2 and bricked it...

tmo26 wrote:

Got a DIR-505 A2 recently and tried to flash it with plesius image.

Damn, should have looked at the version number before...

Flashed the device with the emergency recovery method (pushing reset @ power up until red light starts to blink 2sec on, 1sec off). Red light went out, and stayed out.

Not reachable via 192.168.0.1 or 192.168.1.1
After powerup, red light comes up for some seconds, then no red light any more.

P/N: EIR505MEU....A2E
S/N: QBWS103018189
H/W Ver.:A2   F/W Ver.: 1.06

Shame on me I didn't look for the H/W rev. earlier.. :-/

But there's still hope: Emergency recovery mode still works.

Apart from that: Any suggestions how to proceed?

(Last edited by brsinal on 26 Aug 2013, 01:40)

I connected a serial console to my A2 model and this is what it logs druing boot

U-Boot 1.1.4 (Sep  7 2012 - 10:51:18)

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:Sep  7 2012  Time:10:51:18
Cameo Version: v1.00 Build:05
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: c8:d3:a3:5e:a7:d8
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:  2  1  0 
## Booting image at 9f080000 ...
   Image Name:   Linux Kernel Image
   Created:      2012-12-14   9:45:35 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    979936 Bytes = 957 kB
   Load Address: 80002000
   Entry Point:  801ff6a0
   Verifying Checksum at 0x9f080040 ...OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 801ff6a0) ...
## Giving linux memsize in bytes, 67108864

Starting kernel ...

Booting AR9330(Hornet)...
Linux version 2.6.31--LSDK-9.2.0_U9.915 (root@localhost.localdomain) (gcc version 4.3.3 (GCC) ) #1 Fri Dec 14 17:41:11 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 (2054k kernel code, 3464k reserved, 614k 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 <bio-0> 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.12.14-09:42+0000) multi-call binary
ln: /sbin/hotplug: File exists

Please press Enter to activate this console. TFTP main
----------------standard_tftp_server launched on port 69. -----------------
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
alarm
exit 1
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 --> c8:d3:a3:5e:a7:d8 
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
athr_gmac_ring_alloc Allocated 640 at 0x83b61800
athr_gmac_ring_alloc Allocated 4032 at 0x83b45000
Setting Drop CRC Errors, Pause Frames and Length Error frames 
Setting PHY...
device eth0 entered promiscuous mode
killall: wlan_schedule: no process killed
killall: netbios_checker: no process killed
killall: klogd: no process killed
killall: syslogd: no process killed
killall: timer: no process killed
killall: timer: no process killed
killall: lld2d: no process killed
Sat Jan  1 00:00:00 UTC 2011
ath_hal: 0.9.17.1 (AR9380, REGOPS_FUNC, WRITE_EEPROM, 11D)
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: udhcpd: no process killed
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[4939] rx chainmask mismatch actual 1 sc_chainmak 0
ath_get_caps[4914] tx chainmask mismatch actual 1 sc_chainmak 0
wifi0: Atheros 9380: mem=0xb8100000, irq=2
cp: /www/xml/help.xml: No such file or directory
tar: Invalid tar magic
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=0x828dc2c0, opmode=IEEE80211_M_STA, flags=0x1
wlan_vap_create : exit. devhandle=0x828dc2c0, opmode=IEEE80211_M_STA, flags=0x1.
VAP device ath0 created 
ath0
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
2011-01-01 00:00:05: (log.c.166) server started 
2011-01-01 00:00:05: (log.c.166) server started 
wlan_vap_create : enter. devhandle=0x828dc2c0, opmode=IEEE80211_M_HOSTAP, flags=0x1
wlan_vap_create : exit. devhandle=0x828dc2c0, opmode=IEEE80211_M_HOSTAP, flags=0x1.
VAP device ath1 created 
ath1
Interface doesn't accept private ioctl...
HALDbg (8BE0): Operation not permitted
 ieee80211_ioctl_siwmode: imr.ifm_active=131712, new mode=3, valid=1 
 ieee80211_ioctl_siwmode: imr.ifm_active=131200, new mode=2, valid=1 
2011-01-01 00:00:07: (log.c.166) server started 
device ath1 entered promiscuous mode
br0: port 2(ath1) entering learning state
killall: llmnr: no process killed
br0: port 2(ath1) entering forwarding state
killall: sta_notifier: no process killed
myname = wpa_supplicant
ieee80211_ioctl_getparam : parameter 0x284 not supported 
Start HTTPS server!!!
2011-01-01 00:00:12: (log.c.166) server started 
Failed to kill daemon: No such file or directory
killall: dnsmasq: no process killed
myname = hostapd
 ieee80211_ioctl_siwmode: imr.ifm_active=393856, new mode=3, valid=1 
 Scan in progress.. Cancelling it 
br0: port 2(ath1) entering disabled state
 DEVICE IS DOWN ifname=ath1
 DEVICE IS DOWN ifname=ath1
br0: port 2(ath1) entering learning state
br0: port 2(ath1) entering forwarding state

halting uboot and printing environment does deliver

ar7240> help
fake   - fake
?       - alias for 'help'
boot    - boot default, i.e., run 'bootcmd'
bootd   - boot default, i.e., run 'bootcmd'
bootm   - boot application image from memory
cp      - memory copy
erase   - erase FLASH memory
help    - print online help
httpboot- entering the backup mode.
md      - memory display
mm      - memory modify (auto-incrementing)
mtest   - simple RAM test
mw      - memory write (fill)
nm      - memory modify (constant address)
ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
progmac - Set ethernet MAC addresses
reset   - Perform RESET of the CPU
run     - run commands in an environment variable
setenv  - set environment variables
tftpboot- boot image via network using TFTP protocol
version - print monitor version

ar7240> printenv
bootargs=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)
bootcmd=bootm 0x9f080000
bootdelay=2
baudrate=115200
ethaddr=0x00:0xaa:0xbb:0xcc:0xdd:0xee
ipaddr=192.168.0.1
serverip=192.168.0.100
stdin=serial
stdout=serial
stderr=serial
ethact=eth0

Environment size: 368/65532 bytes
ar7240>

(Last edited by docbee on 26 Aug 2013, 10:13)

Comparing uboot parms of A1 and A2 does not show any difference. Therefore, I was brave enough to flash my A1 tested openwrt image onto the A2 with the help of the built-in web recovery tool... and this works!

So I can confirm by practical experiment, that a A1 image also works on an A2!

A1 and A2 seem to be different regaring the plug (which is replaceable to provide easier multinational support) but apart from that and the fourth switch position (usb loading only) everything looks exactly the same.

Time for a beer... or two smile   (ok, postponed until later in the evening)

(Last edited by docbee on 26 Aug 2013, 10:44)

That's good news!
I've got an A2 version lying around here, which I tried to flash with plesiu's image, but some weeks ago it didn't work. I'll try again tonight, hoping that it will work!

docbee wrote:

So I can confirm by practical experiment, that a A1 image also works on an A2

Guy from my IT dept. called D-Link.  They said hardware between A1 and A2 are the same.
Also, if you download the firmware image for A1, the filename shows A1A2...

So that would also lend one to think they can run the same firmware.

mraneri wrote:

Guy from my IT dept. called D-Link.  They said hardware between A1 and A2 are the same.

I assume, with "hardware", they mean only the main router PCB, since the "other" hardware like the casing, the power supply and the mains plug seem to be different between the models, right?

tmo26 wrote:

I assume, with "hardware", they mean only the main router PCB, since the "other" hardware like the casing, the power supply and the mains plug seem to be different between the models, right?

That was my understanding.
The question posed was specifically regarding firmware compatibility with the hardware.
Of course, depending on who they spoke with, I would take the info cautiously.

Good luck.

derdigge wrote:

i bought one here (special offer).  22€

I bought two, and they are indeed happily buzzing with BB trunk. A very, very nice little machine that could very well replace the WR703N/MR3020 boxes that have become so popular for ultra-small builds. Especially since the 8 MB flash makes it so much easier to work with without having to resort to custom builds or extroot.

However, I noticed that the failsafe mechanism doesn't work correctly. You can, while booting, press the "sync" button and the LED will start flashing rapidly. But the machine isn't reachable using the regular failsafe configuration. Am I doing something rong, or is it simply not fully implemented yet?

metai wrote:
derdigge wrote:

i bought one here (special offer).  22€

I bought two, and they are indeed happily buzzing with BB trunk. A very, very nice little machine that could very well replace the WR703N/MR3020 boxes that have become so popular for ultra-small builds. Especially since the 8 MB flash makes it so much easier to work with without having to resort to custom builds or extroot.

However, I noticed that the failsafe mechanism doesn't work correctly. You can, while booting, press the "sync" button and the LED will start flashing rapidly. But the machine isn't reachable using the regular failsafe configuration. Am I doing something rong, or is it simply not fully implemented yet?

Yeah and the D-Link DIR 506L would replace TP-Link MR3040 for the same reason, 8MB Flash, battery and/or USB-Powered...

But no OpenWRT support yet... sad

sophitus wrote:

The images appear on:

http://downloads.openwrt.org/snapshots/ … actory.bin

Plesius build seems not to be required anymore....

Thanks for the great work!!!

Has anyone tried that image? After I install it, can I just plug it, connect to it over WiFi and install luci from terminal?

I tried both, Plesius image and trunk, both are working.

Does the trunk image require any tweaking to bring wifi up and configure networking as a router/ap? I remember I gave up after having problems with Plesius image -- I couldn't get it to work properly in router/ap mode, probably from my lack of experience with OpenWRT.

stangri wrote:

Does the trunk image require any tweaking to bring wifi up and configure networking as a router/ap?

Nope, it's exactly the same as for any other router.

After I install it, can I just plug it, connect to it over WiFi and install luci from terminal?

As with every fresh OpenWrt installation, Wifi comes initially disabled. You need to do the first few steps with a wired connection.

(Last edited by metai on 10 Sep 2013, 20:33)

Hi all,

I'm new to this custom firmwares world.
I've read quite a few posts here already. Thanks for the knowledge provided!

I bought a DIR-505 to use it while traveling, and so far it worked fine, though I'm not impressed with performances.

Was wondering if with this OpenWrt firmware the DIR-505 can be used to connect to a VPN server and provide VPN client services via ethernet.
This is to connect my STB to it while traveling, faking that it is connecting from my home country.
Internet connection would be taken from a wireless router (which is not customisable).

I hope I was able to explain everything clearly.

I own a DIR-505 rev.A2 with firmware 1.06.
I have a Macbook and close to zero knowledge of linux.

Thanks!
Ale

Thank you all for replying my last post several months ago. Now I got a new problem...I compiled the firmware and wanted to use IPv6 private BT with this router. BUT when I ping IPv6, all I get is "ping: send to: Operation not permitted" thing. I suppose that's some kind of iptable problem or kernel bugs? Google didn't solve my problem. I can ping 0::0 and other IPv6 loopback addresses but other v6 addresses will cause that message. That's weird... IPv4 works all fine...Please help...
Thanks!

Where can I download the latest openwrt or dd-wrt firmware for DIR-505 A1 ?

Sorry newbie question here.

I saw some compilation from other users. Should I use them ?

What is a trunk ? ; )

amazing thread here and very helpful forum "elders" ; )

Hi All,

I am new to this world of 3rd party firmware. Today i tried to flash my new DIR-505 a1 with latest from trunk (downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-dir-505-a1-squashfs-factory.bin). I am running router in repeater mode and was connected with ethernet while upgrading. Upgrade went successful and router re-booted. Post reboot, i got a blinking red and now a blinking green light. I tried to telnet 196.168.1.1 but was not able to telnet.

If i remove USB, there is no light in router. I tried to unplug and then connect again after few minutes but same result. I have set my windows(7) TCP/IP properties for IPV4 to assign static IP as well. Please help me!!

(Last edited by sachin0235 on 19 Oct 2013, 17:20)

Sorry to bug again but that was a stupid hardcoded tcp/ip addresses. I am able to install open wrt and now playing with it.....yooohooooo