DSL-2640T updated like a charm

Support forum for routers of all shapes and sizes. As long as it's router based and doesn't fall into the other categories, this is the place to ask your questions.
Post Reply
MHAQS
Regular
Regular
Posts: 64
Joined: Fri Sep 19, 2008 12:24 pm
Contact:

DSL-2640T updated like a charm

Post by MHAQS » Fri Sep 19, 2008 6:19 pm

Update: I receive many emails from people who are trying to update their DSL-2640T with Routertech firmware after looking at this thread. I must update here that the Routertech team has declared this router as "incompatible" with their wireless PSP firmware. If you're still going to update to this firmware, either know what you're doing and ask reasonable questions, or you're on your own.


Hey Everyone,

I just arrived here today and I updated my DSL-2640T to RouterTech firmware. Everything is up and running fine, apart from the only thing I'd like to get some views on; my status LED is not blinking :P, and although, I matched my original ledconf and routertech's ledconf, the status light just seems to stay dead.

I can provide you guys with some specific info on my procedure, if you like, so that it is enlisted as a supported router. But if not, then I will post a very simple friendly tutorial here on updating a DSL-2640T router to RouterTech firmware. Thanks for the work guys.

Regards,
M.H.A.Q.S.
Last edited by MHAQS on Wed Sep 15, 2010 1:24 pm, edited 1 time in total.
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Post by thechief » Fri Sep 19, 2008 6:35 pm

Cool :). Perhaps you may wish to post here about the process that you went through. Thx.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
MHAQS
Regular
Regular
Posts: 64
Joined: Fri Sep 19, 2008 12:24 pm
Contact:

Post by MHAQS » Fri Sep 19, 2008 8:21 pm

Please see attachment. There are many commands in the tutorial I am posting, and the reason why the server won't let me post.

Mods, please see if you can help that.

Regards,
M.H.A.Q.S.
Attachments
as.rar
dsl-2640t tutorial
(3.53 KiB) Downloaded 3594 times
User avatar
Neo
RouterTech Team
RouterTech Team
Posts: 3586
Joined: Thu Jan 26, 2006 1:09 pm
Contact:

Post by Neo » Fri Sep 19, 2008 8:49 pm

Here is the tutorial from MHAQS with a space inserted to avoid the "/etc" problem:

--------------------------------------

Updating DSL-2640T to RouterTech Firmware 2.6

Before you start, please download the following tools and confirm the settings following afterwards.

1- Download RUC (Router Update Checker, available on this forum)
2- Download WEB (Wireless Environment Builder, available on this forum).
3- Download your router's latest official firmware (you should have a copy, in case this goes kaput).

Now whatever you do, don't blame me. Next open up RUC and enter your router login info, defaults are:

ip: 192.168.1.1
web user: admin
web pass: admin
telenet user: root
telnet pass: admin
no of ethernet ports: 4
router description: dlink g624T*


check all boxes at the bottom (they are there for a reason).

* You can edit the routers.txt and make an entry for DSL-2640T as follows too:

DSL-2640T 4

Once, RUC gives you a report, it should be similar to the following:

Router Upgrade Check 1.2.9 19/09/2008 09:49:15
Router IP: 192.168.1.1
CLI is needed
Description: Dlink G624T
Board type: AR7VW
Product ID: AR7WRD
Bootloader: psbl
RAM 16.0 MB
Flash (ROM) 4.0 MB
ADAM2: No
No default env: No
Linux version: 2.4.17_mvl21-malta-mips_fp_le
Firmware build:
Firmware version: V3.02B01T01.ME-A.20080125
Firmware stamp: 20080125143616
CPU: MIPS 4KEc V4.8
DSP: 6.00.04.00
Annex: A
/proc/wlan: Yes
/usr/sbin/wlan: Yes
TIAP: Yes
TNETW: Yes
Wireless: Yes
WIFI chip: TNETW1350A
WIFI chip conf: Yes
Ports: 4
Marvell (or Marvell like): No
NSP: V3.02B01T01.ME-A.20080125
Manufacturers: D-link Corporation
RNDIS: Telogy Networks Inc



Now, the things to make sure in the above log are:

Product ID or Board type: AR7WRD
Bootloader: psbl
RAM 16.0 MB
Flash (ROM) 4.0 MB
WIFI chip: TNETW1350A
Marvell (or Marvell like): No


The above settings will qualify you for a RouterTech firmware upgrade. The reason to run RUC was to backup all your settings and configurations at one place. If you have not backed-up your settings, do it now. No one will be responsible, if you do this carelessly and brick your router.

Download RouterTech firmware named:

routertech-rohs-ar7wrd-pspboot-firmware-20080723.zip

extract it to some directory and open up the upgrade.html file and DO WHAT IT SAYS.

1- back-up all your settings
a- /proc/ticfg/env
b- /proc/interrupts
c- /etc /led.conf
d- config.bin (using your router's "save config to hard disk" option in the web panel)
2- reset your router to factory default settings. reboot.
3- once the router comes back online, save all settings and reboot again.
4- open up the update firmware panel in the router's web panel; Tools->Firmware and browse to where you extracted the above zip file and select:

RouterTech_ROHS_3.7.1B_20080723_2.60_AR7WRD_psbl_firmware.upgrade.img

Now click on Apply and pray to God that you will be a happy man today. Leave the router alone for about

10 minutes. 10 MINUTES...

After ten minutes, telnet into your router again and see if it lets you log in using:

telnet 192.168.1.1

Log in using user:Admin and pass:Admin.

If the router let you log in, go to your Router's web panel and into the System panel. Click on Restore Factory Settings and Reboot. Once the router comes online. Telnet back into your router:

type

Code: Select all

[i]cat /proc/ticfg/env[/i] 
and take a look at the variables and back them up.

Next perform the following steps:

Code: Select all

[i]- setenv led_conf led.2640t && /sbin/reboot[/i]
once again, when the router comes back online. Telnet again into the router and type:

Code: Select all

[i]setenv dsp_ver dsp72A[/i]
reboot again and wait for the router to come back online. Telnet into it once again and type:

Code: Select all

[i]usb_disable.sh[/i]
reboot again and enter this command:

Code: Select all

[i]setenv vlynq_polarity low[/i]
reboot the router once again and you should have a working DSL-2640T running with everything on a custom routertech firmware. You can issue all the commands above in a single go but I say, do not mess with your router, unless you are confident of your actions.

For the people, who do not have their WLAN working, after the upgrade or even so before the upgrade, please follow the steps below:

A common issue for many people on a router exists, where the AP stays off and only comes online by using "echo NVS_TFTP_LOAD 0" > /proc/ticfg/env". However, this can create issues on the environment side and the solution itself is temporary too. The actual issue is a corrupted WLAN EEPROM, which needs to be fixed:

- Extract WEB (Wireless Environment Builder) somewhere in a directory and open it up.
- Fill up the information it asks for.
- If you do not have a TWNET ID, go to your router's system logs. They can be found in Status->SystemLog. Browse them and find the line where it says:

"Failed to get DIE ID from wlan driver. Cannot validate EEPROM Image"
....
....
"Setting bootloader env NVS_TFTP_LOAD to 1"


- Look for a string similar to this:

"Retrieving EEPROM image file nvs_5e015cf4a901151d.bin from TFTP Server"
"ERROR: TFTP of file : nvs_5e015cf4a901151d.bin failed"


- there, the string next to "nvs_" is your TWNETID i.e.5e015cf4a901151d.
- copy it the WEB and click on "get router details" or "build environmen"t. it should work and after a while, it will ask you that it can send the script directly to the router. Do so, and let the router reboot after that. You're done, once the Router comes back online, go check your environment now and marvel over the wrong settings reported by RUC, now corrected.

I hope this will help many people. Things that can help RouterTech guys enhance the firmware and tools.

RUC report for DSL-2640T before upgrade:

Router IP: 192.168.1.1
CLI is needed
Description: Dlink G624T
Board type: AR7VW
Product ID: AR7WRD
Bootloader: psbl
RAM 16.0 MB
Flash (ROM) 4.0 MB
ADAM2: No
No default env: No
Linux version: 2.4.17_mvl21-malta-mips_fp_le
Firmware build:
Firmware version: V3.02B01T01.ME-A.20080125
Firmware stamp: 20080125143616
CPU: MIPS 4KEc V4.8
DSP: 6.00.04.00
Annex: A
/proc/wlan: Yes
/usr/sbin/wlan: Yes
TIAP: Yes
TNETW: Yes
Wireless: Yes
WIFI chip: TNETW1350A
WIFI chip conf: Yes

Ports: 4
Marvell (or Marvell like): No
NSP: V3.02B01T01.ME-A.20080125
Manufacturers: D-link Corporation
RNDIS: Telogy Networks Inc
HRNDIS: Telogy Networks Inc
Warning! Core Logic (NSP) could not be read. If the Core Logic version is too low you may need to upgrade to your router manufacturer's latest firmware first.
WARNING Your router does not have a Marvell switch and so your switch may or may not be supported. Realtek and IP175C switches are supported in the TNETW1350A firmware. Your Ethernet ports may or may not function correctly with a RouterTech firmware.
Warning: The vlynq_polarity variable is missing from your environment, which may prevent the wireless part of your router from working.Try creating the variable using 'setenv vlynq_polarity high'.
/proc/interrupts
7: 408718 R4000 timer/counter [MIPS interrupt]
8: 0 unified secondary [hw0 (Avalanche Primary)]
15: 1440 serial [hw0 (Avalanche Primary)]
23: 234630 + SAR [hw0 (Avalanche Primary)]
27: 256921 + Cpmac Driver [hw0 (Avalanche Primary)]
29: 200238 vlynq0 [hw0 (Avalanche Primary)]
31: 80 + DSL [hw0 (Avalanche Primary)]
80: 200265 TNETW1150 [hw0 (Low Vlynq)]
#
/proc/modules
tiap 902760 1
tiatm 133632 1
#
logic:status/nspver
V3.02B01T01.ME-A.20080125

logic:status/has_marvell
0


RUC report for DSL-2640T after immediate upgrade:

Router IP: 192.168.1.1
Description: Dlink 2640T
Board type: AR7WRD
Product ID: AR7WRD

Bootloader: psbl
RAM 16.0 MB
Flash (ROM) 4.0 MB
ADAM2: No
No default env: No
Linux version: 2.4.17_mvl21-malta-mips_fp_le
Firmware build: RouterTech_ROHS_3.7.1B_20080723_2.60_AR7WRD_psbl
Firmware version: 3.7.1B_20080723
Firmware stamp: 20080723010941
CPU: MIPS 4KEc V4.8
DSP: 7.02.03.00
Annex: A
/proc/wlan: No
/usr/sbin/wlan: Yes
TIAP: No
TNETW: No
Wireless: Yes
WIFI chip: Not TNETW1130
WIFI chip conf: No
Ports: 4
Marvell (or Marvell like): Yes

NSP: 3.7.1B
Manufacturers: D-link Corporation
RNDIS: Telogy Networks Inc
HRNDIS: Telogy Networks Inc
WARNING
Cannot confirm the model number of the wireless chip.
The wireless access point (AP) may be disabled - ensure it is enabled and then run this program again.
/proc/wlan
-sh: cd: can't cd to /proc/wlan
/proc/modules
tiatm 137840 c0031060 96 1
avalanche_usb 65208 c0020060 96 1

logic:status/nspver
3.7.1B /usr/sbin/wlan

logic:status/has_marvell
1



RUC report for DSL-2640T(updated) after fixes, I mentioned:

Router IP: 192.168.1.1
Description: Dlink G624T
Board type: AR7WRD
Product ID: AR7WRD
Bootloader: psbl
RAM 16.0 MB
Flash (ROM) 4.0 MB
ADAM2: No
No default env: No
Linux version: 2.4.17_mvl21-malta-mips_fp_le
Firmware build: RouterTech_ROHS_3.7.1B_20080723_2.60_AR7WRD_psbl
Firmware version: 3.7.1B_20080723
Firmware stamp: 20080723010941
CPU: MIPS 4KEc V4.8
DSP: 7.02.03.00
Annex: A
/proc/wlan: Yes
/usr/sbin/wlan: Yes
TIAP: Yes
TNETW: Yes
Wireless: Yes
WIFI chip: TNETW1350A
WIFI chip conf: Yes
Ports: 4
Marvell (or Marvell like): Yes

NSP: 3.7.1B
Manufacturers: D-link Corporation
RNDIS: Telogy Networks Inc
HRNDIS: Telogy Networks Inc

/proc/interrupts
7: 61751 R4000 timer/counter [MIPS interrupt]
8: 0 unified secondary [hw0 (Avalanche Primary)]
15: 651 serial [hw0 (Avalanche Primary)]
23: 3944 + SAR [hw0 (Avalanche Primary)]
27: 2761 + Cpmac Driver [hw0 (Avalanche Primary)]
29: 1971 vlynq0 [hw0 (Avalanche Primary)]
31: 39 + DSL [hw0 (Avalanche Primary)]
80: 1971 TNETW1150 [hw0 (Low Vlynq)]

/proc/modules
tiap 900848 c004d060 96 1
tiatm 137840 c0020060 96 1

logic:status/nspver
3.7.1B /usr/sbin/wlan

logic:status/has_marvell
1



Regards,
M.H.A.Q.S.
RouterTech Team and Founding Member
Image
RouterTech Merchandise (UK)
No support via PM, please ask your questions on the forum!
mstombs
RouterTech Team
RouterTech Team
Posts: 3753
Joined: Wed Jan 10, 2007 11:54 pm

Post by mstombs » Fri Sep 19, 2008 9:02 pm

Nice guide, I hope it would be possible to avoid the wireless env corruption, maybe the vlnq polarity could be set first, so there's a challenge fot the next convert!

Routertech firmware doesn't seem to support the "status" led automatically, if you really like it flashing try the command

"Led status 2"

If you like the result this could be saved as an RT_cmd_x or autoexec function.
MHAQS
Regular
Regular
Posts: 64
Joined: Fri Sep 19, 2008 12:24 pm
Contact:

Post by MHAQS » Sat Sep 20, 2008 1:10 am

thanks. yes, i tried that but it returns the following error. I don't really care if the status LED does not work, but somehow seeing everything working fine gives me satisfaction :).

ret from LED ACTION is -1
mstombs
RouterTech Team
RouterTech Team
Posts: 3753
Joined: Wed Jan 10, 2007 11:54 pm

Post by mstombs » Sat Sep 20, 2008 9:03 am

umm, yes not critical, but I'm curious to know why "status" not working, can you check that the correct led.conf is actually mapped with

cat /etc/led.conf

The last section should configure the flashing status
Last edited by mstombs on Sat Sep 20, 2008 4:54 pm, edited 1 time in total.
MHAQS
Regular
Regular
Posts: 64
Joined: Fri Sep 19, 2008 12:24 pm
Contact:

Post by MHAQS » Sat Sep 20, 2008 4:27 pm

well, it seems i overlooked that point. Even after setting the ledconf to 2640t, it was not reflected correctly onto the actual led.conf. All lights blinking now. My 2640t is springing with life.

Thanks guys.
MHAQS
Regular
Regular
Posts: 64
Joined: Fri Sep 19, 2008 12:24 pm
Contact:

Post by MHAQS » Sun Sep 21, 2008 10:30 am

guys, i think i have one last problem. I think my env is corrupted and the reason why my AP seems to die every once in a while. Doing the method, I posted above, makes it run but it just reverts back after a couple of shutdowns.

I have been following the method in this thread Wireless off on AR7 and I think I have the same issue. I have backed up my working mtd3, my env and anything else that can be needed. I also have a clean router DSL-2640T(factory stock) that can help me get any values you will suggest.

Any ideas? I am also attaching my config.xml, env.bin and mtd3.bin in this post because I am sure my mtd3 is really messed up. My original mtd partition values for the original firmware were:

mtd0 0x900b1000,0x903e0000
mtd1 0x90020090,0x900b1000
mtd2 0x90000000,0x90010000
mtd3 0x90010000,0x90020000
mtd4 0x90020000,0x903e0000

I changed these to the follwing after upgrade to RT by using mtdcalc:

mtd0 0x900a9000,0x90400000
mtd1 0x90020090,0x900a9000
mtd2 0x90000000,0x90010000
mtd3 0x90010000,0x90020000
mtd4 0x90020000,0x90400000

Let me know, if I should revert them back to the way they were.

Regards,
M.H.A.Q.S.
Attachments
workingconfig.rar
config.xml, env.bin and mtd3.bin
(20.58 KiB) Downloaded 1036 times
mstombs
RouterTech Team
RouterTech Team
Posts: 3753
Joined: Wed Jan 10, 2007 11:54 pm

Post by mstombs » Sun Sep 21, 2008 11:06 am

The mtd are fine - the mtd0 and 1 are specific to the firmware - won't work if these are wrong.

We used to have an issue with occasional env corruption on new firmware load - but that's been fixed for a couple of revs - and its symptoms were quite different - the whole env was wiped and reset to default.

Did you have a similar problem with stock firmware?

Can you let us know what the flash chip is identified as - a Solwise 600EW 'R' reports

Code: Select all

/var # cat /proc/flashinfo
Flash type: AMD; Manufacturer=AMD.
Manufacturer_ID=0x0001; Chip_ID=0x007E; Chip_Size=0x400000; Erase_Regions=0x0002
This info is also now in RouterTech diagnostics output.
MHAQS
Regular
Regular
Posts: 64
Joined: Fri Sep 19, 2008 12:24 pm
Contact:

Post by MHAQS » Sun Sep 21, 2008 11:22 am

now that i recall, the wlan did use to stay off but it came back on once i rebooted it after shutdown. here's the output from the command:

Code: Select all

/var # cat /proc/flashinfo
Flash type: AMD; Manufacturer=AMD.
Manufacturer_ID=0x0001; Chip_ID=0x00F9; Chip_Size=0x400000; Erase_Regions=0x0002
I am also attaching an mtd3 backup after the wlan issue occurred today.
Attachments
mtd3.bin
corrupt mtd3
(64 KiB) Downloaded 991 times
mstombs
RouterTech Team
RouterTech Team
Posts: 3753
Joined: Wed Jan 10, 2007 11:54 pm

Post by mstombs » Sun Sep 21, 2008 12:06 pm

OK, you have a significant problem with "working_mtd3.bin" the first 10K env section is full of old/deleted duplicate settings. There is a bootloader command only accessible from serial console as far as I know 'defragenv' which might be effective.

The second mtd3 is much cleaner it looks as though it has been 'defragged'!

The flash type seems very similar - so doubt if thats the issue.
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Post by thechief » Sun Sep 21, 2008 2:24 pm

It might be possible to run "defragenv" in a script run via the pctool.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
MHAQS
Regular
Regular
Posts: 64
Joined: Fri Sep 19, 2008 12:24 pm
Contact:

Post by MHAQS » Sun Sep 21, 2008 7:42 pm

well i managed to master connecting pctool while getting this to work :). however, i might be making a complete fool of myself by telling you how i did it.

After PCTool connected, I set the modes to BINARY and FLASH. I then created a text file with just the command defragenv written in it. I browse to it from the PCTool and click run script, but i think nothing seems to happen. No messages from Pctool. Is that expected? or is it that I'm doing it the wrong way?

Any more ideas on this?
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Post by thechief » Sun Sep 21, 2008 10:23 pm

MHAQS wrote:well i managed to master connecting pctool while getting this to work :). however, i might be making a complete fool of myself by telling you how i did it.

After PCTool connected, I set the modes to BINARY and FLASH. I then created a text file with just the command defragenv written in it. I browse to it from the PCTool and click run script, but i think nothing seems to happen. No messages from Pctool. Is that expected? or is it that I'm doing it the wrong way?

Any more ideas on this?
You're making good progress to becoming a guru. :) There's nothing wrong with your procedure. You will not get any feedback from running "defragenv". But your corrupt environment should hopefully have been cleaned up a bit.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
Post Reply