I am trying to use the libgpiod command line tools and am following the article “How to Use GPIO on TorizonCore”. I am using a Verdin Mini module and am logged onto the device via PuTTY. When I execute the following command (as per the article):
docker run --rm -it --device /dev/gpiochip4 torizonextras/arm64v8-gpiod
nothing happens - the terminal simple returns immediately to the command prompt, and I see no way of executing the various tools (i.e. gpioset, gpioget etc.). Using Portainer I cannot see that anything was added to the list of containers.
I did actually manage to use these tools about a year ago without any problem, but I have been away from this toolchain for a while, so I assume I am just missing, or have forgotten, something quite basic.
Any help would be much appreciated.
I executed the same command on two different devices with TorizonCore 5.6.0, one of which is a Verdin iMX8M Mini, and it worked as intended on both.
Just to be sure, when you say nothing happens when executing
docker run, the command prompt doesn’t change to something like
root@186f3be39cc7:/# , right? Because when the command succeeds the current terminal changes to a pseudo-TTY inside the gpiod container without any kind of notification: one way to tell is by looking at the prompt statement, which changes to what I’ve described.
If not, then most likely the container failed to run and exited immediately after you executed the command. If that is the case could you execute the command again without
docker run -it --name=gpio-test --device /dev/gpiochip4 torizonextras/arm64v8-gpiod
and then reply with the output of
docker logs gpio-test attached?
Thanks for the fast response.
Firstly, to answer your question: Yes, the command prompt did not change - it just immediately went back to the verdin-imx8mm-06895059:~$ prompt. I was expecting to see the “#” prompt, but that didn’t appear.
However, that was yesterday. Today … it works! I powered off for the night, powered it back on again today, and it works. Exactly the same command (copy pasted). The first time I did it, it had to download the image first, (which was what I was initially expecting) and after that it changed to the “#” prompt and I could use the gpio commands. I could then also see the container in Portainer. Subsequent use of the command worked immediately without having to do the download, as expected.
I have no idea what the difference could be from yesterday. Before posting my question I had tried multiple times, including logging out of the SSH session and back in again. I’m glad it’s now working, but am a bit concerned as to why it didn’t - ???
All the best,
I’m glad your problem is gone!
About the issue itself, that’s strange indeed. If it happens again please post the steps you made so we can try to reproduce it.