1 (edited by Ncl8 2009-04-26 17:12:16)

Topic: OpenWRT on D-link DSL-524t

I wanted to try to get OpenWRT working on my D-Link DSL-524T so i red a few guides and so on. If your firmware upgrade fails you'll need a JTAG cable to fix it. To get started, you need a telnet client, windows has one or you could use PuTTY. You also need a RJ-45 cable to connect your pc to your router.

Change your computers ip address to 192.168.1.2. Now open DOS and write "telnet 192.168.1.1"(default ip). Username and password should be admin by default, if you changed the password, then use it. For those who have forgotten their password, just reset the router via the reset button at the back of the device. Now type "cat /proc/ticfg/env". The result should look something like this:

BusyBox on (none) login: admin
Password:

BusyBox v0.61.pre (2006.06.21-02:30+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

# cat /proc/ticfg/env
memsize 0x01000000
flashsize       0x00400000
modetty0        38400,n,8,1,hw
modetty1        38400,n,8,1,hw
bootserport     tty0
cpufrequency    150000000
sysfrequency    125000000
bootloaderVersion       0.22.02
Adam2_Release   0.22.02_b04_Mar 10 2005
ProductID       AR7RD
HWRevision      Unknown
SerialNumber    00:17:9A:C7:F0:2C
my_ipaddress    5.8.8.8
prompt  Adam2_AR7RD
firstfreeaddress        0x9401d888
req_fullrate_freq       125000000
maca    00:17:9A:C7:F0:2C
mtd0    0x90091000,0x903f0000
mtd1    0x90010090,0x90091000
mtd2    0x90000000,0x90010000
mtd3    0x903f0000,0x90400000
mtd4    0x90010000,0x903f0000
autoload        1
autoload_timeout        7
StaticBuffer    120
SW_FEATURES     0X8000
vcc_encaps0     0.0
vcc_encaps1     0.0
vcc_encaps2     0.0
vcc_encaps3     0.0
vcc_encaps4     0.0
vcc_encaps5     0.0
vcc_encaps6     0.0
vcc_encaps7     0.0
modulation      0xffff
usb_vid 0x0
usb_pid 0x0
usb_man N/A
usb_prod        N/A
eoc_vendor_id   0x444C696E6B000000
enable_margin_retrain   1
eoc_vendor_serialnum    00:17:9A:C7:F0:2C_00000000000000
eoc_vendor_revision     20060209
invntry_vernum  2006062100000000
#

Write down the ipaddress presented at my_ipaddress, this is the address used to log in to the bootloader which is Adam2. Make sure your mtd0 through mtd4 are the same as those in this example. ProductID should be AR7*. Go download the newest(atm 8.09) ar7 squashfs file. The name should look somethin like: "openwrt-ar7-squashfs.bin".

Set your computers static IP to 5.8.8.9 and gateway to 5.8.8.8. Now unplug the power cable and type "ftp 5.8.8.8" or what ever your my_ipaddress is. You have about 5 to 7 seconds to execute the ftp command before bootloader loads the router os. Power up the router and execute the ftp command. Now you should be in the adam2 ftp server. Username and password is adam2. Now type the following commands(replace .bin filename with the one you have):

ftp> quote "MEDIA FLSH"
ftp> binary
ftp> debug
ftp> hash
ftp> put "openwrt-ar7-squashfs.bin" "c mtd4"
ftp> quote REBOOT
ftp> quit

Now the device should reboot and your ftp should disconnect. Wait a few moments and try to connect to your router via telnet. telnet 192.168.1.1. You should now be running OpenWRT on your router.

Re: OpenWRT on D-link DSL-524t

Thanks for sharing your nice howto... sad

Re: OpenWRT on D-link DSL-524t

When I did my 604t, probably the same principal, I had to make sure my interface had a -static- IP in the range the adam2 is in and the gateway was the adam2 IP otherwize it wouldn't connect.

Re: OpenWRT on D-link DSL-524t

Wipster wrote:

When I did my 604t, probably the same principal, I had to make sure my interface had a -static- IP in the range the adam2 is in and the gateway was the adam2 IP otherwize it wouldn't connect.

That worked, i got the bin file in my router but when i reboot it and set my computers ip to 192.168.1.2 and gateway to 192.168.1.1 i cant connect to the router with telnet.

5 (edited by Wipster 2009-04-21 22:08:48)

Re: OpenWRT on D-link DSL-524t

Ok, does the router fire up and eject anything on serial?  I have my partitions set to

mtd0    0x90010000 + OFFSET,0x903f0000
mtd1    0x90010000,0x90010000 + OFFSET
mtd2    0x90000000,0x90010000
mtd3    0x903f0000,0x90400000
mtd4    0x90010000,0x903f0000

Where offset is the location of the string 'hsqs' in the binary, just throwing ideas out - could be why its not booting when you reboot it from flashing walk off and make a cup of tea while it sets its self up, have a look at http://oldwiki.openwrt.org/OpenWrtDocs(2f)Hardware(2f)D(2d)Link(2f)DSL(2d)G604T.html

6 (edited by Ncl8 2009-04-24 20:48:16)

Re: OpenWRT on D-link DSL-524t

>ftp 5.8.8.8
Connected to 5.8.8.8.
220 ADAM2 FTP Server ready.
User (5.8.8.8:(none)): adam2
331 Password required for adam2.
Password:
230 User adam2 successfully logged in.
ftp> quote "MEDIA FLSH"
200 Media set to FLSH.
ftp> binary
200 Type set to I.
ftp> debug
Debugging On .
ftp> hash
Hash mark printing On  ftp: (2048 bytes/hash mark) .
ftp> put "openwrt-ar7-squashfs.bin" "openwrt-ar7-squashfs.bin mtd4"
---> PORT 5,8,8,9,193,181
200 Port command successful.
---> STOR openwrt-ar7-squashfs.bin mtd4
Connection closed by remote host.
ftp>

For some reason i get disconnected from the router  before the upload even begins.

Re: OpenWRT on D-link DSL-524t

Ncl8 wrote:

>ftp 5.8.8.8
Connected to 5.8.8.8.
220 ADAM2 FTP Server ready.
User (5.8.8.8:(none)): adam2
331 Password required for adam2.
Password:
230 User adam2 successfully logged in.
ftp> quote "MEDIA FLSH"
200 Media set to FLSH.
ftp> binary
200 Type set to I.
ftp> debug
Debugging On .
ftp> hash
Hash mark printing On  ftp: (2048 bytes/hash mark) .
ftp> put "openwrt-ar7-squashfs.bin" "openwrt-ar7-squashfs.bin mtd4"
---> PORT 5,8,8,9,193,181
200 Port command successful.
---> STOR openwrt-ar7-squashfs.bin mtd4
Connection closed by remote host.
ftp>

For some reason i get disconnected from the router  before the upload even begins.

The solution under Windows XP Pro SP3 :
Just add a REG_DWORD value named TcpMaxDataRetransmissions with a value of 40 (Hexadecimal).

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\TcpMaxDataRetransmissions

Sincerely.

Re: OpenWRT on D-link DSL-524t

OMG THANK YOU!

I spent days bumbling around trying to find an answer

The solution under Windows XP Pro SP3 :
Just add a REG_DWORD value named TcpMaxDataRetransmissions with a value of 40 (Hexadecimal).

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\TcpMaxDataRetransmissions

Finally I can flash these D-Link routers

How can this tidbit get into the Wiki for the Dlink DSL 5xxT G604T etc routers?

Re: OpenWRT on D-link DSL-524t

already documented for linux host when flashing
https://forum.openwrt.org/viewtopic.php?pid=118745#p118745

OpenWRT trunk r27772 @ SX763
OpenWRT backfire 10.03 @ DSL-G684T

Re: OpenWRT on D-link DSL-524t

Jaymax I want you thank so much! I had same problem like Ncl8, so its fantastic to see open wrt sreen now!
smile