Echo 35 > /sys/class/gpio/export sh: write error: Operation not permitted


#1

Hi there ,
I was trying to export GPIO pins 35,36,37 (using WP7502) with a terminal command
=> echo 35 > /sys/class/gpio/export but this gives me the following error
==> sh: write error: Operation not permitted

i referred one of the query in the forum where in i found AT+WIOCFG? (AT command using which i found that app processor has access to the GPIO 35,36,37 )
and on the other end exporting GPIO 25 doesn’t give any error .

It could be good if somebody gives me pointers to overcome this issue .


#2

I just tested with a wp85 in a mangOH Green. at+wiocfg? shows this line for gpio35:
+WIOCFG: 35,16,0,0,1,0,0

The key thing to note is 16 in the second column which means that the gpio is under the control of Linux. I can then do echo 35 > /sys/class/gpio/export and it works successfully. Did you reboot after applying new settings with at+wiocfg? It is necessary to do so.


#3

Thanks for the pointers .
Yes , You were correct i had to restart the board after applying new settings using at+wiocfg .