RouterTech 2.97 bugs in setting up LAN.

All about firmwares for routers. Support for RouterTech firmwares is here too.
Post Reply
Posts: 2
Joined: Thu Feb 16, 2017 10:37 am

RouterTech 2.97 bugs in setting up LAN.

Post by linuxking » Wed Nov 14, 2018 9:45 am

I'm trying to set up a D-Link 524T (ESL524TEU.A1G ) as a router tech router, but am having set-up problems with the the LAN in firmware 2.97
I've plugged an ethernet cable from my computer into LAN Ethernet#1 on the back of the modem.
The modem is configured to come up as via ADAM2 bootloader.
I can web-browse to, and enter USER: Admin PASSWORD: Admin

In the Routertech menus, Setup->Lan Configuration, shows Ethernet, Ethernet2, Ethernet3 and Ethernet4 in "LAN group 1."
I can successfully remove Ethernet2,3,4 from "LAN group 1" without any problems.
The firmware also warns me that I can not remove Ethernet without a number ... I assume that's Ethernet port 1; which is the port the cable is plugged into.

However, when I try to add Ethernet2,3,4 to to another LAN group, the modem stops working and I can no longer ping
This appears to be a bug in the router-tech firmware.

How can I work around this problem?

Background information (and) how I flashed the modem after a lot of pain:
I bought the modem used, because the DSL driver is open source; and these modems are very common in Canada and Europe, so that I can buy them cheap.
I want the modem to either run as a pure router for a XFINITY cable modem, or else as a router for a DSL connection.
Right now, the cable modem is cheaper ... so I need to have the D-Link act as a gateway, firewall, DNSMASQ DNS server, DHCP server, and NAT for the ethernet ports #2..4.
The internet is found by running a DHCP client on Ethernet port #1 , to get the DNS upstream servers and dynamic IP address from a motorola cable modem.

I read all the routertech forum threads on this particular modem, and it should be able to do the task.
I found the two defective 100uF 25V capacitors in the DSL-524T mentioned in several threads; they were right next to the Ethernet switch chip (Infineon ADM6996M).
I replaced them and the ping response time of the modem improved dramatically, even when the modem was hot.

Flashing the modem was difficult.
I use Linux and don't have wine/windows, so I had to find the information on the modem by hand and use the ADAM2 FTP bootloader to flash the modem.
I determined that the modem has 4M Flash, so I downloaded: RouterTech_3.6.0D_20120130_2.97 (Adam2-4mb-flash; 20120130225053)
I set up my gentoo linux computer to talk to the DSL-524T modem:

ip address add dev enp1s0

I then followed the instructions on other threads to flash the image using FTP.

The new firmware refused to run after dozens of tries (I bricked the modem), and I finally figured out that defragmenting of the configuration memory wasn't happening because the routertech firmware wasn't booting.
The only way I could guess that would defragment the environment variables, was to manually delete all variables using Adam2, and then re-instantiate them.
There is no documented way to list all existing variables via the FTP/ADAM2 interface, and the telnet port was bricked.
So, I found a list of all common varaibles in Adam2. ( )

The bugs in FTP clients on linux vs. ADAM 2 bootloader were severe. Debricking the modem while using an FTP was impossible as many of the response messages weren't printed correctly.
Using netcat to enter RAW FTP/ADAM2 commands for the DSL-245T was easier after a factory reset. That allowed me to see the responses properly.
I wrote down the variable values that my modem had by default, and then had a friend with windows run a scan on the firmware to get proper mtd0..4 address ranges.
So, you should check your default values by doing GETENV before setting them, as your values might differ ... esp: bootloaderVersion, firstfreeaddress, and mac_ap, maca can be found on the sticker of your modem.

nc 21 # The modem factory reset went to on my modem. Weird. To defragment variables, I did:

Code: Select all

USER adam2
PASS adam2
UNSETENV autoload
UNSETENV autoload_timeout
UNSETENV bootloaderVerson
UNSETENV bootserport
UNSETENV cpufrequency
UNSETENV firstfreeaddress
UNSETENV flashsize
UNSETENV memsize
UNSETENV modetty0,38400,n,8,1,hw
UNSETENV modetty1,38400,n,8,1,hw
UNSETENV my_ipaddress
UNSETENV req_fullrate_freq
UNSETENV SerialNumber
UNSETENV StaticBuffer
UNSETENV sysfrequency
UNSETENV usb_board_mac
UNSETENV usb_man
UNSETENV usb_pid
UNSETENV usb_rndis_mac
UNSETENV usb_vid
UNSETENV vcc_encaps0
UNSETENV vcc_encaps1
UNSETENV vcc_encaps2
UNSETENV vcc_encaps3
UNSETENV vcc_encaps4
UNSETENV vcc_encaps5
UNSETENV vcc_encaps6
UNSETENV vcc_encaps7
SETENV autoload,1
SETENV autoload_timeout,7
SETENV bootloaderVerson,0.22.02
SETENV bootserport,tty0
SETENV cpufrequency,150000000
SETENV firstfreeaddress,0x9401d888
SETENV flashsize,0x00400000
SETENV HWRevision,Unknown
SETENV mac_ap,00:E0:A0:A6:66:6F
SETENV maca,00:E0:A0:A6:66:70
SETENV memsize,0x01000000
SETENV modetty0,38400,n,8,1,hw
SETENV modetty1,38400,n,8,1,hw
SETENV mtd0,0x9008E000,0x903F0000
SETENV mtd1,0x90010090,0x9008E000
SETENV mtd2,0x90000000,0x90010000
SETENV mtd3,0x903F0000,0x90400000
SETENV mtd4,0x90010000,0x903F0000
SETENV my_ipaddress,
SETENV prompt,Adam2_AR7RD
SETENV req_fullrate_freq,125000000
SETENV SerialNumber,none
SETENV sysfrequency,125000000
I pinged until the modem showed up.... Then I ran an FTP client to upload the firmware:
FTP -n

Code: Select all

quote USER adam2
quote PASS adam2
put /tmp/Routertech*.img "fw mtd4"
noop  # Do nothing, this line does not matter.... but you need to wait until the "put" finishes before rebooting.
quote REBOOT
And that's all I had to do.
I pinged until the modem showed up, and then I browsed to in my web browser.
Post Reply