Page 2 of 2

Re: GPIO (leds) default values

Posted: Tue Apr 05, 2022 7:04 am
by Vidar.Hauglien
Hi.

I'm seeing the same issue with the leds are on by default, even after bios upgrade. Bios is currently FLT2.0.46.02.01. Am i missing something?

Re: GPIO (leds) default values

Posted: Fri Apr 15, 2022 1:08 pm
by Mikael63
The LEDs are ON (green) by default when OS i started and OFF when OS is shut down.

To switch them to OFF when OS is started - just do this by a script, and run that script when OS starts.
Running Linux?

Re: GPIO (leds) default values

Posted: Mon Apr 25, 2022 11:15 am
by Vidar.Hauglien
Yes, running linux. I can control them just fine from linux. The issue is that the LED's are green before booting the OS. I want the LED's to be off until i turn them on, eg. when everything is up and running successfully. After reading this thread i got the impression that the latest Bios update disabled LED during boot until manually enabled, but in my case they turn green as soon as i apply power.

Re: GPIO (leds) default values

Posted: Tue Apr 26, 2022 3:04 pm
by Mikael63
Vidar.Hauglien wrote:
Mon Apr 25, 2022 11:15 am
in my case they turn green as soon as i apply power.
Confirmed!
When connecting to power supply - all three LEDs are On/Green.
As soon as OS is started the script switches (two of) them off.

Re: GPIO (leds) default values

Posted: Wed Apr 27, 2022 9:06 am
by Vidar.Hauglien
Thanks for the reply. That's too bad. Would have made more sense that the leds were OFF default, and turn the leds green when the system is operating successfully, not turning them off when the system is running successfully.

Re: GPIO (leds) default values

Posted: Thu Apr 28, 2022 5:09 pm
by Mikael63
Vidar.Hauglien wrote:
Wed Apr 27, 2022 9:06 am
Thanks for the reply. That's too bad. Would have made more sense that the leds were OFF default, and turn the leds green when the system is operating successfully, not turning them off when the system is running successfully.
Agree!
I switch them to OFF at startup just so they remain OFF when shutting down.
The script is running by auto at startup since I don't know how to run a script by auto when shutting down. (By the regular way) Beside the opposite way - executing a script that set LED to OFF and then shutdown.

Re: GPIO (leds) default values

Posted: Fri Apr 29, 2022 7:11 am
by Vidar.Hauglien
Mikael63 wrote:
Thu Apr 28, 2022 5:09 pm
Agree!
I switch them to OFF at startup just so they remain OFF when shutting down.
The script is running by auto at startup since I don't know how to run a script by auto when shutting down. (By the regular way) Beside the opposite way - executing a script that set LED to OFF and then shutdown.
If you're using systemd it's pretty easy to turn them off at shutdown using ExecStop. This is how my systemd service looks like:

Code: Select all

[Unit]
Description=Configure Fitlet2 LED
DefaultDependencies=false

[Service]
Type=simple
ExecStart=/bin/bash /usr/local/bin/setled.sh -configure
ExecStartPost=/bin/bash /usr/local/bin/setled.sh -1 off
ExecStartPost=/bin/bash /usr/local/bin/setled.sh -2 off
ExecStop=/bin/bash /usr/local/bin/setled.sh -1 off
ExecStop=/bin/bash /usr/local/bin/setled.sh -2 off
[Install]
WantedBy=sysinit.target