Upgrade a D-Link DSL-G624T without ethernet working!

All about firmwares for routers. Support for RouterTech firmwares is here too.
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: Upgrade a D-Link DSL-G624T without ethernet working!

Post by thechief » Thu Jun 12, 2014 5:16 pm

Which firmware version did you upgrade to?
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.
blueberry
Novice
Novice
Posts: 21
Joined: Thu Oct 31, 2013 8:43 am

Re: Upgrade a D-Link DSL-G624T without ethernet working!

Post by blueberry » Fri Jun 13, 2014 1:50 pm

routertech-ar7wrd-adam2-firmware-4ports-20120130
Standard 4-port wireless (Adam2 bootloader). Suitable for the original Solwise SAR600EW series, DLink G604T/G624T, and other 4-port ADAM2-based AR7WRD routers using the TNETW1130 wireless chip
blueberry
Novice
Novice
Posts: 21
Joined: Thu Oct 31, 2013 8:43 am

Re: Upgrade a D-Link DSL-G624T without ethernet working!

Post by blueberry » Fri Jun 13, 2014 4:50 pm

In a short lapse of time in which one port worked, I succeeded to re-set up access and wireless settings :D

I tried to write in the led.conf box g624t, g604t - that would be very similar - and finally generic via telnet shell. But leds remain in a brick. I try to overwrite via telnet the led.conf file with the one I have bakup

Code: Select all

~ # cat /var/led.conf > etc/led.conf
-sh: can't create etc/led.conf: Read-only file system
How can I try to overwrite?

When I reboot the router the web interface is loading to infinite - even after pressing save button for RT Configurations, i.e. leds. For precaution I wait for 3 minutes. Then log out. Settings seem saved. How can I solve this?

As before, ports are resuscitated only through wget and # ./adm6996-tool-static 0x1 0x8000, for each power down.
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: Upgrade a D-Link DSL-G624T without ethernet working!

Post by thechief » Fri Jun 13, 2014 5:44 pm

blueberry wrote:In a short lapse of time in which one port worked, I succeeded to re-set up access and wireless settings :D
Congratulations!
blueberry wrote:I tried to write in the led.conf box g624t, g604t - that would be very similar - and finally generic via telnet shell. But leds remain in a brick. I try to overwrite via telnet the led.conf file with the one I have bakup

Code: Select all

~ # cat /var/led.conf > etc/led.conf
-sh: can't create etc/led.conf: Read-only file system
How can I try to overwrite?
You can't. It is a read-only file system.
blueberry wrote:When I reboot the router the web interface is loading to infinite - even after pressing save button for RT Configurations, i.e. leds. For precaution I wait for 3 minutes. Then log out. Settings seem saved. How can I solve this?
Something is awaiting a time out. Check the system log. Did you do a factory reset before and after upgrading?
blueberry wrote:As before, ports are resuscitated only through wget and # ./adm6996-tool-static 0x1 0x8000, for each power down.
Search the docs for "autoexec" and "minix".
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.
blueberry
Novice
Novice
Posts: 21
Joined: Thu Oct 31, 2013 8:43 am

Re: Upgrade a D-Link DSL-G624T without ethernet working!

Post by blueberry » Sat Jun 14, 2014 11:10 pm

In the previous system log the only recent line was

Code: Select all

onconnectWAN: cron has been disabled in the bootloader environment.
Is a timeout wait deducible from this event?
Now the reboot causes the center frame to "The page is not available" default browser page, but if I click on a web interface section the login page appears. Is this the correct behavior?
thechief wrote:Did you do a factory reset before and after upgrading?
Yes, I remembered this warnings!

I need to resume :scratch: Correct me if I will be wrong.
• The only way to keep files stable in the router is write it into \nvram folder
• For uploading or downloading a file is necessary to use SFTP or FTP through shell only (?) - I tried through WinSCP, but login gives an error...
• For executing a command (i.e. a minix partition mount) at every boot I have to use RT_init_cmd_x mount [...] / RT_init_cmd_x makemtd.sh [...] and manually shutdown the router, or normally use mount [...] / makemtd.sh [...] but use a /var/tmp/onclose.sh script with umount /nvram / detachfs and shutting down through shutdown / System > Shutdown Router

After shutdown or System > Shutdown Router do I have to detaching the plug (I have no power button) to complete the power off?
When I have upgraded I considered the RTech_AR7WRD_config.img the file of default settings only. So I thought to load it after single-image, or not to load at all. I'm right, or I would had to load config first?
faq.htm wrote:Be sure to not try to create a new partition that is bigger than the available flash space, or you will trash your router.
What command can I use to manage memory space? I found router-info but it don't return free space.
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: Upgrade a D-Link DSL-G624T without ethernet working!

Post by thechief » Sun Jun 15, 2014 6:51 pm

Clear your browser cache.
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.
blueberry
Novice
Novice
Posts: 21
Joined: Thu Oct 31, 2013 8:43 am

Re: Upgrade a D-Link DSL-G624T without ethernet working!

Post by blueberry » Thu Jun 19, 2014 9:06 am

After checking free space through memavail, I have created a minix partition

Code: Select all

~ # makemtd.sh mtd5 448
~ # mkfs.minix /dev/mtdblock/5
[...]
~ # mkfs.minix /dev/mtdblock/5
160 inodes
448 blocks
Firstdatazone=9 (9)
Zonesize=1024
Maxsize=268966912
I've mounted it

Code: Select all

~ # mount -t minix /dev/mtdblock/5 /nvram
I've written the files ar7wrd_led.conf and adm6996-tool-static into this partition - I discovered another led configuration file form DSL-G624T source code. I set permits to these files with chmod a+x.
Then I flushed to make files persistent to manually shutting down the ruouter

Code: Select all

~ # flush
Looking for mounted minix filesystems
minix filesystem found. Flushing "/dev/mtdblock/5" at mountpoint "/nvram" ... Done.
Looking for mounted smbfs filesystems
Looking for mounted cifs filesystems
So I set this variables

Code: Select all

~ # setenv RT_init_mount1 "mount -t minix /dev/mtdblock/5 /nvram"
Setting bootloader environment variable: "RT_init_mount1" to "mount -t minix /dev/mtdblock/5 /nvram"
~ # setenv led_conf /nvram/ar7wrd_led.conf
Setting bootloader environment variable: "led_conf" to "/nvram/ar7wrd_led.conf"
~ # setenv RT_init_ports1 "/nvram/adm6996-tool-static 0x7 0x8000 && /nvram/adm6996-tool-static 0x5 0x8000 && /nvram/adm6996-tool-static 0x3 0x8000 && /nvram/adm6996-tool-static 0x1 0x8000"
Setting bootloader environment variable: "RT_init_ports1" to "/nvram/adm6996-tool-static 0x7 0x8000 && /nvram/adm6996-tool-static 0x5 0x8000 && /nvram/adm6996-tool-static 0x3 0x8000 && /nvram/adm6996-tool-static 0x1 0x8000"
I rebooted. The leds now blink differently, but ethernet ones not correctly :(
The ports init variable have no effect! I tried to change the approach using setenv autoexec.sh "wget http://[...]/adm6996-tool-static && chmod a+x adm6996-tool-static && ./adm6996-tool-static 0x7 0x8000 && ./adm6996-tool-static 0x5 0x8000 && ./adm6996-tool-static 0x3 0x8000 && ./adm6996-tool-static 0x1 0x8000", but nothing changed.
When I attempt to run manually ports commands with adm tool (in /nvram or downloaded) the shell returns

Code: Select all

User defined signal 1
with no changes on effective ports working :|
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: Upgrade a D-Link DSL-G624T without ethernet working!

Post by thechief » Thu Jun 19, 2014 2:43 pm

You've certainly been busy! :-)

1. led.conf: it is not always enough to find an LED file with a particular name; sometimes there are settings that are bound to the kernel code or DSP/tiatm drivers in a way that all signals will not operate the same way. Your best bet is to try a few of the existing led files (tip - look in the /etc/ directory). Also, if the ethernet ports/switch are malfunctioning anyway, don't expect the leds to work correctly.

2. ports: if a command does not work from the command line, it won't work in a script either; it may well be that the ports are truly dying, and that, eventually, nothing you do will resuscitate them. Also, before you try running the command manually, you might first want to switch the router off (unplug the power cable after shutting down), and wait for a few minutes (to ensure that everything is indeed fully powered down). Then you can be sure that whatever you are trying is not being affected by what you did before.

By the way, instead of having a very long "RT_init_" line for the port reset commands (there are limits to the length of environment variables), you might want to put them in a shell script (with unix line endings, and executable bit set), and copy that script to /nvram/startup.sh. That will be executed automatically towards the end of the boot process. And you might also want to leave your adm6996 tool in /nvram/ and give it a shorter name ;-)
/nvram/startup.sh wrote: #!/bin/sh
. /usr/local/bin/rt_utils.sh # for LOG_MSG()
LOG_MSG "Started resetting the ethernet ports"
/nvram/adm6996 0x1 0x8000 #lan port 4
/nvram/adm6996 0x3 0x8000 #lan port 3
/nvram/adm6996 0x5 0x8000 #lan port 2
/nvram/adm6996 0x7 0x8000 #lan port 1
LOG_MSG "Finished resetting the ethernet ports"
The LOG_MSG commands let you know where to look in the system log for any errors that may have been logged during the port resets.
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.
blueberry
Novice
Novice
Posts: 21
Joined: Thu Oct 31, 2013 8:43 am

Re: Upgrade a D-Link DSL-G624T without ethernet working!

Post by blueberry » Sat Jul 05, 2014 10:32 pm

thechief wrote:ports: if a command does not work from the command line, it won't work in a script either
The point was that before creating the new minix partition the command with adm6996-tool worked well.
Then I discovered the problem: though the files appeared, the space in partition was lower than sum of file sizes. With the procedure's backup files I removed the partition. Then, after a check with memavail, I recreated a bigger one, manually. But at the time of rebooting the router stucks!

I had to flash inside it the original firmware with a Tiupgrade reassembled by me, through the blinking functional port. If a port goes down for a moment you don't will lose the connection! :D Then I reupgraded to RouterTech.
I tried another two times with a smaller partition size, and with auto_minix approach, but however a stuck came - I waited for more than 30 minutes before.

The partition creating seems working no more! Can I do something for fix this, or for working without them?
Attachments
D-Link_ DSL-G624T_ backup.zip
Includes mtds and default generic environment. Extra: dumpall after factory default firmware flashing
(33.19 KiB) Downloaded 544 times
D-Link_DSL-G624T_V3.02B01T02.EU-A.20061124_Tiupgrade.zip
Tiupgrade (archive form) of 2007 factory default firmware for DSL-G624T
(3.26 MiB) Downloaded 513 times
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: Upgrade a D-Link DSL-G624T without ethernet working!

Post by thechief » Sun Jul 06, 2014 2:26 pm

User error. Memavail has nothing to do with partition sizes. All it reports is RAM, not flash storage.
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.
blueberry
Novice
Novice
Posts: 21
Joined: Thu Oct 31, 2013 8:43 am

Re: Upgrade a D-Link DSL-G624T without ethernet working!

Post by blueberry » Sun Jul 06, 2014 3:15 pm

Ok for memavail. So the only way to infer free memory is from firmware image and flash size (4 - 3,19)? I haven't found any command else.
In the first attempt the minix partition was created, and it was large. In successive attempts I always tried with a smaller size and there was a crash. How it could be possible?
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: Upgrade a D-Link DSL-G624T without ethernet working!

Post by thechief » Sun Jul 06, 2014 4:46 pm

Exactly how did you try with a smaller size?
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.
blueberry
Novice
Novice
Posts: 21
Joined: Thu Oct 31, 2013 8:43 am

Re: Upgrade a D-Link DSL-G624T without ethernet working!

Post by blueberry » Mon Jul 07, 2014 2:38 pm

First time, I manually created the minix partition makemtd.sh mtd5 832
reboot the router
convert it to minix mkfs.minix /dev/mtdblock/5
mount it mount -t minix /dev/mtdblock/5 /nvram
The partition works, but the adm tool and the script not! The files in partitions seemed to exceed partition size. I remove it (with backup scripts of partition creation procedure).

Second time, I created the partition with makemtd.sh mtd5 768 auto_minix
It would have to put into it adm6996-tool and startup.sh only. But at /sbin/reboot the router stucks. Flash of default factory firmware-Upgrade to RouterTech

Third time, I used makemtd.sh mtd5 704 auto_minix
At /sbin/reboot the router stucks again.
Flash of default factory firmware-Upgrade to RouterTech, and now I'm here.

Could the fails to create a partition be caused by really numerous flashing attempts I had to do for every Flash-Upgrate step? I often get EAccess Violation error.
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: Upgrade a D-Link DSL-G624T without ethernet working!

Post by thechief » Mon Jul 07, 2014 5:51 pm

1. You must always restore the standard partitions and reboot the router, before trying to create new minix partitions
2. Doing this too many times risks disk corruption
3. If you run makemtd.sh without any parameters, you will see the usage information - and that it contains the following warning: "For a wireless router, you should NEVER exceed 448kb".

At this point, who knows the current state of the flash chip? You would be well advised to flash the RouterTech firmware again (that process will erase the flash chip before writing the firmware). Then you can create your minix partition again, and, this time, do NOT exceed 448kb.
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.
blueberry
Novice
Novice
Posts: 21
Joined: Thu Oct 31, 2013 8:43 am

Re: Upgrade a D-Link DSL-G624T without ethernet working!

Post by blueberry » Fri Jul 11, 2014 3:50 pm

1. I did it
thechief wrote:You must always restore the standard partitions and reboot the router, before trying to create new minix partitions
blueberry wrote:I remove it (with backup scripts of partition creation procedure).
In succeeding attempts the partitions are restored beacause I re-put the RouterTech firmware.
2. Is what I supposed in my last question :|
3.
thechief wrote:If you run makemtd.sh without any parameters, you will see the usage information - and that it contains the following warning: "For a wireless router, you should NEVER exceed 448kb".
After reading the whole faq-features-history-readme files I didn't think to run that without any parameters for further indications :shock:
However ok, but the problem is that adm6996-tool and the startup.sh script spend 692 kB yet!
To staying into 448 kB, could I use the only startup.sh, like this

Code: Select all

#!/bin/sh
wget http://[...]/adm6996
chmod a+x adm6996
. /usr/local/bin/rt_utils.sh # for LOG_MSG()
LOG_MSG "Started resetting the ethernet ports"
/nvram/adm6996 0x1 0x8000 #lan port 4
/nvram/adm6996 0x3 0x8000 #lan port 3
/nvram/adm6996 0x5 0x8000 #lan port 2
/nvram/adm6996 0x7 0x8000 #lan port 1
LOG_MSG "Finished resetting the ethernet ports"
?
If not do I have to use the router with ports working under manually (command) start only?
Post Reply