Device is a Glovary Firewall 6l with GPIO (2x5) on the motherboard.
The header is the not so standard dupont pins 2mm
GPIO is over the super I/O chip: iTE IT8613E
> sudo gpioset -t0 -c gpiochip0 "41=1" # turn on
> sudo gpioset -t0 -c gpiochip0 "41=0" # turn off
> gpioset --version
gpioset (libgpiod) v2.2
Copyright (C) 2017-2023 Bartosz Golaszewski
License: GPL-2.0-or-later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
@benwilson512
I saw you changed the topic to the nerves section.
Is Circuits.Gpio only on a nerves installation? I’m trying to use the library without nerves.
My first thought is that it’s a permissions issue and Circuits.GPIO doesn’t have access to the GPIOs. I see that you ran sudo on gpioset. I’m assuming that you’re not running Elixir as root and that if you removed the sudo that gpioset wouldn’t work either.
If it is a permissions issue and your device is running udev, you can add a udev rule to set the group/permissions on/dev/gpiochip0 so that Elixir can access it without running as root. Create a file like /etc/udev/rules.d/99-gpio.rules file with the following contents:
Then create the gpio group if you don’t already have one. E.g. sudo addgroup gpio. Also make sure that your user is in the gpio group in /etc/group.
Then reload udev and rerun the rules:
sudo udevadm control --reload-rules
sudo udevadm trigger
If you look at /dev/gpiochip0, it should have the right permissions and Circuits.GPIO should find the GPIOs. You also shouldn’t need to run sudo for gpioset, etc.