Error controlling GPIO pins from the command line

What would cause the following error when trying to write to the export file from the command line?
echo 79 > /sys/class/gpio/export
bash: echo: write error: Invalid argument

I am trying to write to the GPIO pin from the command line. This is what the permissions on the export file are set to
ls -l /sys/class/gpio/
total 0
–w–w---- 1 root gpio 4096 Dec 3 10:47 export
lrwxrwxrwx 1 root root 0 Dec 3 11:31 gpiochip316 → …/…/devices/platform/c2f0000.gpio/gpio/gpiochip316
lrwxrwxrwx 1 root root 0 Dec 3 11:31 gpiochip348 → …/…/devices/platform/2200000.gpio/gpio/gpiochip348
–w–w---- 1 root gpio 4096 Dec 3 10:47 unexport

I have tried changing the ownership but that did not help. I am also able to run the sample apps and control the pin. Not sure what I am missing here.

Platforn: Jetson Orin Nano

Hi care2577,

Are you using the devkit or custom board for Orin Nano?
What’s the Jetpack version in use?

Could you share the result of the following command on your board?

$ cat /etc/nv_tegra_release
$ sudo su
# ls /sys/class/gpio
# cat /sys/kernel/debug/gpio 

Hi KevinFFF:
I am using the devkit
The output of the last command you requested answered my question.
echo 476 > /sys/class/gpio/export # worked as expected

Thanks for your help

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.