proled documentation?

This forum is for all other ARMv5 devices

proled documentation?

Postby tramusen » Fri Jul 15, 2011 7:44 pm

I wasn't sure if other models had this, due to the command name being proled, so putting this here.

Does anyone have any documentation on proled? I know I can change the LED to a couple of different colors or off, however I haven't figured out the argument to turn it that pinkish color. Basic syntax is:

$this->bbcode_second_pass_code('', 'proled orange')
which turns the light orange.

The three arguments I know of are:
    green
    orange
    off

man proled returned nothing, and trying -h, -?, or --help also did not return any...help. :P
For now, it is just nice to be able to turn off the light, or at least turn it to the more subdued orange color. That green is bright with the lights off! Being able to tie it in to some monitoring program could be more interesting. But it is driving me a bit mad that I can't guess what that magenta color's parameter would be.
tramusen
 
Posts: 29
Joined: Fri Jul 15, 2011 4:23 pm

Re: proled documentation?

Postby Cybertimber2009 » Fri Jul 15, 2011 10:59 pm

nano -w /sbin/proled

$this->bbcode_second_pass_code('', 'case "$1" in
green)
/sbin/devmem2 0x44100014 w 0x00030000 > /dev/null
/sbin/devmem2 0x44100018 w 0x00020000 > /dev/null
;;
orange)
/sbin/devmem2 0x44100014 w 0x00030000 > /dev/null
/sbin/devmem2 0x44100018 w 0x00010000 > /dev/null
;;
amber)
/sbin/devmem2 0x44100014 w 0x00030000 > /dev/null
/sbin/devmem2 0x44100018 w 0x00030000 > /dev/null
;;
off)
/sbin/devmem2 0x44100014 w 0x00030000 > /dev/null
;;
unlock)
/sbin/devmem2 0x4410001C w 0x00030000 > /dev/null
;;
lock)
/sbin/devmem2 0x44100020 w 0x00030000 > /dev/null
;;
esac

STATUS=`/sbin/devmem2 0x44100010 | sed 'N;N;s/.*0x\([0-3]\)0\?\+/\1/g'`
case "$STATUS" in
1)
echo 'GREEN'
;;
2)
echo 'ORANGE'
;;
3)
echo 'OFF'
;;
0)
echo 'AMBER'
;;
esac')

So looks like it supports Green, Orange, Amber and off. But this is a curious find indeed... if you look carefully at the 0x8# sets, only a single value changes. One (in green, orange, amber) seems to clear the color, then apply a new one.
Cybertimber2009
 
Posts: 40
Joined: Wed Jun 08, 2011 9:17 pm

Re: proled documentation?

Postby tramusen » Fri Jul 15, 2011 11:25 pm

Wow, good thinking on just using nano to have a look at the file. Thanks for posting the code as well.

I realized earlier that that pinkish color visible on the packaging is just that... packaging. Was a little saddened by that, having three very distinct colors would have been nice.

It looks like the amber is simply green + orange, though I'm not sure, lots of natural light in here right now. It would make sense, only need two LEDs.
tramusen
 
Posts: 29
Joined: Fri Jul 15, 2011 4:23 pm

Re: proled documentation?

Postby WarheadsSE » Sat Jul 16, 2011 5:04 pm

I wrote the proled script myself, out of peoples desire to control the leds, since their control by class is not properly implemented in the kernel. My apologizes for not bothering with the help.

Essentially:
proled [off|green|orange|amber]

It will return the state of the LED, and you can use it to lock the setting, but I don't bother telling 99% of people that. This is what is in /etc/rc.d/set-oxnas-mac that controls the led color switching.

Oh, and yes, amber is green and orange on at once.

The whole of the LED system is controlled by writing to the appropriate GPIO pins and memory locations. If you dig into the kernel sources, the locations can be found in the platform/board headers, but this is NOT for the faint of heart.

Suffice it to say, it's handy, it's dandy, and it makes the noobs happy.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: proled documentation?

Postby tramusen » Sun Jul 17, 2011 11:38 pm

$this->bbcode_second_pass_quote('WarheadsSE', 'I') wrote the proled script myself, out of peoples desire to control the leds, since their control by class is not properly implemented in the kernel. My apologizes for not bothering with the help.

I'm just grateful that you wrote the script!

$this->bbcode_second_pass_quote('WarheadsSE', '
')The whole of the LED system is controlled by writing to the appropriate GPIO pins and memory locations. If you dig into the kernel sources, the locations can be found in the platform/board headers, but this is NOT for the faint of heart.

Suffice it to say, it's handy, it's dandy, and it makes the noobs happy.

Something I really hope to do a bit at some point, if I ever A) find the free time, and B) simultaneously have the motivation to use it productively. For the time being, I'm just happy I can control the light at all. I played around with Arch a fair amount on my currently-dormant workstation (still need to swap out the old mobo+ram with the new stuff I picked up... ) and had hoped to get a bit better educated about the kernel and the like, but with that machine now destined to be a Hyper-V host, these little ARM devices seem like a better choice for playing around with Linux and learning about some of the inner workings.

Has anyone posted up a full hardware teardown of the Pro anywhere? I've got a second Pro showing up in the next week or two, so I feel a bit less squeamish about opening one up and poking around. It would be interesting to see just how difficult it would be to replace the original LEDs with different colors. If it isn't too horrendously difficult, replacing the orange with a real red might be interesting (Green/Yellow/Red assuming they blend well). Even just changing the standard ones in one of the units for easier identification would be fun. My guess is that this won't be quite as trivial as I am hoping. Just so long as they aren't the tiny surface-mount LEDs...
tramusen
 
Posts: 29
Joined: Fri Jul 15, 2011 4:23 pm

Re: proled documentation?

Postby WarheadsSE » Sun Jul 17, 2011 11:50 pm

I did before, but I'll say this about the LED:

It is a single, dual-color tri-pole. The exact electrical specs I don't have.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: proled documentation?

Postby tramusen » Mon Jul 18, 2011 12:08 am

Thanks for the info. I might try measuring the forward voltage drop on it off each of the colors and seeing if that lines up with anything I can get through Jameco.com. If /when I do I will make sure to post the info here.
tramusen
 
Posts: 29
Joined: Fri Jul 15, 2011 4:23 pm

Re: proled documentation?

Postby dinjo » Sun Dec 11, 2011 12:23 pm

Does the off here means it also turns off the back light which blinks at Ethernet cable ? I wanted that too be turned off since the way the pogo is kept in my room the light comes on my eyes at night time.
dinjo
 
Posts: 258
Joined: Mon Nov 28, 2011 5:59 am

Re: proled documentation?

Postby WarheadsSE » Sun Dec 11, 2011 2:52 pm

This is only for the front LED. The LEDs for the network are controlled by the PHYs network controller, and outside of the control of this script.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: proled documentation?

Postby dinjo » Sun Dec 11, 2011 4:22 pm

Is this LED change permanent or do it rollbacks ? I would like to blink when starting and once started after a minute the green should be off.Hence not sure whether adding it in rc.local would help
dinjo
 
Posts: 258
Joined: Mon Nov 28, 2011 5:59 am

Next

Return to Community Supported

Who is online

Users browsing this forum: No registered users and 5 guests