Topic: Latest version and procedure for D-Link DSL-504T

Hello, I'm newbie with OpenWRT.
I'm looking for the way to install the OpenWRT firmware to this router model, but the information organisation in the openwrt.org web puts me this a little difficult to find the tutorial and the binary I need.

In different "supported hardware" lists I've found the 504T model (with external links), but in other pages found a tutorial for a (compatible?) 524T model:
http://wiki.openwrt.org/toh/d-link/dsl-524t

For AR7 chipset I find OpenWRT v10.03
http://downloads.openwrt.org/backfire/10.03/ar7/

And also OpenWRT v8.09.2
http://downloads.openwrt.org/kamikaze/8.09.2/ar7/

..but there I don't see any file with words "dlink" or "504t".
Which one I need to choose?

Thanks.

Re: Latest version and procedure for D-Link DSL-504T

These are the forum threads I've found about D-Link DSL-504T:
https://forum.openwrt.org/viewtopic.php?id=5141 (compiling)
https://forum.openwrt.org/viewtopic.php?id=18799 (catching ADAM2)
https://forum.openwrt.org/viewtopic.php?id=18166 (compiling and reflashing)
https://forum.openwrt.org/viewtopic.php?id=21678 (old binaries)
https://forum.openwrt.org/viewtopic.php?pid=106709 (compiling)

Wiki page found for other similar model (D-Link DSL-502T):
http://wiki.openwrt.org/oldwiki/openwrtdocs/hardware/d_link/dsl_502t

Other:
http://ziofork.altervista.org/appunti/openwrt_su_d-link_dsl-504t (compiling from SVN)

And a question: can I just flash a file taken from this directory?:
http://downloads.openwrt.org/backfire/10.03/ar7/

Re: Latest version and procedure for D-Link DSL-504T

narcisgarcia wrote:

I'm looking for the way to install the OpenWRT firmware to this router model, but the information organisation in the openwrt.org web puts me this a little difficult to find the tutorial and the binary I need.

Unfortunately the pages transferred from the old wiki are full of old informations and outdated bugs and procedures. We're in the process of creating new pages for the new table of hardware, but the testers for these routers are rare.

To the best of my knowledge, it should be pretty similar to the 524T. Just keep a copy the original firmware (and the original partitioning layout) at hand if anything goes wrong.

narcisgarcia wrote:

And a question: can I just flash a file taken from this directory?:
http://downloads.openwrt.org/backfire/10.03/ar7/

The generic AR7 squashfs should work. You'll need to set the new partitions before flashing, though. It's a little tricky but the 524T guide should be useful.

Let us know how it goes, the other DSL-5xx pages need updates for the recent releases. It would be great to create a unified guide to the 5xx family in the wiki, but I don't have other routers to test except for my 524.

Re: Latest version and procedure for D-Link DSL-504T

At this moment I'm handling 3 routers of this model (504T), and have more around.

One note:
- On some factory firmware versions, the telnet login is "root" instead of the web login.

And one question:
I've found my_ipaddress    10.8.8.8 , but it doesn't respond to ping setting the computer to 10.8.8.1 with any of these masks:
255.0.0.0
255.255.0.0
255.255.255.0
(with the last one I've also tried to connect FTP unsuccessful)

What am I doing wrong?

Re: Latest version and procedure for D-Link DSL-504T

Ok, I've found that is needed to connect with FTP client only in the first seconds of router boot.
It seems that if you try to login with FTP, then the router doesn't start all the firmware (the status led remains off and the ADAM2 FTP server waits login), and if you want normal operation then the router must be restarted again.

Other informations detected for (some?) 504T:

- The username and password can be lowcase (adam2 adam2)
- in GNU/Linux the lftp tool is the one to manage right the remote commands and responses:

lftp ftp://adam2:adam2@10.8.8.8

After this, I pick the information for the 5 partitions:

mtd0                  0x900a0000,0x903f0000   
mtd1                  0x90010000,0x900a0000   
mtd2                  0x90000000,0x90010000   
mtd3                  0x903f0000,0x90400000   
mtd4                  environment variable not set.

Which match with ZioFork tutorial.
One problem to transfer the new firmware is that when changing of FTP client (bye "lftp" and enter "ftp"), ADAM2 server doesn't accept a second FTP client connection. I needed to reboot the router to have FTP access again, and I've run again the two last commands:

quote "SETENV modulation MMODE"
quote "SETENV autoload 1"
quote "SETENV mtd4,0x90010000,0x903f0000"

But I'm at this point: the new firmware image isn't transferred entirely for me. At the first try I've transferred 2.4MiB (of the total 2.6MiB), and at all the next tries only 16KiB are transferred. Here the log of each try:

$ ftp 10.8.8.8
Connected to 10.8.8.8.
220 ADAM2 FTP Server ready.
Name (10.8.8.8:narcisg): adam2
331 Password required for adam2.
Password:
230 User adam2 successfully logged in.
Remote system type is UNIX.
ftp> quote "SETENV modulation MMODE"
200 SETENV command successful
ftp> quote "SETENV autoload 1"
200 SETENV command successful
ftp> quote "SETENV mtd4,0x90010000,0x903f0000"
200 SETENV command successful
ftp> quote "MEDIA FLSH"
200 Media set to FLSH.
ftp> bin
200 Type set to I.
ftp> debug
Debugging on (debug=1).
ftp> hash
Hash mark printing on (1024 bytes/hash mark).
ftp> put "openwrt-ar7-squashfs.bin" "OpenWRT mtd4"
local: openwrt-ar7-squashfs.bin remote: OpenWRT mtd4
ftp: setsockopt (ignored): Permission denied
---> PORT 10,8,8,1,229,152
200 Port command successful.
---> STOR OpenWRT mtd4
150 Opening BINARY mode data connection for file transfer.
########

ADAM2 is still accessible with the flashing procedure, but in normal boot the status led doesn't bright again.

6 (edited by ath 2010-05-19 22:19:10)

Re: Latest version and procedure for D-Link DSL-504T

narcisgarcia wrote:

At this moment I'm handling 3 routers of this model (504T), and have more around.

Great to hear. AR7 devices are becoming difficult to find nowadays, that's a shame as they work almost perfectly with OpenWrt. I wonder what I'll do once I won't find them anymore on eBay wink

narcisgarcia wrote:

Other informations detected for (some?) 504T:

Thanks, I'll take a look at updating the wiki pages. As for lftp/ftp, I've noticed that ADAM2 seems picky about the client it's talking to. I've had the most luck with netkit-ftp (with the root workaround described below).

narcisgarcia wrote:

But I'm at this point: the new firmware image isn't transferred entirely for me. At the first try I've transferred 2.4MiB (of the total 2.6MiB), and at all the next tries only 16KiB are transferred.
...
ftp: setsockopt (ignored): Permission denied

Are you using a (somewhat) recent Linux kernel? I've noticed a similar behaviour - the connection slows down considerably and seems to be stuck. Older kernels and OSes aren't affected. It has something to do with retransmission timeouts, but I haven't been able to track it down.

Try running the ftp client as root to avoid the "Permission denied" error, that way it should pick different timeouts and work better.

Re: Latest version and procedure for D-Link DSL-504T

Successful.
I was using Ubuntu GNU/Linux 9.10 (kernel 2.6.31-21) and I've run this command before any FTP action:

sudo -i

This has solved the transmission issue. Used the default "ftp" command line tool. After the transmission, sent this command with the FTP client:

quote "REBOOT"

...and after several seconds the router has "status" led blinking. LuCI web interface available in http://192.168.1.1/ and default login reached with user "root" and password "admin". I see the router with OpenWRT listens SSH, but unknown username&password to login.

One small-big pending question I see for tutorial: the procedure to backup the previous firmware before all the process.

8 (edited by ath 2010-05-20 22:09:12)

Re: Latest version and procedure for D-Link DSL-504T

narcisgarcia wrote:

Successful.

That's great! I'll update the 504T page later this week, then. Did you manage to connect it to an ADSL line? (I don't remember exactly but the DSL driver probably isn't included in the default AR7 images).

narcisgarcia wrote:

I see the router with OpenWRT listens SSH, but unknown username&password to login.

You'll probably need to login with telnet for the first time and then change the password for root to enable SSH access.

narcisgarcia wrote:

One small-big pending question I see for tutorial: the procedure to backup the previous firmware before all the process.

I haven't tried, but it might be possible to backup the original firmware using the RETR ftp command at the ADAM2 prompt, in the same way the STOR command is used to reflash the unit.

Re: Latest version and procedure for D-Link DSL-504T

About SSH access: (this) LuCI doesn't respond to telnet.

Re: Latest version and procedure for D-Link DSL-504T

Firmware restore procedure in spanish:
http://www.adslzone.net/postt11770.html

11

Re: Latest version and procedure for D-Link DSL-504T

Hi folks,

    Thank you for this discussion -- under the advice from their ISP, someone I know flashed their 504T to the latest available dlink firmware to overcome some issue, and of course they did what's always possible to do for the uninitiated -- they downloaded & flashed the firmware from a rev C (GenII) 504T into a rev A model and effectively lobotomized the thing. Thanks to information here and some more pearls of wisdom from http://mcmcc.bat.ru/dlinkt/FW_dsl-xxxt_README.eng.txt I've been able to get the 504T conscious again using the openwrt-ar7-squashfs.bin image.
                                    Kudos to all!