Yes, I’m using udev rules.
Here is the result of strace :
I don’t know if these lines concern my problem but there is a permission error :
access("/dev/tegra_sema", R_OK|W_OK) = -1 ENOENT (No such file or directory)
open("/dev/mem", O_RDWR|O_DSYNC) = -1 EACCES (Permission denied)
access("/dev/tegra_sema", R_OK|W_OK) = -1 ENOENT (No such file or directory)
open("/dev/mem", O_RDWR|O_DSYNC) = -1 EACCES (Permission denied)
open("/sys/devices/virtual/misc/nvmap/heap-camera/usage", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/dev/nvmap", O_RDWR|O_DSYNC|O_CLOEXEC) = 5
open("/dev/nvhost-ctrl", O_RDWR|O_DSYNC) = 6
The gpio part :
.....
open("/sys/class/gpio/export", O_WRONLY) = 26
write(26, "166", 3) = 3
close(26) = 0
open("/sys/class/gpio/export", O_WRONLY) = 26
write(26, "165", 3) = 3
close(26) = 0
open("/sys/class/gpio/export", O_WRONLY) = 26
write(26, "160", 3) = 3
close(26) = 0
open("/sys/class/gpio/export", O_WRONLY) = 26
write(26, "161", 3) = 3
close(26) = 0
open("/sys/class/gpio/export", O_WRONLY) = 26
write(26, "163", 3) = 3
close(26) = 0
open("/sys/class/gpio/export", O_WRONLY) = 26
write(26, "164", 3) = 3
close(26) = 0
open("/sys/class/gpio/gpio166/direction", O_WRONLY) = -1 EACCES (Permission denied)
dup(2) = 26
fcntl64(26, F_GETFL) = 0x2 (flags O_RDWR)
fstat64(26, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 14), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xa7e07000
_llseek(26, 0, 0xbef4bd20, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(26, "gpioSetDirection unable to open "..., 59) = 59
close(26) = 0
munmap(0xa7e07000, 4096) = 0
open("/sys/class/gpio/gpio165/direction", O_WRONLY) = -1 EACCES (Permission denied)
dup(2) = 26
fcntl64(26, F_GETFL) = 0x2 (flags O_RDWR)
fstat64(26, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 14), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xa7e07000
_llseek(26, 0, 0xbef4bd20, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(26, "gpioSetDirection unable to open "..., 59) = 59
close(26) = 0
munmap(0xa7e07000, 4096) = 0
open("/sys/class/gpio/gpio160/direction", O_WRONLY) = -1 EACCES (Permission denied)
dup(2) = 26
fcntl64(26, F_GETFL) = 0x2 (flags O_RDWR)
fstat64(26, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 14), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xa7e07000
_llseek(26, 0, 0xbef4bd20, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(26, "gpioSetDirection unable to open "..., 59) = 59
close(26) = 0
munmap(0xa7e07000, 4096) = 0
open("/sys/class/gpio/gpio161/direction", O_WRONLY) = -1 EACCES (Permission denied)
dup(2) = 26
fcntl64(26, F_GETFL) = 0x2 (flags O_RDWR)
fstat64(26, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 14), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xa7e07000
_llseek(26, 0, 0xbef4bd20, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(26, "gpioSetDirection unable to open "..., 59) = 59
close(26) = 0
munmap(0xa7e07000, 4096) = 0
open("/sys/class/gpio/gpio163/direction", O_WRONLY) = -1 EACCES (Permission denied)
dup(2) = 26
fcntl64(26, F_GETFL) = 0x2 (flags O_RDWR)
fstat64(26, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 14), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xa7e07000
_llseek(26, 0, 0xbef4bd20, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(26, "gpioSetDirection unable to open "..., 59) = 59
close(26) = 0
munmap(0xa7e07000, 4096) = 0
open("/sys/class/gpio/gpio164/direction", O_WRONLY) = -1 EACCES (Permission denied)
dup(2) = 26
fcntl64(26, F_GETFL) = 0x2 (flags O_RDWR)
fstat64(26, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 14), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xa7e07000
_llseek(26, 0, 0xbef4bd20, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(26, "gpioSetDirection unable to open "..., 59) = 59
close(26) = 0
munmap(0xa7e07000, 4096) = 0
write(14, "\1\0\0\0\0\0\0\0", 8) = 8
.....
open("/sys/class/gpio/unexport", O_WRONLY) = 27
write(27, "166", 3) = 3
close(27) = 0
open("/sys/class/gpio/unexport", O_WRONLY) = 27
write(27, "165", 3) = 3
close(27) = 0
open("/sys/class/gpio/unexport", O_WRONLY) = 27
write(27, "160", 3) = 3
close(27) = 0
open("/sys/class/gpio/unexport", O_WRONLY) = 27
write(27, "161", 3) = 3
close(27) = 0
open("/sys/class/gpio/unexport", O_WRONLY) = 27
write(27, "163", 3) = 3
close(27) = 0
open("/sys/class/gpio/unexport", O_WRONLY) = 27
write(27, "164", 3) = 3
close(27) = 0
shmdt(0xa57b5000) = 0
shmctl(1933321, IPC_64|IPC_RMID, 0) = 0
....
Thanks for your help !