OpenWrt Forum Archive

Topic: OpenWRT on a Dlink DIR-506L

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

I just picked up a router off newegg (http://www.newegg.com/Product/Product.a … alParent=1) with the intent of installing openwrt. Before I purchased the router, i checked the hardware list and noticed that the DIR-505 was on the list and I imagined that the 506 would be very similar in terms of compatibility chipset etc. however, when i got the router in and opened it up, i noticed that it had a different chip inside than the 505. I tried to look up some other routers with the same chip in them, but when i read the information on the wiki about these devices, its all jargon to me. I would try to just upload a pre-built openwrt image, but i was very confused on which i needed. I went to follow the steps on compiling my own version of openwrt, but soon was lost in menus, and not sure what to select.

So i have come to this forum to ask for guidance in which version of openwrt i can install (if any) and if not what my options are at that point.

images:
http://i.imgur.com/G6yx0qA.jpg
http://i.imgur.com/fD0ZMZ5.jpg

Thank you for your time.

the device is similar to TP-Link MR3040 but has 8M flash. Which makes it more appealing to use it with OpenWrt than MR3040 with only 4M

However it is not yet supported by OpenWrt

(Last edited by sophitus on 3 Sep 2013, 16:14)

I just purchased this device  and I've been able to get serial connection to it.

CDM530DL_U02 Jboot B608
JRecovery Version R1.2 2012/07/27 10:46
SPI FLASH: MX25l6405d 8M
CSID 6E20->6E21
................
Starting kernel @80000000...

LINUX started...

 THIS IS ASIC
Linux version 2.6.21 (tja@dot7) (gcc version 3.4.2) #7 Wed Aug 8 11:17:31 CST 2012

 The CPU feqenuce set to 360 MHz
CPU revision is: 0001964c
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Built 1 zonelists.  Total pages: 8128
Kernel command line: console=ttyS1,57600n8 root=/dev/mtdblock3
Primary instruction cache 32kB, physically tagged, 4-way, linesize 32 bytes.
Primary data cache 16kB, 4-way, linesize 32 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
Cache parity protection disabled
cause = 60808020, status = 11000000
PID hash table entries: 128 (order: 7, 512 bytes)
calculating r4koff... 0015f900(1440000)
CPU frequency 360.00 MHz
Using 180.000 MHz high precision timer.
Console: colour dummy device 80x25
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 29280k/32768k available (2387k kernel code, 3488k reserved, 580k data, 116k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
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
Time: MIPS clocksource has been installed.
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
RT3xxx EHCI/OHCI init.
squashfs: version 3.2-r2 (2007/01/15) Phillip Lougher
squashfs: LZMA suppport for slax.org by jro
io scheduler noop registered (default)

------------------GPIO--------------------------
 GPIOMODE:42df
SLIC INTR ==> gpio 1
Ralink gpio driver initialized
HDLC line discipline: version $Revision: 1.1.1.1 $, maxframe=4096
N_HDLC line discipline registered.
Serial: 8250/16550 driver $Revision: 1.7 $ 4 ports, IRQ sharing disabled
serial8250: ttyS0 at I/O 0xb0000500 (irq = 37) is a 16550A
serial8250: ttyS1 at I/O 0xb0000c00 (irq = 12) is a 16550A
loop: loaded (max 8 devices)
rdm_major = 254
net_speed proc file Create 
MAC_ADRH -- : 0x00000000
MAC_ADRL -- : 0x00000000

eth2 mii.o query= phy_id:0, address:1 retval:7849
Ralink APSoC Ethernet Driver Initilization. v2.0  256 rx/tx descriptors allocated, mtu = 1500!
MAC_ADRH -- : 0x0000000c
MAC_ADRL -- : 0x432880bd
PROC INIT OK!
=== 0xB0100004 = 00000000 
Insmod eth_ping skb_diy module.
driver loaded
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
NET: Registered protocol family 24
block2mtd: version $Revision: 1.1.1.1 $
deice id : c2 20 17 c2 20 (2017c220)
MX25L6405D(c2 2017c220) (8192 Kbytes)
mtd .name = raspi, .size = 0x00800000 (8M) .erasesize = 0x00001000 (4K) .numeraseregions = 0
Creating 7 MTD partitions on "raspi":
0x00000000-0x00800000 : "Whole"
0x00000000-0x00010000 : "Bootloader"
0x00010000-0x00150000 : "Kernel"
0x00150000-0x00690000 : "RootFS"
0x00690000-0x00710000 : "MyDLink"
0x00710010-0x007f0000 : "UI"
mtd: partition "UI" doesn't start on an erase block boundary -- force read-only
0x007f0000-0x00800000 : "Config"
rt3xxx-ehci rt3xxx-ehci: Ralink EHCI Host Controller
rt3xxx-ehci rt3xxx-ehci: new USB bus registered, assigned bus number 1
rt3xxx-ehci rt3xxx-ehci: irq 18, io mem 0x101c0000
rt3xxx-ehci rt3xxx-ehci: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
rt3xxx-ohci rt3xxx-ohci: RT3xxx OHCI Controller
rt3xxx-ohci rt3xxx-ohci: new USB bus registered, assigned bus number 2
rt3xxx-ohci rt3xxx-ohci: irq 18, io mem 0x101c1000
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (256 buckets, 2048 max)
Register conntrack protocol helper for ESP...
Init IP_nat_proto_esp register. 
ip_tables: (C) 2000-2006 Netfilter Core Team, Type=Restricted Cone
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly.
Freeing unused kernel memory: 116k freed
Algorithmics/MIPS FPU Emulator v1.5
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compred
  eth2:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0       0
    lo:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0       0
switch reg write offset=168, value=17

phy_tx_ring = 0x01c8b000, tx_ring = 0xa1c8b000

phy_rx_ring0 = 0x01c8c000, rx_ring0 = 0xa1c8c000
 flash_open: flash_fd=3
Mount D Section.
mount: /dev/mtdblock5 is write-protected, mounting read-only
Mount MyDlink Section.
mount: mounting /dev/mtdblock4 on /usr/mydlink failed
 flash_open: flash_fd=9
phy 0, reg 0, val 0x3900
Set: phy[0].reg[0] = 3900
phy 0, reg 0, val 0x3900
Set: phy[0].reg[0] = 3900
Set gpio_range = gpio2300, dir = 8c0300
switch register base addr to system register 0xb0000000
write offset 0x60, value 0x4042dd
switch reg write offset=168, value=17
switch register base addr to 0xb0181000
write offset 0x2c, value 0xc500000
switch register base addr to system register 0xb0000000
switch reg write offset=14, value=405555
switch reg write offset=50, value=2001
switch reg write offset=98, value=7f3f
switch reg write offset=e4, value=3f
switch reg write offset=40, value=1002
switch reg write offset=44, value=1001
switch reg write offset=48, value=1001
switch reg write offset=70, value=ffff417e
phy 1, reg 0, val 0x3900
Set: phy[1].reg[0] = 3900
phy 2, reg 0, val 0x3900
Set: phy[2].reg[0] = 3900
phy 3, reg 0, val 0x3900
Set: phy[3].reg[0] = 3900
phy 4, reg 0, val 0x3900
Set: phy[4].reg[0] = 3900
phy 0, reg 0, val 0x3100
Set: phy[0].reg[0] = 3100
phy 0, reg 0, val 0x3100
Set: phy[0].reg[0] = 3100
eth2.2: Setting MAC address to  90 94 e4 e9 16 2f.
device eth2 entered promiscuous mode
VLAN (eth2.2):  Setting underlying device (eth2) to promiscious mode.
Init handler: lan
Init handler: dhcpsrv
Failure parsing line 12 of /etc/udhcpd.conf
server_config.pool_check = 1

 start = 192.168.0, end = 192.168.0, lan_ip = 192.168.0, interface=br0, ifindex=0

Unable to open /var/run/udhcpd.leases for reading
udhcpd (v0.9.9-pre) started
Unable to open /var/run/udhcpd.leases for reading
Init handler: stp
Init handler: reset_btn
Init handler: watchdog
Init handler: wireless_mode
Init handler: wlanap
Init handler: wan
Init handler: ondemand
Init handler: nat
==== NAT START (WAN:ALL Func:ALL) ====
==== Reset ICMP Timeout ====
Init handler: dnsrelay
Init handler: time
timezone:-480
dsttime:0
Init handler: schedule
Init handler: telnet
Init handler: wps_btn
Init handler: ddns
Init handler: routing
Init handler: autobak
Init handler: keepalive
Init handler: mupnpd
Init handler: hotplug
Init handler: disk_util
Init handler: usb_alert
Init handler: pptp
Init handler: l2tp
Init handler: mydlink
sh: /mydlink/opt.local: not found
Init handler: igmp
Init handler: user
Init handler: pwr_saving
Init handler: dlna
Init handler: rbydom
Init handler: rbyip
Init handler: qos
Init handler: snmp
Init handler: spap
Init handler: ftp_alg
Init handler: sip_alg
Init handler: bty_led
Init handler: ate
Init handler: shareport
Init handler: bonjour
Init handler: host_resolution
Init handler: wps_status
Init handler: reboot
sh: lltd-action: not found
/usr/bin/telnetd-action: Starting telnetd...

 flash_open: flash_fd=7
 flash_open: flash_fd=7
/usr/bin/telnetd-action start ok
 flash_open: flash_fd=7
switch register base addr to 0xb0181000
write offset 0x2c, value 0x0
switch register base addr to system register 0xb0000000
# switch register base addr to 0xb0181000
write offset 0x2c, value 0x40000000
switch register base addr to system register 0xb0000000
switch register base addr to system register 0xb0000000
write offset 0x48, value 0x10010003
Ralink APSoC Hardware Watchdog Timer
Started WatchDog Timer. LoadVlaue: 36600 sysclk: 120000000 TIMEOUT: 60
Stopped WatchDog Timer.
Disable Kernel Mode Watchdog
Started WatchDog Timer. LoadVlaue: 36600 sysclk: 120000000 TIMEOUT: 60
rt2860v2_ap: module license 'unspecified' taints kernel.
Length of MAC:6
 mac:90:94:e4:e9:16:30:
----


=== pAd = c0082000, size = 802656 ===

<-- RTMPAllocAdapterBlock, Status=0
RX DESC a1402000  size = 2048
<-- RTMPAllocTxRxRingMemory, Status=0
2a:55:44:e4:05:1a:cb:eb:01:93:83:88:b2:c3:4f:8f:
50:b2:65:62:c1:a3:cb:f9:52:8e:b0:b1:79:c9:b6:97:

1. Phy Mode = 9
2. Phy Mode = 9
3. Phy Mode = 9
RTMPSetPhyMode: channel is out of range, use first channel=0 
MCS Set = ff 00 00 00 01
SYNC - BBP R4 to 20MHz.l
SYNC - BBP R4 to 20MHz.l
SYNC - BBP R4 to 20MHz.l
SYNC - BBP R4 to 20MHz.l
SYNC - BBP R4 to 20MHz.l
SYNC - BBP R4 to 20MHz.l
SYNC - BBP R4 to 20MHz.l
SYNC - BBP R4 to 20MHz.l
SYNC - BBP R4 to 20MHz.l
Main bssid = 90:94:e4:e9:16:30
<==== rt28xx_init, Status=0
0x1300 = 00064380
device ra0 entered promiscuous mode
br0: port 1(ra0) entering learning state
br0: topology change detected, propagating
br0: port 1(ra0) entering forwarding state

Well, if you have serial I would try out the firmware for D-Link DIR-320 H/W Ver.: B1. It uses the same chip and flashsize so I guess it could be tried. The RT5350 is a router-on-a-chip that ncludes an 802.11n MAC, a 2.4GHz radio, and a 5-port 10/100 Ethernet MAC/PHY all on the chip, so it "should" communicate if you have support for the chip itself. You would quite possibly need to do some gpio hockey with it but thats only time consuming. The only thing that I would take careful detail to is the jboot, learn the commands (if they differ from uboot).

http://wiki.openwrt.org/toh/d-link/dir-320_revb1

(Last edited by Lennong on 27 Dec 2013, 10:48)

I guess a better candidate for the job is Hame MPR-a2. The problem is that the device does some additional check before flashing (hash check or something). It is going to be preaty hard to bypass that. I'm working in the dark here due to my lack of knowledge.  If anyone has any ideas please share and I'll be more than glad to experiment. I don't care about the device since I bought it exactly for that (experimenting).

Hello, I bought a DIR-506L also wondering what could be open WRT firmware installed, but found that it is not possible. I do not have enough knowledge to do it, but if someone with knowledge could do this i would be glad to help in the way i can.

Thanks

Hi,
I am also interested in this. I compiled a sysupgrad eimage for HAME mpr-a2. Then, while pressing the reset button I powered on the device. The device has the IP 192.168.123.254 and dhcp active. I acessed the failsafe webinterface there and tried to flash the firmware. It gave an error message; that's it, ERROR.
I tried also from the router's official webinterface ticking the box saying "allow unofficial firmware" and it gave ERROR 101 and some chinese writing.

So how could we write the compiled image to the device?

Edit: the google translate of the error message from chinese to english says:

Reboot the router
Invalid upgrade file !
Make sure you have the correct file
(Error code: -101)
This device is rebooting ...
Do not use this device off.
Please wait to wait 55 seconds ...

(Last edited by fratzicu on 13 Mar 2015, 21:32)

I noticed that the hex view of the official image starts with "DLK6E2114001"

DLK6E2114001  Uê           lå4         Ó¦                 BH       !n9€ÿ$+lå4æ ZéT$!   €›¦ ~¶c   €  ¿ ÀG FÑlë¡Â|(   ]   @ž0       oýÿÿ£·^ÓÈNF`וgŽúBÈAb°`=@¶è(*ÌAAÒ>¬2ã]mdb{K(¸²e5áK ïÎ IŽs2í6€g#ÿu 

while the openwrt build of HAME mpr-A2 not:

'VuTüg¾ ¸€   €   iüÏLinux Kernel Image              m  € ,ø0       oýÿÿ£·pPxÍq~ªwYÂ!J‚ŸÚûÅÕ¬\1T%H·x–    Œöj€Û+@ŠÑ
¤Ãê@œ½´o,{†ÌMd‘ñå¥}*—_‰‚±¥#A=ÿsÉC‘REƒÉúP,_P)‡3õÔ¶3}îÁ&Ä®‚¸r†ÆËÓóœWzƒ

Also, while the official firmware image ends in a lot of 00, the openwrt firmware ends in a lot of ff

(Last edited by fratzicu on 13 Mar 2015, 21:45)

The discussion might have continued from here.