# Push Button ( gptio pin 14 ) not permited

**URL:** <https://mangoh.discourse.group/t/push-button-gptio-pin-14-not-permited/5455>\
**Category:** Uncategorized\
**Created:** [October 21, 2020, 1:30pm UTC](https://mangoh.discourse.group/t/push-button-gptio-pin-14-not-permited/5455 "2020-10-21T13:30:56Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![philippesurbayrole](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@philippesurbayrole](https://mangoh.discourse.group/u/philippesurbayrole)\
**Post date:** [October 21, 2020, 1:30pm UTC](https://mangoh.discourse.group/t/push-button-gptio-pin-14-not-permited/5455/1 "2020-10-21T13:30:56Z")

</div>

I try to find how handle push button to implement some action.

After search on legato and mangoh forum, i’ve never found a correct response.

So i’ve make some test from [gpioCf3Demo](https://github.com/legatoproject/legato-af/tree/master/apps/sample/gpioCf3Demo).

but when i run my application, i’ve this message:

```auto
gpioSysfsUtils.c ExportGpio() 151 | Failed to export GPIO 14. Error Operation not permitted

```

I’ve try to read the gpio available on my 7702 with the AT command

```auto
at+wiocfg?
+WIOCFG: 2,16,0,0,1,0,0
+WIOCFG: 4,3,0,0,1,0,0
+WIOCFG: 6,0,0,0,1,0,0
+WIOCFG: 7,16,0,0,1,0,0
+WIOCFG: 8,16,0,0,1,0,0
+WIOCFG: 13,16,0,0,1,0,0
+WIOCFG: 21,16,0,0,1,0,0
+WIOCFG: 22,16,0,0,1,0,0
+WIOCFG: 23,16,0,0,1,0,0
+WIOCFG: 24,16,0,0,1,0,0
+WIOCFG: 25,16,0,0,1,0,0
+WIOCFG: 28,16,0,0,1,0,0
+WIOCFG: 29,16,0,0,1,0,0
+WIOCFG: 30,16,0,0,1,0,0
+WIOCFG: 31,16,0,0,1,0,0
+WIOCFG: 32,16,0,0,1,0,0
+WIOCFG: 33,16,0,0,1,0,0
+WIOCFG: 35,16,0,0,1,0,0
+WIOCFG: 42,16,0,0,1,0,0

```

But no gpio 14 (push button) not available !

So, how i can use the push button ?

Currently my configuration is:  
legato 19.11.2  
Firmware Version: SWI9X06Y\_02.35.02.00 5208b3 jenkins 2020/06/10 00:30:12  
Bootloader Version: SWI9X06Y\_02.35.02.00 5208b3 jenkins 2020/06/10 00:30:12

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [October 21, 2020, 2:09pm UTC](https://mangoh.discourse.group/t/push-button-gptio-pin-14-not-permited/5455/2 "2020-10-21T14:09:02Z")

</div>

I don’t see there is gpio14 in wp77 product technical specification

---

<div class="post-metadata">

**Author:** ![philippesurbayrole](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@philippesurbayrole](https://mangoh.discourse.group/u/philippesurbayrole)\
**Post date:** [October 22, 2020, 10:02am UTC](https://mangoh.discourse.group/t/push-button-gptio-pin-14-not-permited/5455/3 "2020-10-22T10:02:45Z")

</div>

But in the mangoh red spécification, the push button is on the gpio 14 !

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [October 22, 2020, 10:11am UTC](https://mangoh.discourse.group/t/push-button-gptio-pin-14-not-permited/5455/4 "2020-10-22T10:11:17Z")

</div>

it is the io14 of the gpio expander sx1509biultrt!!!

---

<div class="post-metadata">

**Author:** ![philippesurbayrole](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@philippesurbayrole](https://mangoh.discourse.group/u/philippesurbayrole)\
**Post date:** [October 22, 2020, 12:15pm UTC](https://mangoh.discourse.group/t/push-button-gptio-pin-14-not-permited/5455/5 "2020-10-22T12:15:51Z")

</div>

Great !

But that doesn’t answer my initial question.

> [@philippesurbayrole](#):
>
> So, how i can use the push button ?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [October 22, 2020, 12:49pm UTC](https://mangoh.discourse.group/t/push-button-gptio-pin-14-not-permited/5455/6 "2020-10-22T12:49:37Z")

</div>

I never used before, but here has an example for reference

> [@gpioExpanderService with MangOH Red](https://mangoh.discourse.group/t/gpioexpanderservice-with-mangoh-red/1626):
>
> Hello, I would like to use the gpioExpanderService with the MangOH RED. In the MangOH.sdef I can see the gpioExpanderService is removed from build with this explanation. Is it possible to use it or not ? Thanks /\* \* There is a conflict between the following software components: \* - sx1509 Linux kernel driver \* - mangOH GPIO expander service \* - gpioexp command line program \* All of these components attempt to control the sx1509 GPIO expander on mangOH Red. The sx1509 \* driver is re…

---

<div class="post-metadata">

**Author:** ![philippesurbayrole](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@philippesurbayrole](https://mangoh.discourse.group/u/philippesurbayrole)\
**Post date:** [October 22, 2020, 3:46pm UTC](https://mangoh.discourse.group/t/push-button-gptio-pin-14-not-permited/5455/7 "2020-10-22T15:46:12Z")

</div>

Yes, i’ve tested but there is some conflic with the led !  
The GPIO of the led give correct response, but but the led does not light up !

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [October 23, 2020, 2:23am UTC](https://mangoh.discourse.group/t/push-button-gptio-pin-14-not-permited/5455/8 "2020-10-23T02:23:40Z")

</div>

Here I have tried to control the SD\_SEL pin, it is working fine for me on mangoh red board.

gpioexp 1 1 enable  
//To switch SDIO\_SEL to SD CARD:  
gpioexp 1 9 output normal high \>/dev/null

//To switch SDIO\_SEL to IOT0 slot:  
gpioexp 1 9 output normal low \>/dev/null

Also I have tried the following to read the push button value and it works for me:

gpioexp 1 14 input value
