answered
2016-07-20 20:39:09 +0200
I don't think that the led colour can be changed. A cat /etc/hw-release
give me this:
[root@Sailfish ~]# cat /etc/hw-release
# This file is copied as hw-release (analogous to os-release)
NAME="Intex Aqua Fish"
ID=l500d
MER_HA_DEVICE=l500d
MER_HA_VENDOR=qualcomm
VERSION="0.0.1.24 (armv7hl)"
VERSION_ID=0.0.1.24
PRETTY_NAME=" 0.0.1.24 (armv7hl)"
SAILFISH_BUILD=24
SAILFISH_FLAVOUR=release
HOME_URL="https://sailfishos.org/"
The device ID is L500D
and if you check the /etc/mce/60-hybris-led-l500d.ini
, you can find:
[root@Sailfish ~]# cat /etc/mce/60-hybris-led-l500d.ini
....
# Notes:
# * L500D led hw has only binary on/off control and fixed intensity.
# * The colour is ignored, but still needs to have nonzero value.
# * Blinking is implemented via the same user space logic that does
# sw-breathing on devices where led intensity can be controlled and
# requires keeping the device away from suspend.
It seems that the Jolla C as only a fixed intensity led and only white colour. Regarding blinking, it sounds like it could be possible, but I'm currently not sure how (I'm very new to SailfishOS).
EDIT>
Ok, so after a little test, it seems that the led can blink (should I've seen it after a full charge but I didn't paid attention):
dbus-send --system --print-reply --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_led_pattern_activate string:PatternBatteryFull
makes the led blink following this pattern: 1500ms: on/500ms off
. This pattern disable itself when the screen is on or using:
dbus-send --system --print-reply --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_led_pattern_deactivate string:PatternBatteryFull
(more information here https://together.jolla.com/question/117545/network-state-mce/)
So, I tried to override the patterns definitions creating a /etc/mce/90-hybris-led-l500d.ini
as root and changing patterns for email and stuffs (I don't want to directly modify the 60-hybris-led-l500d.ini
file), I restarted the mce
service (systemctl restart mce.service
) and check with the d-bus
call, and... no luck, it didn't work for me this way. Perhaps I missed something? I will try again later.
EDIT2>
Ok, I figure it out and blinking works :) , but I'm not sure about some things (details below).
So, first thing, I installed mcetool
(easier to activate/deactivate a pattern than the d-bus call). Then, I tried to create new patterns in a new file 90-private-patterns.ini
and after a restart of the mce systemd service, I was able to use the freshly defined pattern (named PatternTest
in my case). However, even if I copied the exact same pattern as the PatternBatteryFull
one, I was unable to make it work. I search into the led
module from mce
source code: https://git.merproject.org/mer-core/mce/blob/master/modules/led.c#L1033 and I found that this pattern always "breath" even if the "breathing" option is set to false. So I enable it (mcetool --set-sw-breathing=enabled
), but... no blinking, so I tried to change the breathing-limit (mcetool --set-sw-breathing-limit=50
) and it worked! (default limit seems to be 100).
Here is a recap of what I've done in order to be able to make the "blinking" work.
[root@Sailfish ~]# mcetool --set-sw-breathing=enabled
[root@Sailfish ~]# mcetool --set-sw-breathing-limit=50 (a 0 value also worked)
Here are my questions:
- Even if the "sw-breathing" is enabled, the led does not blink while the "sw-breating-limit" is not properly set. But the fact that the blinking pattern of the JollaC does not wok (besides for the
PatternBatteryFull
) is due to a "sw-breathing" set to "disabled" and a "sw-breathing-limit" set to 100 or only a "sw-breathing-limit" set to 100? - If I restart my phone, does the "sw-breathing" option "reset" to a default value?
- Why does these options are kinda "disabled" by default? (can damage the led?)
In the same time, I was able to override the default sms/email/call patterns by copying the /etc/mce/60-hybris-led-l500d.ini
to /etc/mce/90-hybris-led-l500d.ini
and by changing the patterns. Then a restart of the systemd service and everything was working fine (by the way, I changed the led colour just to be sure and nop... no other colour).
[root@Sailfish ~]# cp /etc/mce/60-hybris-led-l500d.ini /etc/mce/90-hybris-led-l500d.ini
[root@Sailfish ~]# vi /etc/mce/90-hybris-led-l500d.ini
... change the blinking values
[root@Sailfish ~]# systemctl restart mce
... to test the PatternCommunicationCall pattern (or any pattern you want to test)
[root@Sailfish ~]# mcetool --activate-led-pattern=PatternCommunicationCall
... and in order to disable it
[root@Sailfish ~]# mcetool --deactivate-led-pattern=PatternCommunicationCall
That's all for now guys. I will seek throught the mce source in order to see what happend when an option is changed (saved or not). If anyone has any lead about my questions, comments are welcome :)
_small edit>_
Before changing or modifying mce led conf in your phone, it could be better to find out why the "sw-breathing" option is disabled by default and check if it does not damage the led or anything else.
+1 could be a nice feature!
louisbob ( 2016-07-20 15:01:55 +0200 )editBlink frequency adjust is must. Must be different blink rate for unanswered phone call and messages. This was so nice with jolla 1 with different coluors
jpjolla ( 2016-08-08 22:53:15 +0200 )editI edited this here in the led.ini.
But only for IM Messages worked it. SMS still the LED only is on and not blinking.
PatternCommunication=30;6;0;500;1500;ffffff PatternCommunicationCall=30;6;0;500;1500;ffffff PatternCommunicationIM=30;6;0;500;1500;ffffff PatternCommunicationSMS=30;6;0;500;1500;ffffff PatternCommunicationEmail=30;6;0;500;1500;ffffff PatternCommonNotification=30;1;0;500;1500;ffffff PatternCommunicationAndBatteryFull=29;1;0;0;0;ffffff
EDIT: It works i deleted the test .ini with 90-hybris-led-l500d.ini and make a backup of the original 60-hybris-led-l500d.ini
GREAT !
monkeyisland ( 2016-08-11 21:25:36 +0200 )edit