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

**URL:** <https://mangoh.discourse.group/t/echo-35-sys-class-gpio-export-sh-write-error-operation-not-permitted/2321>\
**Category:** mangOH Green\
**Created:** [January 22, 2019, 7:46am UTC](https://mangoh.discourse.group/t/echo-35-sys-class-gpio-export-sh-write-error-operation-not-permitted/2321 "2019-01-22T07:46:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AkshayKulkarni](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/akshaykulkarni/32/721_2.png) [@AkshayKulkarni](https://mangoh.discourse.group/u/AkshayKulkarni)\
**Post date:** [January 22, 2019, 7:46am UTC](https://mangoh.discourse.group/t/echo-35-sys-class-gpio-export-sh-write-error-operation-not-permitted/2321/1 "2019-01-22T07:46:15Z")

</div>

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 .

---

<div class="post-metadata">

**Author:** ![dfrey](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/dfrey/32/303_2.png) [@dfrey](https://mangoh.discourse.group/u/dfrey)\
**Post date:** [January 22, 2019, 10:35pm UTC](https://mangoh.discourse.group/t/echo-35-sys-class-gpio-export-sh-write-error-operation-not-permitted/2321/2 "2019-01-22T22:35:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![AkshayKulkarni](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/akshaykulkarni/32/721_2.png) [@AkshayKulkarni](https://mangoh.discourse.group/u/AkshayKulkarni)\
**Post date:** [January 23, 2019, 5:42am UTC](https://mangoh.discourse.group/t/echo-35-sys-class-gpio-export-sh-write-error-operation-not-permitted/2321/3 "2019-01-23T05:42:05Z")

</div>

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