Jump to content

Recommended Posts

Posted

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

Which hardware? MK3 or MK4?

Posted

MK3 I have written scripts for.

LED control is going to be added in the next release of the MK4 firmware. It is ready to be added already.

Best,

Sebkinne

Posted

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

Posted

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

Posted

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

Posted

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

telot

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

Posted

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

Posted

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.

  • 8 months later...
Posted (edited)

The power LED is definitely hardwired and I personally regret making a stupid mistake of plugging it out once. The script provided is brilliantly coded.

pcb turnkey

Edited by cicek

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...