Controlling the WRT54G/GS leds

The Cisco/Linksys WRT54G/GS router has two leds just beneath the Cisco Systems logo. One is a white led, while the other is an amber led. It is possible to turn them on or off using the GPIO pins on the mainboard.

  • GPIO #3 controls the amber led beneath the Cisco Systems logo:

    Disabling GPIO #3 turns on the amber led.
    Enabling GPIO #3 turns off the amber led.

  • GPIO #2 controls the white led beneath the Cisco Systems logo:

    Disabling GPIO #2 turns on the white led.
    Enabling GPIO #2 turns off the white led.

  • GPIO #7 controls the DMZ led:

    Disabling GPIO #7 turns on the DMZ led.
    Enabling GPIO #7 turns off the DMZ led.

To control those GPIO pins with the OpenWRT firmware, download gpio.tar.gz or gpio.tar.gz and install the gpio binary into /usr/bin:

# cd /tmp
# wget
# tar -zxf gpio.tar.gz
# mv gpio /usr/bin
# rm /tmp/gpio.*

Use “/usr/bin/gpio disable n” to disable GPIO #n, or use “/usr/bin/gpio enable n” to enable GPIO #n.

Additionally, I customized the /etc/init.d/S99done script in order to turn on the white led under the Cisco Systems logo once the system booted:

# rm /etc/init.d/S99done
# cat > /etc/init.d/S99done <  #!/bin/sh
> /rom/etc/init.d/S99done
> /usr/bin/gpio disable 2
# chmod +x /etc/init.d/S99done

8 thoughts on “Controlling the WRT54G/GS leds

  1. Pingback:

  2. Pingback: ariel weblog

  3. # wget
    Connecting to[]:80
    gpio.tar.gz 100% |*********************************************************************************************************| 444 00:00 ETA
    # tar xzvf gpio.tar.gz
    # cat what-happened-to-gpio.txt
    What happened to the GPIO utility?

    GPIO is a ‘general purpose io’, which depending on your point of view
    is either a register that controls a hardware io or vice versa. The
    gpio util was a diagnostic tool for controlling the GPIO pins, it was
    never an intended as abstraction. Each device has the GPIO pins wired
    slightly different, which is why we have abstractions like the ones in
    /proc/sys/reset and /proc/sys/diag; using the gpio util to hardcode
    GPIO numbers into scripts is just ignorant and stupid.

    – mbm

  4. Well, if using GPIO util to hardcode GPIO numbers into scripts is just ignorant and stupid, could then anybody propose a way to change how leds work in Linksys WRT54G without using GPIO?

  5. Great work!!Works well even with DDWRT-Firmware except all lights change back to normal after a while, although this might be because i also have the sd-mod. Anyway, thanks!!!

  6. I think there are a variety of things going on here. First, as alluded to in some earlier posts, there is reversion to the mean. When you are processing 1,000s of tons, they can’t all be great. Small wineries are the long tails of the bell curve – some make amazing wines from exceptional fruit, some make awful wines (from both good and bad fruit).
    Second, as you indicate, Jeff, there is the allocation of resources between marketing and product. For someone making a thousand cases per year, the marketing budget won’t have much effect, so the product really needs to deliver to sell the wine. When you’re hand selling the wine, resources invested in product are more effective at producing increased sales than increased marketing spending at the expense of the wine.
    Finally there is the difference between a business and an obsession. A large winery, because of scale, needs to generate an acceptable return on investment. A large winery that loses five dollars a bottle won’t see too many vintages. Because boutique wineries operate at such a small scale many of us can operate at a significant loss year in and year out. I’d rather put out a product that is true to my vision and is the best pinot noir I can make even if it means I’m cropping at 1.2 tons per acre and doing three passes between lag and harvest to drop by hand any less than perfect clusters. I price it so it sells easily because I don’t want to work too hard at selling – I’d rather be in the vines. And at the end of the year – whatever – even if I gave it away (which I don’t) I could only lose about $150K per year (plus about 2500 hours of my time). Losing $5 a bottle means I’m losing $50K per year, which, when I consider the benefits of drinking great wine, producing a product I’m proud of, and spending days like today in the vineyard working hard (instead of selling) well, it is worth it. If I made 30,000 cases this “business plan” wouldn’t work.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s