openwrt on WRT54GS

I found some time today to test the openwrt (again) in my WRT54GS.

I desided to drop the sveasoft firmware. The main reason is that every change in the firewall or QoS requires a reboot of the WRT54GS.

Building the openwrt firmware and all the packages talk about 2 hours. I provide all the packages on the following page [url][/url]. I desided also that i need more stuff compiled in the busybox such as the following tools: hostname,ip,tftp and ftpget,ftpput,watch, telnet. Without them the original firmware is useless for me.

Getting to the internet is easy:
nvram set wan_ifname=ppp0
nvram set wan_proto=pppoe
nvram set wan_mtu=1492
nvram set pppoe_ifname=vlan1
nvram set ppp_username=username
nvram set ppp_passwd=password
nvram commit

Install the pppd,pppoecd packages and do a ifup wan, and you are up and running.

I will work a bit tomorrow regarding snmp support. Yes mrtg is an option that i use all the time

People looking for awstats

I see a lot of people trying to find out if i have awstats installed on my web site in order to use the configdir exploit. Logged attempts include:

I don’t have awstats guys 🙂 🙂

Debrick a WRT54G for the second time

I week ago i debrick a WRT54G ([url][/url]) unfortunately it died again.

This time it wasn’t so easy. The main problem was that the CFE.BIN was corrupted = NO TFTP to put a new firmware.

The solution was to find a CFE.BIN and write it again on the WRT. After finally founding an image, i was able to put a new openwrt firmware. It took a lot of retries and erases of the nvram till the firmware boots. Which i cannot explain since it should create again the nvram filesystem on first reboot.

Don’t try a firmware over 3MB it will not work out. Believe me 🙂

I don’t know what exactly is the problem with that device. Maybe a flash problem. Anyway now it works, let’s see for how long 🙂


I use dspam for its speed and accuracy, for it’s web interface and statistics.

I miss one feature. Retrain via History. Why ? Cause i don’t like to bounce messages. Cause you cannot convince your users to do it, and do it properly, cause i use the signatureLocation=headers, and the only MUA that works is mutt.

I had a look today on the 3.4 RC-1 changelog.

Quoting from dspam site [url][/url]:

[quote]Retrain Options via History
Retraining options have been added to the history tab, allowing users to
quickly retrain messages without actually delivering or forwarding them. This
is ideal for lazy users.[/quote]

Yes i am a lazy user.

Thank you very much guys.

software suspend finally

After many, many reboots and kernel recompiles i can hibernate 🙂

It appears that it is an ACPI problem, but if a use a hdparm like this for my disk
[b]hdparm -d 1 -A 1 -m 16 -u 1 -a 64 /dev/hda[/b]


Probably that i can read from the disk fast before an ACPI event, i don’t know.

I haven’t test it yet with laptop mode, but at least it works without any problems so far.

See also my previous post:

SHA-1 Broken ?

Slashdot has a REALLY interesting article about SHA-1.

It appears that SHA-1 is broken as Bruce Schneier says in his weblog

I work in the PKI market for about 5 years. As you can understand if SHA-1 is broken means a lot to me, you and the world.

wordpress as a cms

In the 1.5 version of wordpress we have a really nice feature: “static pages”
Now i am thinking to use wordpress as a cms.

One of my problems with my site ([url][/url]) is that i don’t have a CMS in order to change content as often as i want.

I must create a style in wordpress in order to have the same layout in my site if i want to use it as a CMS. Having a look in the web it looks as it is not so diffucult.

Let’s see if i will be able to do it. I really like the idea to have a CMS based on wordpress.

software suspend 2.1.7

Could please somebody tell me why i cannot have a laptop that it will hibernate properly ?

I am trying to make it work for more that a week.

Today i had a better luck. With software suspend 2.1.7 for kernel 2.6.11-rc4 i am able to hibernate in runlevel 1 (using ACPI) all the time.

On runlevel 2 i can only hibernate without ACPI. The systems hangs on “Reading caches”

Of course my laptop is useless without ACPI.

I have forgot how many reboots i have done, how many kernel recompiles with different options, but i will not quit, since hibernate is a must for me.

It appears that is an ACPI problem. I will try again with ACPI as a module, just in case.

I will keep you posted.

First dive of the year

I came back a couple of hour ago from my first dive for this year.

It wasn’t so cold 🙂 :). The temperature was 7 degrees and the water temperature 13 deggres.

Total dive time: 20 min
Max depth: 23 meters.

I think that i will use my blog as a dive log also….. Is there a plugin around ? 🙂

Debrick a WRT54G

I friend came a couple of hours ago with a bricked WRT54G.

It isn’t so bad as it sounds. I was able to recover it in less that 15 minutes.

There is a nice howto in the openwrt site ([url][/url]), look at the JTAG-adaptor Method. I build the adapter with one minor change. The ground is not on pin 12 of the JTAG but on the pin 10. Check it with your multimeter, before you connect it.

If you want to read the firmware it will take you about 1 hour.

A simple “[b]wrt54 -erase:nvram[/b]” did the trick for me.

Nice now we have a solution if something goes wrong 🙂

Monitor your ups using mrtg

For a long time i wanted to monitor my UPS a APC SmartUPS 700VA using mrtg.
The main problem is that the ups doesn’t support snmp.

APCUPSD is a great program to monitor your ups (battery level, Load, etc) and shutdown your pc when the battey level is below a value. But it doesn’t provide snmp info.

Lucky for us, APCUPSD provides a tool (apcaccess ) to show the values that it can read from your ups. With the help of apcaccess, grep, awk and a shell script you can use it to feed the values to mrtg.

Step 1
Create the following script

a=`/sbin/apcaccess | grep LOADPCT | awk {‘print $3’}`

echo $a
echo 0
echo 0
echo ups[/code]
Name it and put it on /usr/local/bin

Step 2
Create the following mrtg configuration file
WorkDir: /var/www/html/mrtg-ups

Target[ups]: `/usr/local/bin/`
MaxBytes[ups]: 100
Title[ups]: Ups Load
PageTop[ups]: UPS Load
Options[ups]: growright, gauge, nopercent
YLegend[ups]: percent
Legend1[ups]: UPS Load
LegendI[ups]: UPS Load
ShortLegend[ups]: %[/code]

And make sure that workdir exists.

Then put a cronjob to run that script every 5 minutes
*/5 * * * * root /usr/bin/mrtg path_to_your_mrtg-ups.cfg_file

If you want to speed the thinks up, run it 2 times then have look on the Workdir to see that the files have been generated succefull.

I use it to monitor the UPS load only, of course it can be modified to monitor also battery level, line voltage etc.

Nice ? 🙂 🙂