[Sony Xperia M] mik13ST:
Hello XDA community,

I would like to get some advice at controlling notification LED on my Xperia M dual (C2005) running PecanM's Adnroid 6.0.

"Internet" says it is controlled from /sys/class/led or .../leds.

the /led directory looks like this:

root@nicki:/sys/class/led # ls
ls
fih_led

the fih_led directory:

root@nicki:/sys/class/led/fih_led # ls
ls
control
info
power
subsystem
uevent

the info file (green is on because it's charging and battery state > 90%):

root@nicki:/sys/class/led/fih_led # cat info
cat info

red LED(0), PMIC GPIO-0, LPG-6
On/Off PWM(0), Blinking PWM[0:0], Fade in/out PWM(511)
Blinking Time[0ms:0ms], Interval(500ms)
Frequency[CLK:DIV:EXP]=[2:3:3]
Ramp Generator[Toggle:Loop:Up]=[No:No:Yes]
LUT table[48-63]
Disable invert
Current sink(12mA)
Normal mode
Off state

green LED(1), PMIC GPIO-0, LPG-5
On/Off PWM(510), Blinking PWM[0:0], Fade in/out PWM(511)
Blinking Time[0ms:0ms], Interval(500ms)
Frequency[CLK:DIV:EXP]=[2:3:3]
Ramp Generator[Toggle:Loop:Up]=[No:No:Yes]
LUT table[32-47]
Disable invert
Current sink(12mA)
Normal mode
On state

blue LED(2), PMIC GPIO-0, LPG-4
On/Off PWM(0), Blinking PWM[0:0], Fade in/out PWM(511)
Blinking Time[0ms:0ms], Interval(500ms)
Frequency[CLK:DIV:EXP]=[2:3:3]
Ramp Generator[Toggle:Loop:Up]=[No:No:Yes]
LUT table[16-31]
Disable invert
Current sink(12mA)
Normal mode
Off state

then there is a control file:

root@nicki:/sys/class/led/fih_led # cat control
cat control
CMD
01 : LED on/off, 1 parameter
02 : LED blinking, 1 parameter
03 : LED fade in/out, 1 parameter
04 : Brightness of LED on, 1 parameter
05 : Brightness of LED blinking, 2 parameter
06 : Interval for LED fade in/out, 1 parameter
07 : Blinking time, 2 parameter
08 : Set mode, 1 parameter
09 : LED on/off in special mode, 1 parameter
10 : LED blinking in special mode, 1 parameter
11 : LED fade in/out in special mode, 1 parameter
12 : Set PMIC GPIO/MPP clock, DIV & EXP, 3 parameter
13 : Set PMIC GPIO/MPP clock, 1 parameter
14 : Set PMIC GPIO/MPP DIV, 1 parameter
15 : Set PMIC GPIO/MPP EXP, 1 parameter
16 : Set PMIC GPIO/MPP toggle, loop & ramp, 3 parameter
17 : Set PMIC GPIO/MPP toggle, 1 parameter
18 : Set PMIC GPIO/MPP loop, 1 parameter
19 : Set PMIC GPIO/MPP ramp, 1 parameter
20 : Set PMIC GPIO invert, 1 parameter
21 : Set PMIC MPP/LPG current sink, 1 parameter
22 : Set LED pin, 1 parameter
23 : Set MSM GPIO on/off level, 2 parameter
24 : Set PMIC GPIO/MPP/LPG, 1 parameter
25 : Brightness of LED fade in/out, 1 parameter
26 : LED SW blinking, 1 parameter
27 : LED SW fade in/out, 1 parameter
28 : LED SW blinking in special mode, 1 parameter
29 : LED SW fade in/out in special mode, 1 parameter
30 : Set range of LUT table, 2 parameter
31 : Set on/off state of LED, 1 parameter
32 : LED fade in/out at different timing (on/off, in time, out time), 3 parameter
33 : LED fade in/out once (on, in/out time, toggle up/down), 3 parameter
34 : LED fade in/out at different timing in special mode, 3 parameter
35 : LED fade in/out once in special mode, 3 parameter

From all this information I am assuming that these numbers are commands for controlling the led and

echo 21 0 > control
echo 01 1 > control

should set the currently controlled led to pin 0 (the red one) and turn it on (or off depending on type of logic), but that does nothing.

Is there any documentation on how to use this? Or does anybody know how to control the notification led?

Thanks for any useful information.