Jump to content

Led Control


DAV

Recommended Posts

Is there a way to controll the leds in the pineapple?

Which hardware? MK3 or MK4?

Link to comment
Share on other sites

For the MK4, I made a little script:

#!/bin/bash

if [ "$#" -ne "2" ]; then
	exit 0
fi

if [ "$2" = "on" ]; then

	echo 255 > /sys/class/leds/alfa\:blue\:"$1"/brightness

else

	echo 0 > /sys/class/leds/alfa\:blue\:"$1"/brightness

fi

Usage: sh script.sh <led_name> [on|off]

Examples: sh script.sh wps on

Link to comment
Share on other sites

For the MK4, I made a little script:

#!/bin/bash

if [ "$#" -ne "2" ]; then
	exit 0
fi

if [ "$2" = "on" ]; then

	echo 255 &gt; /sys/class/leds/alfa\:blue\:"$1"/brightness

else

	echo 0 &gt; /sys/class/leds/alfa\:blue\:"$1"/brightness

fi

Usage: sh script.sh <led_name> [on|off]

Examples: sh script.sh wps on

Love the script WM! I've gotten all my LEDs off (my goal here) except the power. I'm trying to make it as incognito as possible. Looking in /sys/class/leds/alfa theres nothing about power, just

alfa:blue:lan/ alfa:blue:wan/ alfa:blue:wps/

alfa:blue:usb/ alfa:blue:wlan/

Is there a pwr led command hiding somewhere? Or am I just out of luck (likely)

telot

Link to comment
Share on other sites

Don't hold me to this but I believe that the pwr led is wired into the.. power.

It cannot be controlled by the OS afaik.

Best,

Seb

Thanks for the response Seb - I had hoped to avoid this...:::pulls out magnifying glass and soldering iron:::

telot

Link to comment
Share on other sites

Black electrical tape is less permanent. Just a small piece on the led will keep it from lighting up the light pipe.

But I want it to die! Haha I'm not really going to desolder the led - was just being goofy. What I am using this LED control for is to verify various scripts running. So when I hold down my WPS button, it runs a custom script to turn on tcpdump and dump the cap file to my usb stick. Well to make sure I've held down the WPS button long enough, I have it also turn off some LEDs. Visual verification that tcpdump is running. The power light control would just be another light to verify something else down the road :)

telot

Link to comment
Share on other sites

Awesome script Whistle Master! This should be added as a module or simply rolled into the next firmware. I love the idea of having one of the lights blink as visual confirmation that something is running. Great for use with the buttons module. I rely on the blinking WPS LED to verify when the pineapple has completed booting.

As for the power LED..... Perhaps you could try hot glue or tape? I'm just saying I believe the LED is on the power circuit and removing it may either cut the power or make it significantly higher than it would have otherwise been. Not sure on the value of the LED -- maybe a resistor could fill in the place.

Regardless, I admire your determination though I will say simply fair warning that this sort of thing is outside our normal warranty. We'll 'help a brother out' if you do end up phys bricking it - but it's not a freebie like a software debrick.

Link to comment
Share on other sites

  • 8 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...