Active Topics

 


Reply
Thread Tools
Posts: 353 | Thanked: 263 times | Joined on Dec 2009 @ Finland
#1
Hi,

I would like to make led blink in my app, couldn't find any examples or documentation about it. So how is it done?

If you don't know but you do know some (preferably quite small) app which uses led, please tell which app so I can check the source code.
 
Posts: 883 | Thanked: 980 times | Joined on Jul 2007 @ Bern, Switzerland
#2
dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_led_pattern_activate string:PatternCommunicationIM

The various patterns can be found in /etc/mce/mce.ini
You can also add your own there (caution if you edit this file!!!)
__________________
-Tom (N900, N810, N800)

"the idea of truly having a computer in your pocket just moved a big step closer."
 

The Following 2 Users Say Thank You to twaelti For This Useful Post:
Posts: 77 | Thanked: 176 times | Joined on Dec 2009 @ Hamburg, Germany
#3
Maybe it would be better to use the low-level /sys interface? There's a little documentation in the wiki: http://wiki.maemo.org/LED_patterns#Low_Level

That way you could just use custom patterns without messing with a configuration file.
 

The Following 2 Users Say Thank You to jfk For This Useful Post:
Posts: 353 | Thanked: 263 times | Joined on Dec 2009 @ Finland
#4
How to stop the blinking?
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#5
Originally Posted by TNiga View Post
How to stop the blinking?
dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_led_pattern_deactivate string:PatternCommunicationIM
 

The Following User Says Thank You to qwerty12 For This Useful Post:
Posts: 353 | Thanked: 263 times | Joined on Dec 2009 @ Finland
#6
Originally Posted by qwerty12 View Post
dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_led_pattern_deactivate string:PatternCommunicationIM
Yeah that's what I guessed but didn't dare to test. Thanks.
 
Posts: 353 | Thanked: 263 times | Joined on Dec 2009 @ Finland
#7
Originally Posted by jfk View Post
Maybe it would be better to use the low-level /sys interface? There's a little documentation in the wiki: http://wiki.maemo.org/LED_patterns#Low_Level

That way you could just use custom patterns without messing with a configuration file.
I didn't quite understand how that works. Care to give a little example?
 
Posts: 77 | Thanked: 176 times | Joined on Dec 2009 @ Hamburg, Germany
#8
Originally Posted by TNiga View Post
I didn't quite understand how that works. Care to give a little example?
Uhm, I was just pointing in the direction. That doesn't mean I've used it or know how it works.
 
Posts: 353 | Thanked: 263 times | Joined on Dec 2009 @ Finland
#9
Ok

Is it possible to do the dbus-send thingie and put somehow a custom pattern instead of those in the configuration file?
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#10
Originally Posted by TNiga View Post
Ok

Is it possible to do the dbus-send thingie and put somehow a custom pattern instead of those in the configuration file?
dbus-send is preferred to the sysfs approach because you don't have to be root to have the LED activated, AFAIK.

To add new patterns, you have to edit /etc/mce/mce.ini.
 

The Following User Says Thank You to qwerty12 For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 01:48.