Jetson GPIO has "Could not determine Jetson model" Error

I’ve been trying to get GPIO working with an official Nvidia Jetson Orin Nano Developer Kit, but I keep on running into this error and I was wondering if anyone knew how to fix it.

Traceback (most recent call last):
File “”, line 1, in
File “/usr/lib/python3/dist-packages/Jetson/GPIO/init.py”, line 1, in
from .gpio import *
File “/usr/lib/python3/dist-packages/Jetson/GPIO/gpio.py”, line 70, in
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 438, in get_data
raise Exception(‘Could not determine Jetson model’)
Exception: Could not determine Jetson model

hello manvikpasula,

it should due to Rel-36 does not have /sys/class/gpio to control GPIO anymore.
please use libgpiod tools instead. The new GPIO Interface on the Raspberry PI: libgpiod | Lloyd Rochester's Geek Blog

here’re some examples for using libgpiod,
please make sure these setting are there in your pinmux BCT file for the pin you want to control. and please remember the function has to be rsvd.
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;

Commands, gpioget, gpiofind, gpioinfo.
Here’s an example to configure tegra234-gpio-aon/gpio-327/PBB.03
# gpioinfo gpiochip1|grep PBB.03
line 11: "PBB.03" unused input active-high
Toggle the pin state by gpioset.
# gpioset --mode=exit --drive=push-pull gpiochip1 11=1
# gpioinfo gpiochip1|grep PBB.03
line 11: "PBB.03" unused output active-high

Here is a python example we used for testing our orin nano GPIO pins.

Tried following the instructions found on jetson_gpio_guide.md (found on github: jetson-orin-io-tools/jetson_gpio_guide.md at main · ValidusGroup-Design/jetson-orin-io-tools · GitHub), but still seeing the following error when i type: python3 -c "import Jetson.GPIO as GPIO; print(GPIO.VERSION)" in a terminal window:

raise Exception('Could not determine Jetson model')
Exception: Could not determine Jetson model

Same error as manvikpasula mentioned in this post.

I am assuming you did install this sudo pip3 install Jetson.GPIO

The only board we had crapped out and it was sent back. No one has stock in the USA so until we can purchase some more boards I have no way to work on this, sorry.

Also, the device tree was modified to enable outputs.

Yes. did do the install using: sudo pip3 install Jetson.GPIO. Let me know if you get to take a look at this when you get some more stock.

1 Like

quick update here: did get it working by downgrading to Jetpack 6.0. Lost the ability to run the orin nano at full power though.

I’m currently experiencing the same issue with an Orin Nano on Jetpack 6.2.

@m.kim thanks for sharing that downgrading to Jetpack 6.0 worked for you! I’ll try the same as a temporary fix.

@JerryChang can you please comment on whether Jetson.GPIO for Python is deprecated or if this is a temporary issue with Jetpack 6.2?

hello anna20,

please refer to jetson-gpio/issues/116, Jetson.GPIO version 2.1.9 should fix the issue.

1 Like

@JerryChang thank you, “Could not determine Jetson model” Error issue was indeed solved after installing Jetson.GPIO version 2.1.9.
However, the GPIO pins (at least in my case) still can’t be toggled neither on JetPack 6.0 nor 6.2

What has been done so far (for both versions of JetPack):
Step 1: I installed Jetson.GPIO version 2.1.9 and set user permissions following Jetson.GPIO ReadME

sudo groupadd -f -r gpio
sudo usermod -a -G gpio <user_name>
sudo mv <my_location>/99-gpio.rules /etc/udev/rules.d

and Jetson Orin IO Tools Guide

sudo chmod 770 /dev/gpiochip*

Step 2: Tried running a simple example from RidgeRun Developer Wiki to toggle pin 40 on the expansion header while measuring voltage using multimeter connected to Pin 40 (signal) and Pin 6 (GND). The code didn’t throw any exceptions but the voltage readings remained 0 V.
Step 3: I used gpioset to toggle pin 40 (and pin 32) and observed no change in voltage as well.
To do this, I located output lines using gpioinfo and verified in the Jetson Orin Nano Developer Kit Carrier Board Specification the correspondence between the SoC GPIO Port Number and the pin number:

gpioinfo | grep "output"

Output:
	line  41:      "PG.06"       unused  output  active-high     # Anna: Pin 32
	line  49:      "PH.06"       unused  output  active-high 
	line  51:      "PI.00"       unused  output  active-high      # Anna: Pin 40
	line  68:      "PK.04"       unused  output  active-high 
	line  69:      "PK.05"       unused  output  active-high 
	line 103:      "PQ.03"       unused  output  active-high 
	line 138:     "PAC.00"       unused  output  active-high

Then I ran

(sudo) gpioset --mode=wait 0 51=1

and observed no voltage change.

I have tried it on two available Orin Nano boards, so this imo excludes HW issues.

@JerryChang can you please let me know what am I missing to make GPIO pins respond?

hello anna20,

please give it another try to modify pinmux BCT file as following to test PI.00 again,
for instance,

                        soc_gpio42_pi0 {
                                nvidia,pins = "soc_gpio42_pi0";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;

@JerryChang I referred to pinmux manual on Developer Guide and other NVIDIA forum threads but frankly I couldn’t even find what is BCT file and how to access it. The closest at least from the syntax perspective was DTS file described in Pinmux and GPIO configuration but the path to this file doesn’t make any sense to me either.

Alternatively, I found that pinmux can be modified dynamically starting from SDK6.0 but I couldn’t map your suggested solution to this manual.

Can you please provide more detailed instructions for your suggested solution?

hello anna20,

it’s pinmux configuration file after you have Jetpack release installed to your host machine.
for instance,
~/nvidia/nvidia_sdk/JetPack_6.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/generic/BCT/tegra234-mb1-bct-pinmux-p3767-dp-a03.dtsi

please revise those settings for testing, you should re-flash the board completely to apply the changes.

Hi @anna20 and @m.kim,

I had the same problem and couldn’t solve it, not even by modifying the pinmux file. I started to suspect that the issue was related to the firmware and the JetPack version.

I have three Jetson Orin Nano development kits, and I experienced the same issue with all of them. I tested JetPack 6, 6.1, and 6.2, but in none of these cases did the GPIOs work.

The only solution I found was to downgrade the firmware and JetPack to version 5. Once I reverted to JetPack 5, the GPIOs worked without any issues.

In my case, I needed to connect a stepper motor, an RPLidar sensor, a DHT101, an ultrasonic sensor, and a temperature sensor. With JetPack 5, all of these devices work without any problems.

hello jesus.d.coral,

could you please initial a new forum discussion thread, we’ll arrange resources to follow-up.

@JerryChang

Done
Thread

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