GPIO in Orin Nano dev board with JP 6.2.1 doesn't work by default. How to use it?

The more I read, the more I’m lost

I’m still trying to understand the current situation of Jetson Orin Nano dev board GPIO & latest jetpack (6.2.1) at the time of writing.

My objective is simple:

To drive an optocoupler in a 817 Module to press a button (connect a 5V high to gnd during 1s, to trigger a button press. The typical power button behaviour), using PIN 33 (GPIO13) and PIN34 as ground.

*Using the standard sdcard image.

The problem?

That there’s like a ton of info but as it is completely scattered.

I’m reading some people talking about:

  • Re-creating the boot disk with a new DTB/BCT (nuts)
  • SYSFS was deprecated (only god knows why)
  • Some other talking about JP5 where it looks like gpio worked without any issue
  • Some other that had a faulty carrier board
  • Some commands talking about using “busybox” to read and write mem values… somewhat blindy (get the pinmux address, then run busybox devmem and write god knows what in hex)
  • Plus there’s a nv github repository called “jetson-gpio” whose description is “A Python library that enables the use of Jetson’s GPIOs”

Starting from a fresh JP6.2.1 install (sdcard image):

  • gpiod is installed.
  • but it looks like it doesn’t work.

gpiofind detects “PH.00” as “gpiochip0 43”

gpioinfo | grep -i “PH.00”
line 43: “PH.00” unused output active-high

But when you execute:

gpioset --mode=time --sec=1 $(gpiofind “PH.00”)=1
gpioset --mode=wait $(gpiofind “PH.00”)=1

Nothing happens.
And you cannot monitor pin using gpiomon while touching it with gpioset :S

So, considering that GPIO is dangerous enough that you shouldn’t be playing around with it carelessly, now the question is…

How? (help 🥲)

Thanks in advance.

// DevKit is a Jetson Orin Nano 8GB, latest “july” batch.

*** Please note that this reply is generated by LLM automatically ***

I’ll provide a comprehensive answer to help you understand the current situation of Jetson Orin Nano dev board GPIO and the latest Jetpack 6.2.1.

Background

The Jetson Orin Nano Developer Kit consists of a P3767 System on Module (SOM) connected to a P3768 carrier board. The SOM and carrier board each have an EEPROM where the board ID is saved. The Developer Kit can be used without any software configuration modifications.

GPIO Configuration

To drive an optocoupler in a 817 Module, you want to use PIN 33 (GPIO13) and PIN34 as ground to mimic the typical power button behavior. However, you’re facing issues with scattered information and conflicting solutions.

Recreating the boot disk with a new DTB

Some people suggest recreating the boot disk with a new Device Tree Binary (DTB) file. This is because the DTB file contains information about the hardware configuration, including GPIO pin assignments. However, this approach is not recommended as it’s a complex process and may not be necessary.

SYSFS deprecation

SYSFS was deprecated in favor of the GPIO character device interface. This means that you should use the /dev/gpiochip interface instead of /sys/class/gpio.

JP5 and GPIO issues

Some users reported that GPIO worked without issues on JP5, but this is not a reliable solution as it’s not clear what changes were made to the system.

Busybox and devmem

Some commands suggest using Busybox to read and write memory values to configure GPIO pins. However, this approach is not recommended as it’s a low-level and error-prone method.

nvgithub repository - jetsongpio

The jetsongpio repository provides a Python library for using Jetson GPIOs. However, this library is not compatible with the latest Jetpack 6.2.1.

gpiod and gpiofind

On a fresh JP621 install, gpiod is installed, but it doesn’t work as expected. gpiofind detects PH00 as gpiochip0, but gpioset and gpiomon don’t work as expected.

Solution

To resolve the issue, you can try the following:

  1. Use the jetson-gpio library, which is a Python library that provides a simple interface for using Jetson GPIOs. This library is compatible with the latest Jetpack 6.2.1.
  2. Use the /dev/gpiochip interface to configure and access GPIO pins.
  3. Verify that the GPIO pin assignments are correct in the DTB file.
  4. Check the carrier board and SOM for any hardware issues.

Comparison

Here’s a comparison of the different approaches:

Approach Complexity Reliability
Recreating the boot disk with a new DTB High Low
SYSFS deprecation Medium Medium
JP5 and GPIO issues Low Low
Busybox and devmem High Low
nvgithub repository - jetsongpio Medium Medium
gpiod and gpiofind Low Low
jetson-gpio library Low High

In conclusion, the jetson-gpio library is the recommended solution for using Jetson GPIOs on the latest Jetpack 6.2.1. It provides a simple and reliable interface for configuring and accessing GPIO pins.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

I’m missing a thumbs down for LLM-slop replies 🤌🏻
He has literally rewritten my message without providing any useful information. 11/10 🙄

So I was having a look at the distro…

First of all, I had to nuke “at-spi2-core” as a simple “help(‘modules’)” crashed python (nobody knows how much I hate ubuntu) and the option “export NO_AT_BRIDGE=1” didn’t work.
Completely useful for a devkit, sure.

And…

  • python-jetson-gpio was already installed in the system by default… however doesn’t and will not, given that sysfs support was crippled in JP6.
apt search gpio | grep -i installed
jetson-gpio-common/stable,now 2.1.7ubuntu1 arm64 [installed]
libgpiod2/jammy,now 1.6.3-1build1 arm64 [installed,automatic]
python-jetson-gpio/stable,now 2.1.7ubuntu1 arm64 [installed]
python3-jetson-gpio/stable,now 2.1.7ubuntu1 arm64 [installed]

root@orin01:~# python
Python 3.10.12 (main, Aug 15 2025, 14:32:43) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import Jetson.GPIO as GPIO
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/Jetson/GPIO/__init__.py", line 1, in <module>
    from .gpio import *
  File "/usr/lib/python3/dist-packages/Jetson/GPIO/gpio.py", line 69, in <module>
    model, JETSON_INFO, _channel_data_by_mode = gpio_pin_data.get_data()
  File "/usr/lib/python3/dist-packages/Jetson/GPIO/gpio_pin_data.py", line 609, in get_data
    model = get_model()
  File "/usr/lib/python3/dist-packages/Jetson/GPIO/gpio_pin_data.py", line 602, in get_model
    raise Exception('Could not determine Jetson model')
Exception: Could not determine Jetson model
>>>

// Couldn’t determine ‘cause “/sys/class/gpio/” doesn’t exist 🤣

I’ll continue later.

This couldn’t be that hard, for God’s sake.

Tested gpioset with a multimeter, just in case. No voltage output, at all.

I can’t believe that a devkit doesn’t have functional GPIO by default.

edit:

Ok, so I was able to get output using Jetson.GPIO library, however, provided lib in JetPack 6.2.1 IS OUTDATED AND WILL NOT WORK BY DEFAULT:

In order to use the provided lib, you need one environment variable first:

export JETSON_MODEL_NAME=JETSON_ORIN_NANO

After doing that, the example code will work:

#!/usr/bin/env python3
import Jetson.GPIO as GPIO
import time

# Test pin 40: I2S_SDOUT
output_pin = 40

def main():
    GPIO.setmode(GPIO.BOARD)
    GPIO.setup(output_pin, GPIO.OUT, initial=GPIO.LOW)

    print("--> GPIO set to High")  
    GPIO.output(output_pin, GPIO.HIGH)
    time.sleep(5)

    print("--> GPIO set to Low")
    GPIO.output(output_pin, GPIO.LOW)
    time.sleep(5)

    print("--- GPIO cleanup")
    GPIO.cleanup()

if __name__ == '__main__':
    main()

Hi VSeras,

It seems you can control the GPIO through jetson-gpio python script.

Could you also try running the following command to check if it can be controlled?

$ sudo su
# gpioset --mode=wait `gpiofind "PH.00"`=1
# gpioset --mode=wait `gpiofind "PH.00"`=0

Please share the result of the following command if it cannot be controlled.

$ sudo busybox devmem 0x02434040