Beagle Bone black debain gpio access denied

Hello,

Yet another newbie question.

I have got latest debian image on my beagle bone black.
uname - r output: 4.9.45-ti-r57

and I noticed various gpio directory in /sys/class/gpio

when I tried
echo 69 > unexport
it gave me permission denied.
so I changed the permission of unexport file to be 666

and now when I try to use the same command it gives me an error:
-bash: echo: write error: Invalid argument

Can anyone please help…

Ultimately I want to develop a C++ project to toggle LED which is connected to one of the pins…

Any help regarding this matter is deeply appreciated.

Regards,
Hemant Kapoor

Switching to root before doing sysfs operations, (e.g. sudo su), typically seems to work for me…

Hello,

Thanks for the response…

I did manage to sort the issue by performing two steps:

a. Added a udev rule to make gpio accessible
b. Added user to gpio group…

Regards,
Hemant Kapoor