PDA

Bekijk de volledige versie : ASUS WL-700gE custom firmware released - (1.0.4.2-1)



MoD
09-11-2006, 14:55
Someone has to be the first!

I would like to thank Oleg, BrainSlayer and all community who are working to improve these small but powerfull linux devil boxes:) and sharing expierence.

With support from all this knowledge I'm releasing my first ASUS WL-700gE custom firmware. It can be downloaded from http://website.wl500g.info/beta/wizard.php?brand=1&model=21&id=88 . Nothing much has been changed:

Added password protected telnet access
Added startup script

Use at you own risk.

If you get in trouble, follow these instructions: http://wl500g.info/showthread.php?t=5790

Untill now I can confirm that his http://wl500g.info/showpost.php?p=37920&postcount=3 is true.

Any comments are welcome.

MoD
09-11-2006, 15:48
according to this: http://wl500g.info/showpost.php?p=39799&postcount=20 packages should work.

MoD
09-11-2006, 16:36
use this tutorial:

http://www.dd-wrt.com/wiki/index.php/Optware

it configures /jffs as ipkg destination root, but it can also be a /shares/MYVOLUME1/MYSHARE1

d3viant
09-11-2006, 22:16
Hi MoD, just uploaded your firmware to my wl-700ge it works :D

I can now telnet into it no problem. Just having some problems downloading packages compiled for mipsel - I don't appear to be able to create directories in the / filesystem, along with not being able to find the src program!

Also, a question, if I can get the packages going (specifically after enhanced-ctorrent) and I disconnect from my telnet session, will the router carry on downloading the files in the torrent?

Thanks

d3viant

d3viant
09-11-2006, 22:38
Hmm, telnet stopped working for me :(

I got in once, and since then it just gives me permission denied - definitely correct username and password...

I even turned the router off and back on again - no luck from that

Guru
10-11-2006, 03:35
Will this firmware update my 1.0.4.6n version?
What exactly is a telnet password protection or a startup script:confused:
Sorry for the nub questions:D

MoD
10-11-2006, 06:16
Will this firmware update my 1.0.4.6n version?


You would flash a new firmware, so the answer is YES, IT WILL UPDATE YOUR FIRMWARE from 1.0.4.6n to 1.0.4.2-1.
Note that you will have bugs that ASUS had in version 1.0.4.2

The reason why I choose GPL 1.0.4.2 was that GPL_WL700gE_1042.zip has 602M of source code when GPL_WL700gE_1046.zip has only 391M. I'm not sure how much of source code is there. Definitelly there is no router startup code in directory rc.asus witch I needed to create changes that are in my release of firmware.

I guess that it is possible to use latest GPL_WL700gE_1046.zip code and take the missing code from GPL_WL700gE_1042.zip, but I'm not sure how stable would be such a firmware. I'm expecting to get some feedback from my release to decide what to do next. :) If ASUS will not prowide new code, I would use this aproach in the future.


What exactly is a telnet password protection or a startup script:confused:

telnet password protection - there is a telnet daemon running. you can get access to the router shell by using telnet. It is protected with username and password. To get access to the shell, use the same username and password that you are using to get access to the router web interface.

startup script - you can create and launch some commands when the router starts. it is something like autoexec.bat in Windows/DOS enviorment.

Plz., read this http://www.e-mail.lv/wl700ge/

MoD
10-11-2006, 06:18
Hmm, telnet stopped working for me :(

I got in once, and since then it just gives me permission denied - definitely correct username and password...

I even turned the router off and back on again - no luck from that

Weird. On startup router writes password for telnet from nvram. So the credentials are the same as for web UI. Did you try not only to restart, but also to reset the router?

MoD
10-11-2006, 06:28
Just having some problems downloading packages compiled for mipsel


According to http://wl500g.info/showpost.php?p=39799&postcount=20 packages should work.


I don't appear to be able to create directories in the / filesystem, along with not being able to find the src program!

/ is read only. To create new directory, use startup script like this:


#!/bin/sh
mkdir /shares/MYVOLUME1/MYSHARE1/opt
mount -o bind /shares/MYVOLUME1/MYSHARE1/opt /opt


Also, a question, if I can get the packages going (specifically after enhanced-ctorrent) and I disconnect from my telnet session, will the router carry on downloading the files in the torrent?

I guess so. You have to launch them as daemons. for example, to run htppd daemon, type:


httpd &

more example here: http://members.home.nl/lhspiljard/guide/Guide/DP500Serv.html#MAN_START

MoD
10-11-2006, 06:40
I'm looking for some advice on how to enable all the wl500g packages to work on wl700g. I see that wl700g sources are compiled with GLIBC.

The question is: If I'll chance configuration and compile the source with uClibc, will it help or I must do something more?

I see that dd-wrt and Oleg's firmwares are compiled with uClibc.

oleo
10-11-2006, 08:14
You do not need to change firmware from GLIBC to uclibc. Packages from http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/ should run without a problem on your custom firmware. Just create /opt and mount disk there. Install uclibc and ipkg package and that's it.
For more info see http://www.nslu2-linux.org/wiki/FAQ/Optware-uClibcBuild

IMM22
10-11-2006, 09:11
Weird. On startup router writes password for telnet from nvram. So the credentials are the same as for web UI. Did you try not only to restart, but also to reset the router?

I have that problem too...

first time it work, then stop working untill know. hace traid to make a reboot but the situation is just the same.
Its seem like the last telnet session is hanging... and don't logoff

Maybe that is apenning because hi made the firmware upgrade and reboot the router with the telnet session open :/

MoD
10-11-2006, 10:34
I have that problem too...

first time it work, then stop working untill know. hace traid to make a reboot but the situation is just the same.
Its seem like the last telnet session is hanging... and don't logoff

Maybe that is apenning because hi made the firmware upgrade and reboot the router with the telnet session open :/

I have to check this issue but maybe it just takes some time to connect to the router.

There was a message: http://wl500g.info/showpost.php?p=37920&postcount=3 saying that router sometimes has a trouble with response. It works. Just wait a little bit.

d3viant
10-11-2006, 11:04
Hmm, I don't think it's a timing issue - I waited for quite a while after logging on before trying again (12 hours) and the request for a login username is quite fast all the time. I am not at home right now - will try a router reset via the button on the back of it when I get home, but it looks like the telnet session is staying open or something...

IMM22
10-11-2006, 11:12
The problem is not the LAG
If you upload the firmware again, you have the telnet working for one time. After you logout the telnet goes away for good.

Gregoire.Favre
10-11-2006, 11:30
Great new : thank :)

Is there a patch somewhere against the original firmware ?

MoD
10-11-2006, 18:36
Hmm, I don't think it's a timing issue - I waited for quite a while after logging on before trying again (12 hours) and the request for a login username is quite fast all the time. I am not at home right now - will try a router reset via the button on the back of it when I get home, but it looks like the telnet session is staying open or something...

I'm not able to reproduce your error. Everything works for me. The only thing - I had never installed firmware 1.0.4.6.... I have no idea.

d3viant
10-11-2006, 18:45
Yes - this was a downgrade for me from the 1.0.4.6 firmware. I will try a reset on the device, and see what happens...

MoD
10-11-2006, 18:52
I just released the source of my customization: http://files.wl500g.info/asus/custom/mod/1.0.4.2-1/source.zip

1) I added two functions mkfiles() and start_startup_script() that are launched at start_misc()
2) I reconfigured busybox to enable login

d3viant
10-11-2006, 18:58
Hmm, interesting. MoD, what username do you have for your web-based session?

When I reset the router, I could telnet in using the defaults, (username admin password admin)

But when I changed the username and password combo, I can no longer logon to the router via telnet. Could there be some user/password telnet problems here?

Gregoire.Favre
10-11-2006, 19:23
I just released the source of my customization: http://files.wl500g.info/asus/custom/mod/1.0.4.2-1/source.zip

1) I added two functions mkfiles() and start_startup_script() that are launched at start_misc()
2) I reconfigured busybox to enable login

Great, many thank. Just to be sure before I download it : that's not the source, but only a patch ?

d3viant
10-11-2006, 19:28
Ha - I got it going again :)

I just typed in my name and password again in the system setup section of the web interface, then rebooted the router. Everything worked again.

For the ipkg stuff, I assume I have to obtain a binary from somewhere? Any advice on this?

MoD
10-11-2006, 19:49
Hmm, interesting. MoD, what username do you have for your web-based session?

When I reset the router, I could telnet in using the defaults, (username admin password admin)

But when I changed the username and password combo, I can no longer logon to the router via telnet. Could there be some user/password telnet problems here?

I guess that you have to restart the router because my code is launched on startup and takes the user credentials from nvram. I haven't wrote a code that changes telnet password when you change the web credentials.

MoD
10-11-2006, 19:50
Great, many thank. Just to be sure before I download it : that's not the source, but only a patch ?

these are files that are changed. just overwrite the original.

MoD
10-11-2006, 19:52
Ha - I got it going again :)

I just typed in my name and password again in the system setup section of the web interface, then rebooted the router. Everything worked again.

For the ipkg stuff, I assume I have to obtain a binary from somewhere? Any advice on this?

there is an ipkg.sh script on internet. it downloads and installs the ipkg package. I think it has to be configured. Think think think...:)!!! dont drink too much on weekends - :)

d3viant
10-11-2006, 19:58
Hmm, Ok, can't get ipkg working properly - got one installed to /shares/MYVOLUME1/MYSHARE1/opt/bin but it says ipkg: not found when I try to run it - it is definitely on my path, so not 100% sure what is happening there...

Coincidentally, is there any reason why this startup script isn't working?

#!/bin/sh
export PATH=$PATH:/shares/MYVOLUME1/MYSHARE1/opt/bin
export IPKG_CONF_DIR=/shares/MYVOLUME1/MYSHARE1/opt/etc

I have done the nvram set startup_script=/shares/MYVOLUME1/MYSHARE1/rcinit and nvram commit.

MoD
10-11-2006, 20:06
Hmm, Ok, can't get ipkg working properly - got one installed to /shares/MYVOLUME1/MYSHARE1/opt/bin but it says ipkg: not found when I try to run it - it is definitely on my path, so not 100% sure what is happening there...


this could be uclibc issue


Coincidentally, is there any reason why this startup script isn't working?

#!/bin/sh
export PATH=$PATH:/shares/MYVOLUME1/MYSHARE1/opt/bin
export IPKG_CONF_DIR=/shares/MYVOLUME1/MYSHARE1/opt/etc

I have done the nvram set startup_script=/shares/MYVOLUME1/MYSHARE1/rcinit and nvram commit.

I do not know exactly bu it coud be because of permitions and ownership. when you create file from windows workstation, the owner is guest.

I know that in telnet you can copy any script from the router to share, change the content and it will work. for example:

cp /apps/bin/rcinstall /shares/MYVOLUME1/MYSHARE1/rcinit

d3viant
10-11-2006, 20:25
Hmm, no luck with that - the rcinstall file has root.root permissions, the same as the rcinit file I created (I am sharing the drive via NFS)

It seems that the uclibc libraries are needed for ipkg to run correctly, although I am not 100% sure about this - wouldn't it complain about missing libraries instead of just saying ipkg: not found?

MoD
10-11-2006, 20:27
Hmm, no luck with that - the rcinstall file has root.root permissions, the same as the rcinit file I created (I am sharing the drive via NFS)

It seems that the uclibc libraries are needed for ipkg to run correctly, although I am not 100% sure about this - wouldn't it complain about missing libraries instead of just saying ipkg: not found?

be sure that you have linux, not windows newline code. do not use notepad. use for example notepad2.exe

d3viant
10-11-2006, 20:40
I am running from Linux, so all the rcinit files I have made have been edited using vi, so that shouldn't be the cause of the problem. What permissions and uid/gid do you have on your rcinit file to make it work - I will see if that makes any difference...

MoD
10-11-2006, 20:48
I am running from Linux, so all the rcinit files I have made have been edited using vi, so that shouldn't be the cause of the problem. What permissions and uid/gid do you have on your rcinit file to make it work - I will see if that makes any difference...

I have no more ideas. try to copy rcex or rcinstall to share folder and execute from telnet shell. does it work?

d3viant
10-11-2006, 20:56
Hmm, rcex runs ok - I just tried adding an echo into my startup rcinit script, so now it looks like:

#!/bin/sh
echo "Adding ipkg path variables"
export PATH=$PATH:/shares/MYVOLUME1/MYSHARE1/opt/bin
export IPKG_CONF_DIR=/shares/MYVOLUME1/MYSHARE1/opt/etc

It does the echo part fine when I run from within a telnet session, but the path and ipkg_conf_dir variables do not export successfully unless I run the rcinit in the single terminal way (ie . ./rcinit) Is it possible that the startup nvram runs it as ./rcinit, therefore losing any exported paths? (due to the seperate terminal session being used for the rcinit command)

MoD
10-11-2006, 21:14
Hmm, rcex runs ok - I just tried adding an echo into my startup rcinit script, so now it looks like:

#!/bin/sh
echo "Adding ipkg path variables"
export PATH=$PATH:/shares/MYVOLUME1/MYSHARE1/opt/bin
export IPKG_CONF_DIR=/shares/MYVOLUME1/MYSHARE1/opt/etc

It does the echo part fine when I run from within a telnet session, but the path and ipkg_conf_dir variables do not export successfully unless I run the rcinit in the single terminal way (ie . ./rcinit) Is it possible that the startup nvram runs it as ./rcinit, therefore losing any exported paths? (due to the seperate terminal session being used for the rcinit command)

I have not big expierence, bit I think it is not good idea to use PATH variables. instead launch from current directory.

d3viant
10-11-2006, 21:43
yes, it may be best to avoid those for the time being...

although it is probably possible to run a startup script, which contains the command to run another script (where the 2nd script sets the variables) this way, you can do it properly within the same terminal session.

Leaving that for the time being... now, onto getting ipkg going :)

MoD
10-11-2006, 21:51
yes, it may be best to avoid those for the time being...

although it is probably possible to run a startup script, which contains the command to run another script (where the 2nd script sets the variables) this way, you can do it properly within the same terminal session.

Leaving that for the time being... now, onto getting ipkg going :)

another idea - I can hardcode the seach path that will be mounted, for example /opt or /tmp/opt

d3viant
10-11-2006, 22:57
Yes - that'd work too, and save the hassle of having to set it up in a script when you flash the firmware aswell :)

MoD
11-11-2006, 17:34
Yes - that'd work too, and save the hassle of having to set it up in a script when you flash the firmware aswell :)

I'll wait till someone will not create ipkg system.;)

MoD
11-11-2006, 18:40
http://wl500g.info/showpost.php?p=34579&postcount=68

d3viant
11-11-2006, 18:47
Well, that sorts the uclibc problem, but you have to use ipkg to install the libraries according to that link - which means that ipkg can't require uclibc - otherwise you couldnt use ipkg to install uclibc...

MoD
12-11-2006, 02:06
Well, that sorts the uclibc problem, but you have to use ipkg to install the libraries according to that link - which means that ipkg can't require uclibc - otherwise you couldnt use ipkg to install uclibc...

if ipkg requires uclibc and it is not here yet you have to find glibc ipkg or compile ipkg with staticaly linked uclibc

oleo
12-11-2006, 06:57
IPK also exists in shell version. So there is no problem here. See for example in dd-wrt ipkg sources or anoncvs.handhelds.org On the other hand: If you can manually tar xvzf uclibc*.ipk then you can unpack tar xvzf data.tar.gz in it.

d3viant
12-11-2006, 11:15
Ok, I have unzipped ipkg.pak and uclibc.pak, creating an opt directory structure within my share area (ie /shares/MYVOLUME1/MYSHARE1/opt) The ipkg bin directory is on my path, however I still get ipkg: not found when trying to run it - do I need to put uclibc onto some sort of lib path? If so, what path does it need?

MoD
12-11-2006, 13:07
Ok, I have unzipped ipkg.pak and uclibc.pak, creating an opt directory structure within my share area (ie /shares/MYVOLUME1/MYSHARE1/opt) The ipkg bin directory is on my path, however I still get ipkg: not found when trying to run it - do I need to put uclibc onto some sort of lib path? If so, what path does it need?

i'm planning to release firmware with writeable /opt and /etc directories. I could even include ipkg and uclibc built in. I just need some time. I hope I figured out how todo that from studying Oleg's firwmare.

Thanks, Oleg!

MoD
12-11-2006, 13:09
If so, what path does it need?

yes, you need to include it in modules load config file.

d3viant
12-11-2006, 15:02
i'm planning to release firmware with writeable /opt and /etc directories. I could even include ipkg and uclibc built in. I just need some time. I hope I figured out how todo that from studying Oleg's firwmare.

Thanks, Oleg!

If you could do a release with ipkg and uclibc built in, that'd be great :)

The only package I am personally after is a working bittorrent client - not sure how much better enhanced-ctorrent is than normal ctorrent, but if it handles the download stability issues from the original asus firmware, then it's a definite improvement!

MoD
12-11-2006, 15:13
If you could do a release with ipkg and uclibc built in, that'd be great :)

The only package I am personally after is a working bittorrent client - not sure how much better enhanced-ctorrent is than normal ctorrent, but if it handles the download stability issues from the original asus firmware, then it's a definite improvement!

I would appreciate some help and advice in doing this:rolleyes: everybody is waiting for custom firmware. lets share what we have done so far. i see in this forum that not only me is working on this.

For example I do not know why does telnet has bad responsiveness, I do not know why shell scripts are not executed when you create them, but executes if you copy and edit from existing one.


personally I see a lot of things how to use ipkg - dp500serv for kiss DVD player, home automation, asterix pbx etc...

Mpu
12-11-2006, 15:57
The reason why I choose GPL 1.0.4.2 was that GPL_WL700gE_1042.zip has 602M of source code when GPL_WL700gE_1046.zip has only 391M. I'm not sure how much of source code is there. Definitelly there is no router startup code in directory rc.asus witch I needed to create changes that are in my release of firmware.

I guess that it is possible to use latest GPL_WL700gE_1046.zip code and take the missing code from GPL_WL700gE_1042.zip, but I'm not sure how stable would be such a firmware. I'm expecting to get some feedback from my release to decide what to do next. :) If ASUS will not prowide new code, I would use this aproach in the future.


There is good change that rc.asus original source files are same in GPL_WL700gE_1042 and GPL_WL700gE_1046/GPL_WL700gE_1041, because rc.asus/rc binaries in 1.0.4.1 and 1.0.4.6 are same size(and diff cant find any differeces).

So maybe its safe to use rc.asus-1.0.4.2 files in latest GPL_WL700gE_1046 code?

d3viant
12-11-2006, 16:31
So maybe its safe to use rc.asus-1.0.4.2 files in latest GPL_WL700gE_1046 code?

I am willing to test that if somebody releases something with combined 1042 and 1046 files - just don't have the know-how to compile it myself :)

MoD - I haven't had any trouble with response times through telnet to the router (although SSH support would be probably faster and more secure) The shell script thing is probably permissions related - it may have to have the user and group ID of the routers root user to be executed correctly - it does work, but it cannot set path variables by the looks of it (I am guessing because the router executes it in a seperate shell session, so the variables don't get carried across...)

MoD
12-11-2006, 16:49
There is good change that rc.asus original source files are same in GPL_WL700gE_1042 and GPL_WL700gE_1046/GPL_WL700gE_1041, because rc.asus/rc binaries in 1.0.4.1 and 1.0.4.6 are same size(and diff cant find any differeces).

So maybe its safe to use rc.asus-1.0.4.2 files in latest GPL_WL700gE_1046 code?

first I have to figure out how to implement all custom features in one GPL source. The next step could me to mix GPL sources. I already wrote about it.

d3viant
12-11-2006, 17:28
first I have to figure out how to implement all custom features in one GPL source. The next step could me to mix GPL sources. I already wrote about it.

Theoretically, can't you just do the following:

1. unzip the 1042 source
2. unzip the 1046 source, then copy it to the 1042 tree, overwriting anything it asks about
3. Put in the changes you have made to the firmware to add telnet support and the startup script nvram variable - obviously into the newer version of the file - so that you don't mess up and new features in 1046 (if there is a newer version of those files that is...)

MoD
12-11-2006, 19:41
Theoretically, can't you just do the following:

1. unzip the 1042 source
2. unzip the 1046 source, then copy it to the 1042 tree, overwriting anything it asks about
3. Put in the changes you have made to the firmware to add telnet support and the startup script nvram variable - obviously into the newer version of the file - so that you don't mess up and new features in 1046 (if there is a newer version of those files that is...)

..and theoretically there can be problems. When you are programming, there are always errors. Before start to deal with problems that can arise when you mix different GPL sources, I want to create really usefull customized firmware with following features:

1. password protected shell
2. implemented ipkg system
3. startup script that could launch ipkg installed applications

that is my first goal.

Later I can use my expierence to mix GPL sources to create customized firmware that fixes ASUS bugs. Plz don't ask to mix GPL code yet. Right now my customized firmware maybe is not so usefull but it is created to test if customized features works. I released it to rise discussion and to get some feedback if anyone is testing it. If it is usefull for anyone, it is welcome.

We are on a way to create usefull customized firmware. I'm posting information I have on this forum even before I have implemented it in my code. I'm doing this because I hope to get support/help/futher directions. I'm getting it. Thanks to all who are responding!

d3viant
12-11-2006, 20:35
Sorry MoD - didn't mean to seem ungrateful - your modified firmware is already an improvement over the original ASUS one - I have been able to logon and customise iptables properly :)

If you need anything testing, I am sure plenty of people here will be willing to test it (I will be at least :) )

MoD
12-11-2006, 21:37
Sorry MoD - didn't mean to seem ungrateful - your modified firmware is already an improvement over the original ASUS one - I have been able to logon and customise iptables properly :)

If you need anything testing, I am sure plenty of people here will be willing to test it (I will be at least :) )

never mind, d3viant. i count on you:)!

fireflash
13-11-2006, 03:51
why not just tag a startup script onto the rcex file in 1.0.4.6? Seems like a good way to go and you can run anything from there.

MoD
13-11-2006, 07:50
why not just tag a startup script onto the rcex file in 1.0.4.6? Seems like a good way to go and you can run anything from there.

Yes, maybe this is a better aproach. I see that there is a big progress in doing this (by kfurge): http://wl500g.info/showpost.php?p=40489&postcount=27

kfurge
14-11-2006, 17:17
For example I do not know why does telnet has bad responsiveness, I do not know why shell scripts are not executed when you create them, but executes if you copy and edit from existing one.



I'm not seeing any problems with script execution.

A few things to check... Did you set the 'x' bit (i.e. chmod 755 scriptname)? Also, does your script start with the "#!/bin/sh" or "#!/bin/ash" magic? Did you try running your script by executing '/bin/ash scriptname'?

I've enabled utelnetd without password support and I see no delay whatsoever. If I remember correctly, you enabled password logins. Can you describe how you did that? I'll try to replicate the problem at my place.

Also, generically speaking, when the initial socket connection to the telnet port is fast, but the login prompt takes a long time to show, it's been my experience that the problem is usually an issue with the reverse DNS lookup of the client's IP address. Expecially if the IP address comes from an internal network.

- K.C.

fireflash
14-11-2006, 18:59
Yes, maybe this is a better aproach. I see that there is a big progress in doing this (by kfurge): http://wl500g.info/showpost.php?p=40489&postcount=27

Not really a big process. I had the files and such modified and nvram variable loaded up in no time. I've compiled my firmware with the mods, but I haven't had a chance to flash it and see how it works yet. I think before I do that I'm gonna try and sneak in a working fstab file like kfurge did.

I did, however, manually run the commands kfurge mentioned in an earlier post to get the HD to spin down, but it never did. The only thing I couldn't run was the mount command because it was looking for a non-existant fstab file. So I think that's my next move before I take another stab at bricking my router. :)

d3viant
14-11-2006, 20:08
fireflash - I managed to get my hard drive to spin down by modifying kfurges instructions slightly - due to the lack of the fstab, you have to define where to do the remount to:

killall -q -9 watchdog
mount -o remount,noatime,nodiratime /dev/se/2 /shares/MYVOLUME1
hdparm -S 240 /dev/ide/host2/bus0/target0/lun0/disc
smartctl -dT /dev/ide/host2/bus0/target0/lun0/disc


Change the time after -S to whatever you want to set the time before it spins down to (240 is 20minutes I believe)

I have these commands running on the rcinit startup script in MoD's firmware, so if the router gets rebooted for some reason, then the hard drive parameters still apply.

Now I have to figure out how to turn on/off the LEDS on the front - so I can sleep with it on :)

fireflash
14-11-2006, 21:42
fireflash - I managed to get my hard drive to spin down by modifying kfurges instructions slightly - due to the lack of the fstab, you have to define where to do the remount to:

killall -q -9 watchdog
mount -o remount,noatime,nodiratime /dev/se/2 /shares/MYVOLUME1
hdparm -S 240 /dev/ide/host2/bus0/target0/lun0/disc
smartctl -dT /dev/ide/host2/bus0/target0/lun0/disc


Change the time after -S to whatever you want to set the time before it spins down to (240 is 20minutes I believe)

I have these commands running on the rcinit startup script in MoD's firmware, so if the router gets rebooted for some reason, then the hard drive parameters still apply.

Now I have to figure out how to turn on/off the LEDS on the front - so I can sleep with it on :)


I think i see where I goofed. On the mount command I'm sure I forgot a space between /dev/se/2 and /shares/MYVOLUME1

I'll try it when I get home later, and if it works I'll finish adding the chances to the rcex file and re-compile, and see if there's smoke when it flashes. :)

Now to turn the lights off... I think most of the lights are GPIO triggered, so it may be possible to trigger the GPIO's to turn them off.. But that requires digging inside a whole other part of the firmware that controls the lights and such. If it could be tricked to emulate a shutdown state without actually turning it off, then you're good to go. Otherwise do what I do, strategically place your chair between your bed and router so you don't get the lights shining directly at you. :) A lot of times I turn it off at night also, to save the HD and conserve a little power.. But the only device I have that'll access the internet at a time where I may not be home is my TiVo, but it can live without a day or two of net access. :)

EDIT: I found another reason why my HD wouldn't shut down the last time I tried it. It would seem I left 2 downloads queued up, so ctorrent was running causing disk access. It got real quiet when I killed those, and it even shut down. Kinda scared me when it went down lol

d3viant
14-11-2006, 22:07
I was hoping that the lights would be controlled from somewhere within the linux /proc structure - but thats a pure guess :)

If theyre in there somewhere, its just a case of finding them and changing a one to a zero in the file or something. Otherwise it becomes harder as a dig through the firmware source code is required. It is ok for the time being as the torrent client doesn't work amazingly well - so it isnt downloading anything (so I turn it off at night) but once downloads work properly, I will be wanting to leave it running :P

fireflash
14-11-2006, 23:47
I was hoping that the lights would be controlled from somewhere within the linux /proc structure - but thats a pure guess :)

If theyre in there somewhere, its just a case of finding them and changing a one to a zero in the file or something. Otherwise it becomes harder as a dig through the firmware source code is required. It is ok for the time being as the torrent client doesn't work amazingly well - so it isnt downloading anything (so I turn it off at night) but once downloads work properly, I will be wanting to leave it running :P

I totally agree. :) There's some documentation that comes with the GPL source from Broadcom that talks about the GPIO triggers and such. You might be able to find something in there. The docs that came with the sources helped me get started figuring out what goes where and how certain things work when it comes to the OS and other functions.

MoD
15-11-2006, 08:07
I was hoping that the lights would be controlled from somewhere within the linux /proc structure - but thats a pure guess :)

If theyre in there somewhere, its just a case of finding them and changing a one to a zero in the file or something. Otherwise it becomes harder as a dig through the firmware source code is required. It is ok for the time being as the torrent client doesn't work amazingly well - so it isnt downloading anything (so I turn it off at night) but once downloads work properly, I will be wanting to leave it running :P

OpenWRT has gpio control binary: http://forum.openwrt.org/viewtopic.php?pid=35928#p35928

MoD
15-11-2006, 08:40
I'm working on new customized firmware. What is interesting, when I flash it from web interface, it is written to the router but not activized.

The web page with progress bar comes saying that reboot is in progress. It seems that it is a web page with 2 minutes javascript timer that on exit redirects back to some page. In paralel I have telnet session open. It never gets disconnected. Only when I reboot router from telnet, the new firmware is activised.

Maybe this is because of developement bug. But still - interesting,....:)

d3viant
15-11-2006, 09:44
Hmm, maybe the open telnet session is causing the router to not reboot?

No idea why this would be the case, but the firmware code is sort of a mess :)

I had a problem with this on the first firmware upgrade - from 1.0.4.1 to 1.0.4.6 but since then it has worked through the web interface no problem.

MoD
15-11-2006, 09:53
Hmm, maybe the open telnet session is causing the router to not reboot?

No idea why this would be the case, but the firmware code is sort of a mess :)

I had a problem with this on the first firmware upgrade - from 1.0.4.1 to 1.0.4.6 but since then it has worked through the web interface no problem.

good point. Thanks;)

fireflash
15-11-2006, 14:05
I'm working on new customized firmware. What is interesting, when I flash it from web interface, it is written to the router but not activized.

The web page with progress bar comes saying that reboot is in progress. It seems that it is a web page with 2 minutes javascript timer that on exit redirects back to some page. In paralel I have telnet session open. It never gets disconnected. Only when I reboot router from telnet, the new firmware is activised.

Maybe this is because of developement bug. But still - interesting,....:)

Funny, I had a similar problem last night trying to flash a freshly compiled firmware. The flash of my latest & not-so-greatest compile went fine. The router reboots, and almost everything came back up (except samba, and it didn't mount the HD either :eek: ) When I flashed a previous version to get everything back in running order, all I got was the same thing. A progress bar, but as far as I could tell the router didn't do anything, nor did the 'Ready' light ever go off. Afterwards I had to shut it down and turn it back on, and it completed the flashing and all was good again.

My first attempt to add a custom boot script was semi-successful. I'm not sure where I went wrong, but I have 2 thoughts. First one is a mod I made to busybox didn't compile right, and that caused some system confusion, or it attempted to look for my custom script but where I stored it on the HD get's nuked everytime it reboots, so that threw it off. Either way it's gonna require some tinkering.

d3viant
15-11-2006, 15:49
Most of the created directories will disappear upon a reboot - the source code appears to build the filesystem dynamically on power on...

MoD
15-11-2006, 17:39
Funny, I had a similar problem last night trying to flash a freshly compiled firmware. The flash of my latest & not-so-greatest compile went fine. The router reboots, and almost everything came back up (except samba, and it didn't mount the HD either :eek: )

Exactly! if something goes wrong, HDD is not mounted:( I also do not know were I was wrong:eek:

kfurge
15-11-2006, 19:07
Exactly! if something goes wrong, HDD is not mounted:( I also do not know were I was wrong:eek:

Interesting... I've never seen this behavior. Maybe it's a something specific to 1.0.4.2?

- K.C.

d3viant
15-11-2006, 19:14
OpenWRT has gpio control binary: http://forum.openwrt.org/viewtopic.php?pid=35928#p35928

Hmm, no luck with that gpio binary, I copied it across to my share, but running /share/MYVOLUME1/MYSHARE1/gpio from the router gives gpio: not found

running . gpio in the directory gives not found: ELF (then 3 diamonds)

It seems like it isn't compiled quite right for the wl-700ge...

although there is a .c source file - does anyone know how i would go about compiling this specifically for the wl-700ge?

MoD
15-11-2006, 20:41
Hmm, no luck with that gpio binary, I copied it across to my share, but running /share/MYVOLUME1/MYSHARE1/gpio from the router gives gpio: not found

running . gpio in the directory gives not found: ELF (then 3 diamonds)

It seems like it isn't compiled quite right for the wl-700ge...

although there is a .c source file - does anyone know how i would go about compiling this specifically for the wl-700ge?

i guess it is uClibc compiled. you have to install uClibc or recompile with glibc.

d3viant
15-11-2006, 20:53
Right, seeing as I don't appear to be able to install uclibc on my router right now, how do I go about compiling it on a linux box with glibc?

fireflash
15-11-2006, 23:43
Interesting... I've never seen this behavior. Maybe it's a something specific to 1.0.4.2?

- K.C.

I'm messing with the 1.0.4.6 source, so it's not version specific. I'm hoping my problem had to do with the missing script I had written. I've moved it to a safer location (safe from boot-time nukings anyways) so I'll take another stab at it eventually. Right now I'm going to take a small break from trying to brick my router and try and brick my iMac. lol

fireflash
15-11-2006, 23:45
Hmm, no luck with that gpio binary, I copied it across to my share, but running /share/MYVOLUME1/MYSHARE1/gpio from the router gives gpio: not found

running . gpio in the directory gives not found: ELF (then 3 diamonds)

It seems like it isn't compiled quite right for the wl-700ge...

although there is a .c source file - does anyone know how i would go about compiling this specifically for the wl-700ge?

There's a gpio binary in the router. Hopefully some of the Broadcom docs Asus provided explains how to use it.

d3viant
16-11-2006, 18:40
Unfortunately, the provided gpio program SIGSEGV's when you try to run it - another ASUS bug I think :)

MoD
21-11-2006, 07:49
A new experimental custom firmware has been released. The main goal is to test if we can enable ipkg subsytem to install uClibc and use all wl500g packages.

What has been changed:

1. busybox has been replaced with version 1.00 to enable sed with -r function. It is needed to enable ipkg.sh script. A side effect is that right now telnet login does not work correctly. You can't login with WebUI credentials (you can test it to see the bug). I do not know why it is so - is it feature or a bug of busybox. Something with SUID and SGID may be wrong. Maybe I have to set up /etc/busybox.conf file. I was trying to use busybox v.1.01 and v1.1.3. The login works correctly but the HDD does not mounts:(

However web interface works and telnet logins works without password. Therefore I allowed to login with root username without password.

2. ipkg.sh script is included
3. many new functions are enabled in busybox, including verbose output (applets now have --help option)
4. telnet now works only on LAN side - thanks kfurge
5. fstab file is added - thanks kfurge
6. PATH and LD_DIRECTORY_PATH are extended with /opt and /user paths
7. /opt directory is added to mount filesystem for ipkg. You can mount it like this:

mount -obind /shares/MYVOLUME1/MYSHARE1/opt /opt < enter >
mkdir /opt/tmp < enter >
mkdir /opt/tmp/ipkg < enter >
8. symlink to /tmp/ipkg.conf is added in /etc directory, so you have to create ipkg.conf file in /tmp directory with the following content:

src wl500g http://wl500g.dyndns.org/ipkg
src unslung http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable
dest root /
9. now you can install packages:

ipkg.sh update
ipkg install uclibc
I have not tested ipkg package installation. All I wrote above about installing ipkg, is theoretical - please test it yourself. I have tested the firmware itself.

Download the firmware from here: http://files.wl500g.info/asus/custom/mod/1.0.4.2-1/WL700gE_1.0.4.2-1a.zip

d3viant
21-11-2006, 19:13
MoD - I don't appear to be able to install that firmware - the router says an error was detected during the upgrade and the firmware cannot be installed. I have tried downloading it twice and upgrading back to 1.0.4.6 just in case it didn't like the same version number with an a after it. Is there any chance that your upload got corrupted?

MoD
21-11-2006, 22:35
MoD - I don't appear to be able to install that firmware - the router says an error was detected during the upgrade and the firmware cannot be installed. I have tried downloading it twice and upgrading back to 1.0.4.6 just in case it didn't like the same version number with an a after it. Is there any chance that your upload got corrupted?

No, the firmware is OK. It seems to be a windows "feature":) If you are flashing using web interface, be sure that you don't use long filename path. Save the firmware in c:\temp foder and flash it from there.

d3viant
22-11-2006, 15:46
Hmm, that shouldn't have been a problem - I was trying to do it via the web interface under a Linux OS. (even the pathname didn't make a difference there - ie /tmp/firmware.nas)

I will try windows sometime today if I can find a machine to use.

d3viant
22-11-2006, 18:08
Hmm, nope - no luck installing that firmware from a Linux or a windows box.

MoD
22-11-2006, 22:28
Hmm, nope - no luck installing that firmware from a Linux or a windows box.

I'll test it once more and upload the correct version tomorrow. Sorry for that:(

d3viant
23-11-2006, 10:18
No worries - that stuff happens occasionally :)

MoD
24-11-2006, 16:32
No worries - that stuff happens occasionally :)

sorry for a small delay. I just attached the serial port to my wl700gE to be able see what is going on while router is booting. I hope this will help in developement :)

MoD
24-11-2006, 22:27
Hmm, nope - no luck installing that firmware from a Linux or a windows box.

The new, fixed version has been uploaded: http://files.wl500g.info/asus/custom/mod/1.0.4.2-1/WL700gE_1.0.4.2-1a.zip

d3viant
24-11-2006, 22:50
MoD - thats great - it uploaded fine - does this firmware do the startup script the same way as your previous firmware?

MoD
24-11-2006, 22:58
MoD - thats great - it uploaded fine - does this firmware do the startup script the same way as your previous firmware?

yes,I hope so :)

d3viant
24-11-2006, 23:04
Right - just had a play with ipkg in this firmware - the version you provided (ipkg.sh) doesn't work, it crashes out with an error

head: error while loading shared libraries: head: symbol query_module, version GLIBC_2.0 not defined in file libc.so.6 with link time reference

but a version on my hard drive (downloaded from the ipkg packages and unzipped manually) appears to work - at least, I ran the update command successfully

d3viant
24-11-2006, 23:11
Well, vim from ipkg works :D

MoD
24-11-2006, 23:13
Right - just had a play with ipkg in this firmware - the version you provided (ipkg.sh) doesn't work, it crashes out with an error

head: error while loading shared libraries: head: symbol query_module, version GLIBC_2.0 not defined in file libc.so.6 with link time reference

but a version on my hard drive (downloaded from the ipkg packages and unzipped manually) appears to work - at least, I ran the update command successfully

can you install uclibc and run wl500g packages?

MoD
24-11-2006, 23:15
there is some bug in my firmware. it is related to busybox. you see, when you log in, router shows the shell promt twice. I have no idea why:(

d3viant
24-11-2006, 23:36
can you install uclibc and run wl500g packages?

I can install uclibc without any problems, which packages are wl500g ones? If vim (and the ncurses libs it installed for vim) are wl500g then yes.

Otherwise, can you give me a package name to try and install from the wl500g repository?

Thanks

MoD
25-11-2006, 00:01
I can install uclibc without any problems, which packages are wl500g ones? If vim (and the ncurses libs it installed for vim) are wl500g then yes.

Otherwise, can you give me a package name to try and install from the wl500g repository?

Thanks


does this one works? http://members.home.nl/lhspiljard/release/BIN_LPE_dp500serv-0.9.zip

d3viant
25-11-2006, 09:53
Doesn't look like it - the executable complains about expecting a closing parenthesis ")" when run. It may not be quite the correct compilation for the router. The unslung packages appear to be working though - just trying to get openssh going :)

d3viant
25-11-2006, 16:52
Success! openssh from the unslung repository works well - I can login to my router using encryption keys :D

MoD
25-11-2006, 22:20
Success! openssh from the unslung repository works well - I can login to my router using encryption keys :D

congratulations:)! that is good news. we should fix the busybox error somehow?!

d3viant
26-11-2006, 11:25
Possibly - bash is in the unslung repository though, so I may try to run through that and see if it makes any difference...

MoD
26-11-2006, 19:43
My modified firmware has a side effect - because of busybox replacement, mount command doesnt work correctly and USB flash-drives does not mount. Read more here: http://wl500g.info/showthread.php?t=7247

d3viant
26-11-2006, 22:57
MoD - thats weird, it's still doing it automatically for me - a fat32 usb key plugged into the front port mounts to /foreign_shares/FAT

/dev/scsi/host1/bus0/target0/lun0/part1 on /foreign_shares/FAT type vfat (rw)

Same error trying to run the dp500serv binary though :(

MoD
26-11-2006, 23:32
MoD - thats weird, it's still doing it automatically for me - a fat32 usb key plugged into the front port mounts to /foreign_shares/FAT

/dev/scsi/host1/bus0/target0/lun0/part1 on /foreign_shares/FAT type vfat (rw)

Same error trying to run the dp500serv binary though :(

Thanks, i'll check with clear installation.

MoD
27-11-2006, 08:33
MoD - thats weird, it's still doing it automatically for me - a fat32 usb key plugged into the front port mounts to /foreign_shares/FAT

/dev/scsi/host1/bus0/target0/lun0/part1 on /foreign_shares/FAT type vfat (rw)



With firmware v1.0.4.2-1a when I plug in USB flash-drive, it is not mounted. See attachement what is shown on web page :( Only if leave the USB flash-drive in the router and restart the router, USB flash-drive is recognized. As soon as I detach them and plug it back - it is not reconized.

MoD
27-11-2006, 09:11
My router starts to behave like windows :) USB flash-disk sometimes is recognized, sometimes is not.