water
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
PIN 1 : SIO_PD0 (line 0)
PIN 2 : SIO_PD4 (line 38)
PIN 3 : SIO_PD1 (line 3)
PIN 4 : SIO_PD5 (line 39)
PIN 5 : SIO_PD2 (line 10)
PIN 6 : SIO_PD6 (line 40)
PIN 7 : SIO_PD3 (line 41)
PIN 8 : SIO_PD7 (line 9)
PIN 9 : GND
PIN 10 : VCC
not working:
> Circuits.GPIO.open("GPIO41", :output)
{:error, :not_found}
> Circuits.GPIO.open(41, :output)
{:error, :not_found}
> Circuits.GPIO.enumerate()
[]
> Circuits.GPIO.backend_info()
%{name: Circuits.GPIO.CDev, gpio_number_remapping: :none}
linux (toybox):
> sudo gpioset 0 "41=1" # turn on
> sudo gpioset 0 "41=0" # turn off
> gpioset --version
toybox 0.8.11
linux (libgpiod):
> 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.
Trending in Questions
I’m aware of 2 such projects, are there others?
git: GitHub - team-alembic/realworld: A fullstack Phoenix LiveView application with back...
New
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
Hi everyone.
My team and I have been working on a fairly modest app based around video streaming and chat, but we’ve landed a customer t...
New
I really like the adapter patterns that ecto, nebulex, waffle, etc. use and would love find something similar for a key management servic...
New
Hello folks!
So at work, we are seeing some situations where we have to define some “fixed” strings that are used across the codebase in...
New
How Can I Optimise Compile Time Dependencies
I have been building an elixir application for about 2 years now. Many modules and files ha...
New
Hi,
we run different LLM models across a cluster, with each node loading a configurable subset. Model-specific queues let nodes consume ...
New
Other Trending Topics
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with.
But I don’t use it anymore.
Serverless was the promis...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #ai
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #security
- #performance










Showing Posts 1 to 6- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
water
@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.
fhunleth
Hi @water,
My first thought is that it’s a permissions issue and
Circuits.GPIOdoesn’t have access to the GPIOs. I see that you ransudoongpioset. I’m assuming that you’re not running Elixir as root and that if you removed thesudothatgpiosetwouldn’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/gpiochip0so that Elixir can access it without running as root. Create a file like/etc/udev/rules.d/99-gpio.rulesfile with the following contents:Then create the
gpiogroup if you don’t already have one. E.g.sudo addgroup gpio. Also make sure that your user is in thegpiogroup in/etc/group.Then reload udev and rerun the rules:
If you look at
/dev/gpiochip0, it should have the right permissions andCircuits.GPIOshould find the GPIOs. You also shouldn’t need to runsudoforgpioset, etc.Hope this helps!
benwilson512
Hey @water that’s my bad, I saw Circuits.GPIO and assumed nerves!
water
thank you.
nixos configuration
water
Writing to the led works.
I can also read from an input.
But
Circuits.GPIO.set_interruptsgives an error and the error message is not clear.The example in the readme is the reverse of my button press result. I don’t think it matters?
water
I can’t get
gpiomonto work either.I’ll change the 2 buttons with switches.
Polling them every 500ms should do the trick.