Haven't been using any script for controlling LED in front for a l o o n g time now.
Now when trying as described here http://fit-pc.com/wiki/index.php?title= ... front_LEDs
(or by my script with same contents) I only got errors, unvalid arguments and so on?
Where to start troubleshooting?
No GPIO LED with Linux Mint 21.1 [SOLVED]
Moderator: Andrey.Mazlin
No GPIO LED with Linux Mint 21.1 [SOLVED]
Linux Mint Vera 21.1 Cinnamon @ MBM2 Pro
Re: No GPIO LED with Linux Mint 21.1
Seems to be older kernel than 4.8 to get this to work..
If using gpioinfo - I get a lot of lines. What lines is the LED in front?
If using gpioinfo - I get a lot of lines. What lines is the LED in front?
Linux Mint Vera 21.1 Cinnamon @ MBM2 Pro
Re: No GPIO LED with Linux Mint 21.1
I encountered this problem when I upgraded from kernel 5.4 in Ubuntu 20.04 to Linux Kernel 5.15 in Ubuntu 22.04. The answer was to offset the previous values by +512. I obtained this number by diffing the values in the superuser post. Following is the contents of a shell script that will turn all the front LEDs on the fitlet2 off:
This Enum from my python scripts might help to:
Code: Select all
#!/bin/bash
# Make sure the LEDs on the front of the fitlet2 are off after booting up
# Reference:
# http://www.fit-pc.com/wiki/index.php?title=Application_note_-_fitlet2_controlling_front_LEDs
# Note that after upgrade to Linux Kernel 5.15 in Ubuntu 22.04 from kernel 5.4 in Ubuntu 20.04
# all previously known values must be offset by 512 (obtained by diffing the gpio chip values)
# https://superuser.com/questions/1736349/gpio-numbering-changed-after-upgrade-to-ubuntu-22-04
echo 947 > /sys/class/gpio/export
echo 948 > /sys/class/gpio/export
echo 949 > /sys/class/gpio/export
echo 950 > /sys/class/gpio/export
# default state for "out" is off/low
echo out > /sys/class/gpio/gpio947/direction
echo out > /sys/class/gpio/gpio948/direction
echo out > /sys/class/gpio/gpio949/direction
echo out > /sys/class/gpio/gpio950/direction
echo 947 > /sys/class/gpio/unexport
echo 948 > /sys/class/gpio/unexport
echo 949 > /sys/class/gpio/unexport
echo 950 > /sys/class/gpio/unexport
This Enum from my python scripts might help to:
Code: Select all
class GPIO(Enum):
led_1_green = "947"
led_1_orange = "948"
led_2_green = "949"
led_2_orange = "950"
Re: No GPIO LED with Linux Mint 21.1
THANKS!!!
Work just fine to add 512 in my scripts!
Work just fine to add 512 in my scripts!
Linux Mint Vera 21.1 Cinnamon @ MBM2 Pro
Re: No GPIO LED with Linux Mint 21.1
Great news! Can you put [SOLVED] in the title?
-
- Posts: 97
- Joined: Tue May 05, 2020 7:02 am
Re: No GPIO LED with Linux Mint 21.1
Did this on behalf of Mikael
Andrey Mazlin, Application Support Engineer
Useful links:
https://fit-iot.com/web/
Support Wiki: http://www.fit-pc.com/wiki/
Support mail: fitpcsupport@compulab.co.il
Useful links:
https://fit-iot.com/web/
Support Wiki: http://www.fit-pc.com/wiki/
Support mail: fitpcsupport@compulab.co.il