Jetson jetpack 6.1 on AGX Orin 32Gb dev . kit - GPIO no OUTPUT , No LED blink

Hi,

I have been looking around to see why a simple python program like the LED blink does not produce an output. I saw few people in the forum with Jetpack 6.0 with same/similar issues and I can not find any single solution.

Below is the python program I am using.

import Jetson.GPIO as GPIO
import time
led_pin = 16
GPIO.setmode(GPIO.BOARD)
GPIO.setup(led_pin, GPIO.OUT, initial=GPIO.HIGH)

print(“Press CTRL+C when you want the LED to stop blinking”)

while True:
time.sleep(2)
GPIO.output(led_pin, GPIO.HIGH)
print(“LED is ON”)
time.sleep(2)
GPIO.output(led_pin, GPIO.LOW)
print(“LED is OFF”)

NOTE: I have Jetpack 6.1 already installed. I run cat /etc/nv_tegra_release and here is the result:

R36 (release), REVISION: 4.0, GCID: 37537400, BOARD: generic, EABI: aarch64, DATE: Fri Sep 13 04:36:44 UTC 2024
KERNEL_VARIANT: oot
TARGET_USERSPACE_LIB_DIR=nvidia
TARGET_USERSPACE_LIB_DIR_PATH=usr/lib/aarch64-linux-gnu/nvidia

Thanks,

hello kalustian,

please see-also Topic 301171 to apply the patch to control GPIO in Jeptack-6.1

how I can apply the patch ? can you please point me to the documentation or maybe to can help me here with steps to follow ?

hello kalustian,

you may refer to developer guide, Kernel Customization.

sorry …got lost on how to patch.

NOTE : the patch you are pointing to is from Oct 2024…I fresh installed JP 6.1…isn’t that patch already include in JP6.1 ?

hello kalustian,

they’re not, because JP-6.1 release announcement was around end of Sep. in 2024.

I see…but I still having trouble understanding how to patch. My technical knowledge is very limited. I am just trying to make a LED blink without using the patching process…I can not believe the AGX has to be patched to make it work out of the box. I am using below link to test drive the gpio functionality, It does not work for example on pin 16 on the board for example. What am I doing wrong here ?

what are the steps to patch control GPIO in Jetpack-6.1 ?

hello kalustian,

please refer to developer guide, Kernel Customization for the steps to obtain kernel sources, and also the steps to build the code.
since it’s kernel update, you may update /boot/Image after re-building the kernel image, reboot the system to have changes take effect.

Not sure about your solution but thanks a lot for your help. I found the way to enable the pins using the following cli
$ sudo /opt/nvidia/jetson-io/jetson-io.py

Taken from Configuring the Jetson Expansion Headers — Jetson Linux<br/>Developer Guide 34.1 documentation

NOTE: In my case I was trying to “see” the On/off of the gpio 12 from the examples folder (simple_out.py) with a voltmeter and that was not a good the way to actually see it works. Use an actual LED connected to the pin !!