# How to try GPIO control

**URL:** <https://mangoh.discourse.group/t/how-to-try-gpio-control/7753>\
**Category:** mangOH Green\
**Created:** [April 3, 2021, 9:03am UTC](https://mangoh.discourse.group/t/how-to-try-gpio-control/7753 "2021-04-03T09:03:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yoheifujimitsu](https://avatars.discourse-cdn.com/v4/letter/y/7feea3/32.png) [@yoheifujimitsu](https://mangoh.discourse.group/u/yoheifujimitsu)\
**Post date:** [April 3, 2021, 9:03am UTC](https://mangoh.discourse.group/t/how-to-try-gpio-control/7753/1 "2021-04-03T09:03:39Z")

</div>

I would like to control GPIO25 with WP76xx module.  
I am trying sample code as below URL .

> **[mangOH/mangOH](https://github.com/mangOH/mangOH/tree/524d0f9feae2ab6bb92bab03c346b08c4439f38f/samples/tutorials/hardwareInterfaces/gpio/Cf3GpioControl)**
>
> 524d0f9feae2ab6bb92bab03c346b08c4439f38f/samples/tutorials/hardwareInterfaces/gpio/Cf3GpioControl

But I can’t confirm start of the program.  
(I can’t find this log message “===============CF3 gpio application has started”)[log.txt](https://mangoh.discourse.group/uploads/short-url/85xjFfJUDzny2oHTadwsflPmn8K.txt) (21.8 KB)

Could you please let me know how to try GPIO control.

---

<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:** [April 4, 2021, 4:09am UTC](https://mangoh.discourse.group/t/how-to-try-gpio-control/7753/2 "2021-04-04T04:09:56Z")

</div>

It seems you need to “app start” your application.  
You can also try this sample

> **[legatoproject/legato-af](https://github.com/legatoproject/legato-af/tree/master/apps/sample/gpioCf3Demo)**
>
> master/apps/sample/gpioCf3Demo

---

<div class="post-metadata">

**Author:** ![yoheifujimitsu](https://avatars.discourse-cdn.com/v4/letter/y/7feea3/32.png) [@yoheifujimitsu](https://mangoh.discourse.group/u/yoheifujimitsu)\
**Post date:** [April 5, 2021, 4:17am UTC](https://mangoh.discourse.group/t/how-to-try-gpio-control/7753/3 "2021-04-05T04:17:29Z")

</div>

Thanks for your reply.  
I tried sample and confirmed start.

> Apr 5 02:36:04 swi-mdm9x28-wp user.info Legato: INFO | gpioCf3Demo[12467]/gpioCf3PinComponent T=main | gpioCf3Pin.c \_gpioCf3PinComponent\_COMPONENT\_INIT() 135 | **This is sample gpioctl Legato CF3 GPIO app by using le\_gpio.api**

But code stopped with the following error.

> Apr 5 11:36:04 swi-mdm9x28-wp user.emerg Legato: _EMR_ | gpioService[869]/sysfsGpio T=main | gpioSysfsUtils.c gpioSysfs\_SetChangeCallback() 596 | Only one change handler can be registered  
> Apr 5 02:36:04 swi-mdm9x28-wp user.emerg Legato: _EMR_ | gpioCf3Demo[12467]/framework T=main | le\_gpioPin22\_client.c SessionCloseHandler() 451 | Component for le\_gpioPin22 disconnected  
> Apr 5 11:36:05 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[862]/avcDaemon T=main | assetData.c assetData\_RegistrationUpdate() 1946 | unsupported function called.

Please let me know how to resolve.

---

<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:** [April 5, 2021, 11:07am UTC](https://mangoh.discourse.group/t/how-to-try-gpio-control/7753/4 "2021-04-05T11:07:27Z")

</div>

You can debug the app and see where makes this:

gpioSysfsUtils.c gpioSysfs\_SetChangeCallback() 596 | Only one change handler can be registered

---

<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:** [April 6, 2021, 1:40pm UTC](https://mangoh.discourse.group/t/how-to-try-gpio-control/7753/5 "2021-04-06T13:40:01Z")

</div>

You might also try the application here

> [@Is there a sample app using gpio pin?](https://mangoh.discourse.group/t/is-there-a-sample-app-using-gpio-pin/4522/7):
>
> I used the sysfs command, but I don’t know what api can be used to produce the desired output on the digital pin through which function call can be used.
