for automation I want my Jetson Nano 2GB to run a systemctl script at startup. It was all working good until recently when I got an error “Jetson.GPIO: Permission denied”. I have looked into it and have /dev/gpiochip0 and /dev/gpiochip1 with wrong permissions. Both are owned by root:root and flagged 600 .
That leaves me with /dev/gpiochip0 owned by root:gpio and set to 660, yet gpiochip1 stays unchanged or gets overruled. Manually setting group and permissions for gpiochip1 does work and I can run my script without admin rights.
I have the Waveshare 2GB Jetson Nano kit with an USB-C
The Jetpack Version is 4.6.4
The udev file is: /etc/udev/rules.d/99-gpio.rules
The permissions for gpiochip0 change accordingly only gpiochip1 stays the same or reverts back. I have seen in my udev rule after chmodding gpiochip, there is a semicolon missing at the end of the sentence. Maybe that is the problem, will check that later. :/
The 99.gpio-rules file from the github repo did not solve the problem.
Nevertheless I have found the issue. After uninstalling Jetson.GPIO from python3 and removing a non-ASCII character from my code, it all started behaving like I was used to again. The /dev/gpiochip* devices are still owned by root now, no gpio udev rule but it works without admin rights.
Logically it could only have been the non-ASCII char causing that much trouble. I had it in a comment but forgot that python parses comments as well. Behaviour got so strange that, even when I got the gpio’s to work, using admin rights, only one pwm would function. Now its all good, pwm is working on both engines, camera, Lidar, TFT, can start the training now :).
Sorry for bothering you with a stupid question but thanks for your help and quick response !! :)
Have a nice weekend