# How to Connecting GPIO13 with wp76xx

**URL:** <https://forum.legato.io/t/how-to-connecting-gpio13-with-wp76xx/6060>\
**Category:** Legato Application Framework\
**Created:** [January 13, 2022, 9:10am UTC](https://forum.legato.io/t/how-to-connecting-gpio13-with-wp76xx/6060 "2022-01-13T09:10:04Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![tanaporn\_y](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@tanaporn\_y](https://forum.legato.io/u/tanaporn_y)\
**Post date:** [January 13, 2022, 9:10am UTC](https://forum.legato.io/t/how-to-connecting-gpio13-with-wp76xx/6060/1 "2022-01-13T09:10:04Z")

</div>

what i got:

root@swi-mdm9x28-wp:~# ls /sys/class/gpio/  
export gpio25 gpioWLAN\_EN gpiochip793 gpiochip916  
gpio13 gpio42 gpiochip0 gpiochip809 gpiochip948  
gpio21 gpio7 gpiochip1 gpiochip820 gpiochip980  
gpio22 gpio8 gpiochip1012 gpiochip852 unexport  
gpio23 gpioWIFI\_IRQ gpiochip1018 gpiochip884 v2  
root@swi-mdm9x28-wp:~# logread -f | grep gpio  
Jan 13 17:59:43 swi-mdm9x28-wp user.info Legato: INFO | updateDaemon[1093]/updateDaemon T=main | app.c app\_InstallIndividual() 739 | App gpid  
Jan 13 17:59:43 swi-mdm9x28-wp user.info Legato: INFO | updateDaemon[1093]/updateDaemon T=main | updateDaemon.c ApplyAppUpdate() 963 | App '.  
Jan 13 17:59:54 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c app\_Stop() 3596 | Stopping app ‘gpio’  
Jan 13 17:59:54 swi-mdm9x28-wp user.info Legato: INFO | gpioService[1896]/sysfsGpio T=main | gpioSysfsUtils.c gpioSysfs\_SessionCloseHandlerF7  
Jan 13 17:59:54 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c app\_StopComplete() 4753 | app ‘gpio’ has .  
Jan 13 17:59:54 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | apps.c DeactivateAppContainer() 374 | Applicati.  
Jan 13 17:59:59 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c app\_Start() 3471 | Starting app ‘gpio’  
Jan 13 17:59:59 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file lini  
Jan 13 17:59:59 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file lins  
Jan 13 17:59:59 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | proc.c proc\_Start() 1403 | Starting process 'gp4  
Jan 13 17:59:59 swi-mdm9x28-wp user.info Legato: INFO | supervisor[9794]/supervisor T=main | proc.c proc\_Start() 1363 | Execing ‘gpio’  
Jan 13 17:59:59 swi-mdm9x28-wp user.info Legato: INFO | gpioService[1896]/sysfsGpio T=main | gpioSysfsUtils.c gpioSysfs\_SessionOpenHandlerFu7

---

<div class="post-metadata">

**Author:** ![tanaporn\_y](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@tanaporn\_y](https://forum.legato.io/u/tanaporn_y)\
**Post date:** [January 13, 2022, 9:12am UTC](https://forum.legato.io/t/how-to-connecting-gpio13-with-wp76xx/6060/2 "2022-01-13T09:12:06Z")

</div>

COMPONENT\_INIT  
{  
le\_gpioPin7\_SetInput(0);

```
LE_INFO("Pin7 read PP - High: %d", le_gpioPin7_Read());
le_gpioPin8_SetPushPullOutput(LE_GPIOPIN8_ACTIVE_HIGH, true);
le_gpioPin13_SetPushPullOutput(LE_GPIOPIN13_ACTIVE_HIGH, true);
LE_INFO("Pin13 read PP - High: %d", le_gpioPin13_Read());
LE_INFO("Pin8 read PP - High: %d", le_gpioPin8_Read());
    sleep(2);

le_gpioPin8_Activate();

LE_INFO("Pin7 read PP - High: %d", le_gpioPin7_Read());
	le_gpioPin8_SetPushPullOutput(LE_GPIOPIN8_ACTIVE_HIGH, false);
le_gpioPin13_SetPushPullOutput(LE_GPIOPIN13_ACTIVE_HIGH, false);
LE_INFO("Pin13 read PP - High: %d", le_gpioPin13_Read());
LE_INFO("Pin8 read PP - High: %d", le_gpioPin8_Read());

```

}

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [January 13, 2022, 9:17am UTC](https://forum.legato.io/t/how-to-connecting-gpio13-with-wp76xx/6060/3 "2022-01-13T09:17:34Z")

</div>

you can try this example:

> **[Is there a sample app using gpio pin?](https://forum.mangoh.io/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.

---

<div class="post-metadata">

**Author:** ![tanaporn\_y](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@tanaporn\_y](https://forum.legato.io/u/tanaporn_y)\
**Post date:** [January 13, 2022, 9:38am UTC](https://forum.legato.io/t/how-to-connecting-gpio13-with-wp76xx/6060/4 "2022-01-13T09:38:57Z")

</div>

log data:

Jan 13 18:35:28 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file link ‘/usr/lib/libstdc++.so.6’ to '/legato/systems/current/appsWriteable/gps  
Jan 13 18:35:28 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file link '/legato/systems/current/apps/gpioCf3Demo/read-only/lib/libComponent\_gl  
Jan 13 18:35:28 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file link ‘/legato/systems/current/apps/gpioCf3Demo/read-only/bin/gpioCf3Demo’ tf  
Jan 13 18:35:28 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateTmpFs() 1788 | Mounted tmpfs at /legato/systems/current/appsWriteable/gpioCf3Demo/tmp.  
Jan 13 18:35:28 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateFileLink() 2154 | Created file link ‘/tmp/legato/serviceDirectoryServer’ to '/legato/systems/current/appsWr.  
Jan 13 18:35:28 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateFileLink() 2154 | Created file link ‘/tmp/legato/serviceDirectoryClient’ to '/legato/systems/current/appsWr.  
Jan 13 18:35:28 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | proc.c proc\_Start() 1403 | Starting process ‘gpioCf3Demo’ with pid 18354  
Jan 13 18:35:28 swi-mdm9x28-wp user.info Legato: INFO | supervisor[18354]/supervisor T=main | proc.c proc\_Start() 1363 | Execing ‘gpioCf3Demo’

still error

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [January 13, 2022, 9:43am UTC](https://forum.legato.io/t/how-to-connecting-gpio13-with-wp76xx/6060/5 "2022-01-13T09:43:15Z")

</div>

can you see if you can control the GPIO13?

root@swi-mdm9x28-wp:~# echo 13 \> /sys/class/gpio/export  
-sh: echo: write error: Device or resource busy  
root@swi-mdm9x28-wp:~#  
root@swi-mdm9x28-wp:~# echo out \> /sys/class/gpio/gpio13/direction  
root@swi-mdm9x28-wp:~#  
root@swi-mdm9x28-wp:~# echo 0 \> /sys/class/gpio/gpio13/value  
root@swi-mdm9x28-wp:~#  
root@swi-mdm9x28-wp:~# echo 1 \> /sys/class/gpio/gpio13/value  
root@swi-mdm9x28-wp:~#

---

<div class="post-metadata">

**Author:** ![tanaporn\_y](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@tanaporn\_y](https://forum.legato.io/u/tanaporn_y)\
**Post date:** [January 13, 2022, 9:50am UTC](https://forum.legato.io/t/how-to-connecting-gpio13-with-wp76xx/6060/6 "2022-01-13T09:50:39Z")

</div>

yes. I can control by used command above

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [January 13, 2022, 9:52am UTC](https://forum.legato.io/t/how-to-connecting-gpio13-with-wp76xx/6060/7 "2022-01-13T09:52:47Z")

</div>

I don’t see any error in your logread

---

<div class="post-metadata">

**Author:** ![tanaporn\_y](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@tanaporn\_y](https://forum.legato.io/u/tanaporn_y)\
**Post date:** [January 13, 2022, 9:56am UTC](https://forum.legato.io/t/how-to-connecting-gpio13-with-wp76xx/6060/8 "2022-01-13T09:56:34Z")

</div>

it doesn’t have an error but the program not working while read gpio13 line  
it should read gpio13 after gpio7 but it not.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [January 13, 2022, 9:59am UTC](https://forum.legato.io/t/how-to-connecting-gpio13-with-wp76xx/6060/9 "2022-01-13T09:59:41Z")

</div>

how about my application?  
Do you see the GPIO13 changing state?

---

<div class="post-metadata">

**Author:** ![tanaporn\_y](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@tanaporn\_y](https://forum.legato.io/u/tanaporn_y)\
**Post date:** [January 13, 2022, 10:00am UTC](https://forum.legato.io/t/how-to-connecting-gpio13-with-wp76xx/6060/10 "2022-01-13T10:00:38Z")

</div>

yes. I got this

Jan 13 18:50:18 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c app\_Start() 3471 | Starting app ‘gpioCf3Demo’  
Jan 13 18:50:18 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateFileLink() 2154 | Created file link ‘/dev/log’ to '/legato/systems/current/appsWriteable/gpioCf3Demo/dev/lo.  
Jan 13 18:50:18 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateFileLink() 2154 | Created file link ‘/dev/null’ to '/legato/systems/current/appsWriteable/gpioCf3Demo/dev/n.  
Jan 13 18:50:18 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateFileLink() 2154 | Created file link ‘/dev/zero’ to '/legato/systems/current/appsWriteable/gpioCf3Demo/dev/z.  
Jan 13 18:50:18 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateFileLink() 2154 | Created file link ‘/dev/urandom’ to '/legato/systems/current/appsWriteable/gpioCf3Demo/de.  
Jan 13 18:50:18 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateFileLink() 2154 | Created file link ‘/legato/systems/current/lib/liblegato.so’ to '/legato/systems/current/.  
Jan 13 18:50:18 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateFileLink() 2154 | Created file link ‘/lib/ld-linux.so.3’ to '/legato/systems/current/appsWriteable/gpioCf3D.  
Jan 13 18:50:18 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateFileLink() 2154 | Created file link ‘/lib/libc.so.6’ to '/legato/systems/current/appsWriteable/gpioCf3Demo/.  
Jan 13 18:50:18 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateFileLink() 2154 | Created file link ‘/lib/libpthread.so.0’ to '/legato/systems/current/appsWriteable/gpioCf.  
Jan 13 18:50:18 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateFileLink() 2154 | Created file link ‘/lib/librt.so.1’ to '/legato/systems/current/appsWriteable/gpioCf3Demo.  
Jan 13 18:50:18 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateFileLink() 2154 | Created file link ‘/lib/libdl.so.2’ to '/legato/systems/current/appsWriteable/gpioCf3Demo.  
Jan 13 18:50:18 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateFileLink() 2154 | Created file link ‘/lib/libgcc\_s.so.1’ to '/legato/systems/current/appsWriteable/gpioCf3D.  
Jan 13 18:50:18 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateFileLink() 2154 | Created file link ‘/lib/libm.so.6’ to '/legato/systems/current/appsWriteable/gpioCf3Demo/.  
Jan 13 18:50:18 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateFileLink() 2154 | Created file link ‘/usr/lib/libstdc++.so.6’ to '/legato/systems/current/appsWriteable/gpi.  
Jan 13 18:50:18 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateFileLink() 2154 | Created file link '/legato/systems/current/apps/gpioCf3Demo/read-only/lib/libComponent\_gpe  
Jan 13 18:50:18 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateFileLink() 2154 | Created file link ‘/legato/systems/current/apps/gpioCf3Demo/read-only/bin/gpioCf3Demo’ to3  
Jan 13 18:50:18 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateTmpFs() 1788 | Mounted tmpfs at /legato/systems/current/appsWriteable/gpioCf3Demo/tmp.  
Jan 13 18:50:18 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateFileLink() 2154 | Created file link ‘/tmp/legato/serviceDirectoryServer’ to '/legato/systems/current/appsWr.  
Jan 13 18:50:18 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | app.c CreateFileLink() 2154 | Created file link ‘/tmp/legato/serviceDirectoryClient’ to '/legato/systems/current/appsWr.  
Jan 13 18:50:18 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1079]/supervisor T=main | proc.c proc\_Start() 1403 | Starting process ‘gpioCf3Demo’ with pid 21988  
Jan 13 18:50:18 swi-mdm9x28-wp user.info Legato: INFO | updateDaemon[1093]/updateDaemon T=main | app.c app\_InstallIndividual() 830 | App gpioCf3Demo \<47f33390cd95f1feb6314f9ef70385ce\> installed  
Jan 13 18:50:18 swi-mdm9x28-wp user.info Legato: INFO | updateDaemon[1093]/updateDaemon T=main | updateDaemon.c ApplyAppUpdate() 956 | App ‘gpioCf3Demo\<47f33390cd95f1feb6314f9ef70385ce\>’ installed properly.  
Jan 13 18:50:18 swi-mdm9x28-wp user.info Legato: INFO | supervisor[21988]/supervisor T=main | proc.c proc\_Start() 1363 | Execing ‘gpioCf3Demo’

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [January 13, 2022, 10:03am UTC](https://forum.legato.io/t/how-to-connecting-gpio13-with-wp76xx/6060/11 "2022-01-13T10:03:15Z")

</div>

Then why i don’t see  
LE\_INFO("Pin21 read PP - High: ");  
LE\_INFO("Pin21 read PP - Low: ");

---

<div class="post-metadata">

**Author:** ![tanaporn\_y](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@tanaporn\_y](https://forum.legato.io/u/tanaporn_y)\
**Post date:** [January 13, 2022, 10:10am UTC](https://forum.legato.io/t/how-to-connecting-gpio13-with-wp76xx/6060/12 "2022-01-13T10:10:26Z")

</div>

the program is stop before that line

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [January 13, 2022, 10:31am UTC](https://forum.legato.io/t/how-to-connecting-gpio13-with-wp76xx/6060/13 "2022-01-13T10:31:37Z")

</div>

I don’t see problem on WP76 FW 13.3:

```auto

root@swi-mdm9x28-wp:~# logread -f
Feb 6 00:26:40 swi-mdm9x28-wp user.info Legato: INFO | gpioCf3Demo[1669]/gpioCf3DemoComponent T=main | gpioCf3DemoComponent.c Pin21GpioSignal() 30 | Pin21 read PP - High:
Feb 6 00:26:43 swi-mdm9x28-wp user.info Legato: INFO | gpioCf3Demo[1669]/gpioCf3DemoComponent T=main | gpioCf3DemoComponent.c Pin21GpioSignal() 34 | Pin21 read PP - Low:
Feb 6 00:26:46 swi-mdm9x28-wp user.info Legato: INFO | gpioCf3Demo[1669]/gpioCf3DemoComponent T=main | gpioCf3DemoComponent.c Pin21GpioSignal() 30 | Pin21 read PP - High:
Feb 6 00:26:49 swi-mdm9x28-wp user.info Legato: INFO | gpioCf3Demo[1669]/gpioCf3DemoComponent T=main | gpioCf3DemoComponent.c Pin21GpioSignal() 34 | Pin21 read PP - Low:
Feb 6 00:26:50 swi-mdm9x28-wp user.warn Legato: -WRN- | supervisor[840]/supervisor T=main | apps.c appCtrl_Stop() 1694 | Application 'gpioCfg3Demo' is not running and cannot be stopped.
Feb 6 00:26:50 swi-mdm9x28-wp user.err Legato: =ERR= | supervisor[840]/supervisor T=main | apps.c CreateApp() 607 | Application 'gpioCfg3Demo' is not installed.
Feb 6 00:26:52 swi-mdm9x28-wp user.info Legato: INFO | gpioCf3Demo[1669]/gpioCf3DemoComponent T=main | gpioCf3DemoComponent.c Pin21GpioSignal() 30 | Pin21 read PP - High:
Feb 6 00:26:55 swi-mdm9x28-wp user.info Legato: INFO | gpioCf3Demo[1669]/gpioCf3DemoComponent T=main | gpioCf3DemoComponent.c Pin21GpioSignal() 34 | Pin21 read PP - Low:
Feb 6 00:26:56 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | app.c app_Stop() 3545 | Stopping app 'gpioCf3Demo'
Feb 6 00:26:57 swi-mdm9x28-wp user.warn Legato: -WRN- | supervisor[840]/supervisor T=main | app.c HardKillApp() 1534 | Hard killing app 'gpioCf3Demo'
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | gpioService[869]/sysfsGpio T=main | gpioSysfsUtils.c gpioSysfs_SessionCloseHandlerFunc() 1178 | Releasing GPIO 13
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | app.c app_StopComplete() 4686 | app 'gpioCf3Demo' has stopped.
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | apps.c DeactivateAppContainer() 374 | Application 'gpioCf3Demo' has stopped.
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | app.c app_Start() 3420 | Starting app 'gpioCf3Demo'
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/dev/log' to '/legato/systems/current/appsWriteable/gpioCf3Demo/dev/log': Already exists
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/dev/null' to '/legato/systems/current/appsWriteable/gpioCf3Demo/dev/null': Already exists
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/dev/zero' to '/legato/systems/current/appsWriteable/gpioCf3Demo/dev/zero': Already exists
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/legato/systems/current/lib/liblegato.so' to '/legato/systems/current/appsWriteable/gpioCf3Demo/lib/liblegato.so': Already exists
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/lib/ld-linux.so.3' to '/legato/systems/current/appsWriteable/gpioCf3Demo/lib/ld-linux.so.3': Already exists
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/lib/libc.so.6' to '/legato/systems/current/appsWriteable/gpioCf3Demo/lib/libc.so.6': Already exists
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/lib/libpthread.so.0' to '/legato/systems/current/appsWriteable/gpioCf3Demo/lib/libpthread.so.0': Already exists
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/lib/librt.so.1' to '/legato/systems/current/appsWriteable/gpioCf3Demo/lib/librt.so.1': Already exists
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/lib/libdl.so.2' to '/legato/systems/current/appsWriteable/gpioCf3Demo/lib/libdl.so.2': Already exists
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/lib/libgcc_s.so.1' to '/legato/systems/current/appsWriteable/gpioCf3Demo/lib/libgcc_s.so.1': Already exists
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/lib/libm.so.6' to '/legato/systems/current/appsWriteable/gpioCf3Demo/lib/libm.so.6': Already exists
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/usr/lib/libstdc++.so.6' to '/legato/systems/current/appsWriteable/gpioCf3Demo/lib/libstdc++.so.6': Already exists
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/legato/systems/current/apps/gpioCf3Demo/read-only/lib/libComponent_gpioCf3DemoComponent.so' to '/legato/systems/current/appsWriteabl
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/legato/systems/current/apps/gpioCf3Demo/read-only/bin/gpioCf3Demo' to '/legato/systems/current/appsWriteable/gpioCf3Demo/bin/gpioCf3
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | app.c CreateTmpFs() 1738 | Mounted tmpfs at /legato/systems/current/appsWriteable/gpioCf3Demo/tmp.
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/tmp/legato/serviceDirectoryServer' to '/legato/systems/current/appsWriteable/gpioCf3Demo/tmp/legato/serviceDirectoryServer'.
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/tmp/legato/serviceDirectoryClient' to '/legato/systems/current/appsWriteable/gpioCf3Demo/tmp/legato/serviceDirectoryClient'.
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxCoreDumpFileBytes to value 102400.
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxFileBytes to value 102400.
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxLockedMemoryBytes to value 8192.
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxFileDescriptors to value 256.
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxMQueueBytes to value 512.
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxThreads to value 20.
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxQueuedSignals to value 100.
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[840]/supervisor T=main | proc.c proc_Start() 1390 | Starting process 'gpioCf3Demo' with pid 1733
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1733]/supervisor T=main | proc.c proc_Start() 1355 | Execing 'gpioCf3Demo'
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | gpioService[869]/sysfsGpio T=main | gpioSysfsUtils.c gpioSysfs_SessionOpenHandlerFunc() 1139 | Assigning GPIO 13
Feb 6 00:26:57 swi-mdm9x28-wp user.warn Legato: -WRN- | _UNKNOWN_[1733]/framework T=main | LE_FILENAME le_fdMonitor_Create() 667 | FD Monitor object name 'gpioCf3Demo.gpioCf3DemoComponent.le_gpioPin21' truncated to 'gpioCf3Demo.gpioCf3DemoComponen'.
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | gpioCf3Demo[1733]/gpioCf3DemoComponent T=main | gpioCf3DemoComponent.c _gpioCf3DemoComponent_COMPONENT_INIT() 43 | This is sample gpioctl Legato CF3 GPIO app by using le_gpio.api
Feb 6 00:26:57 swi-mdm9x28-wp user.info Legato: INFO | gpioCf3Demo[1733]/gpioCf3DemoComponent T=main | gpioCf3DemoComponent.c Pin21GpioSignal() 30 | Pin21 read PP - High:
Feb 6 00:27:00 swi-mdm9x28-wp user.info Legato: INFO | gpioCf3Demo[1733]/gpioCf3DemoComponent T=main | gpioCf3DemoComponent.c Pin21GpioSignal() 34 | Pin21 read PP - Low:

```

---

<div class="post-metadata">

**Author:** ![tanaporn\_y](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@tanaporn\_y](https://forum.legato.io/u/tanaporn_y)\
**Post date:** [January 14, 2022, 8:47am UTC](https://forum.legato.io/t/how-to-connecting-gpio13-with-wp76xx/6060/14 "2022-01-14T08:47:15Z")

</div>

Jan 14 17:37:26 swi-mdm9x28-wp user.info Legato: INFO | supervisor[9500]/supervisor T=main | proc.c proc\_Start() 1363 | Execing ‘gpio’  
Jan 14 17:37:26 swi-mdm9x28-wp user.info Legato: INFO | gpioService[1918]/sysfsGpio T=main | gpioSysfsUtils.c gpioSysfs\_SessionOpenHandlerFunc() 1176 | Assigning GPIO 2  
Jan 14 17:37:26 swi-mdm9x28-wp user.info Legato: INFO | gpioService[1918]/sysfsGpio T=main | gpioSysfsUtils.c gpioSysfs\_SessionOpenHandlerFunc() 1176 | Assigning GPIO 7  
Jan 14 17:37:26 swi-mdm9x28-wp user.info Legato: INFO | gpioService[1918]/sysfsGpio T=main | gpioSysfsUtils.c gpioSysfs\_SessionOpenHandlerFunc() 1176 | Assigning GPIO 8Jan 14 17:40:09 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1078]/supervisor T=main | app.c app\_Stop() 3596 | Stopping app ‘gpio’  
Jan 14 17:40:09 swi-mdm9x28-wp user.info Legato: INFO | gpioService[1918]/sysfsGpio T=main | gpioSysfsUtils.c gpioSysfs\_SessionCloseHandlerFunc() 1215 | Releasing GPIO 2  
Jan 14 17:40:09 swi-mdm9x28-wp user.info Legato: INFO | gpioService[1918]/sysfsGpio T=main | gpioSysfsUtils.c gpioSysfs\_SessionCloseHandlerFunc() 1215 | Releasing GPIO 7  
Jan 14 17:40:09 swi-mdm9x28-wp user.info Legato: INFO | gpioService[1918]/sysfsGpio T=main | gpioSysfsUtils.c gpioSysfs\_SessionCloseHandlerFunc() 1215 | Releasing GPIO 8

legato program cannot open handler function. I have to use app stop tp  
how can I fixed it??

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [January 14, 2022, 9:06am UTC](https://forum.legato.io/t/how-to-connecting-gpio13-with-wp76xx/6060/15 "2022-01-14T09:06:28Z")

</div>

this is not about GPIO13…  
Are you using my app?

---

<div class="post-metadata">

**Author:** ![tanaporn\_y](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@tanaporn\_y](https://forum.legato.io/u/tanaporn_y)\
**Post date:** [January 14, 2022, 9:29am UTC](https://forum.legato.io/t/how-to-connecting-gpio13-with-wp76xx/6060/16 "2022-01-14T09:29:16Z")

</div>

can you check it for me??  
sandboxed : false

adef:  
executables:  
{  
gpio = ( gpioComponent )  
}

bindings:  
{  
gpio.gpioComponent.le\_gpioPin7 → gpioService.le\_gpioPin7  
gpio.gpioComponent.le\_gpioPin8 → gpioService.le\_gpioPin8  
gpio.gpioComponent.le\_gpioPin13 → gpioService.le\_gpioPin13  
gpio.gpioComponent.le\_gpioPin23 → gpioService.le\_gpioPin23  
gpio.gpioComponent.le\_gpioPin25 → gpioService.le\_gpioPin25  
gpio.gpioComponent.le\_gpioPin42 → gpioService.le\_gpioPin42  
}

processes:  
{  
/\*envVars:  
{

```
LE_LOG_LEVEL = DEBUG
}*/

run:
{
    ( gpio )
}

```

}

---

<div class="post-metadata">

**Author:** ![tanaporn\_y](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@tanaporn\_y](https://forum.legato.io/u/tanaporn_y)\
**Post date:** [January 14, 2022, 9:31am UTC](https://forum.legato.io/t/how-to-connecting-gpio13-with-wp76xx/6060/17 "2022-01-14T09:31:14Z")

</div>

cdef.

requires:  
{  
api:  
{  
le\_gpioPin7 = ${LEGATO\_ROOT}/interfaces/le\_gpio.api  
le\_gpioPin8 = ${LEGATO\_ROOT}/interfaces/le\_gpio.api  
le\_gpioPin13 = ${LEGATO\_ROOT}/interfaces/le\_gpio.api  
le\_gpioPin25 = ${LEGATO\_ROOT}/interfaces/le\_gpio.api  
le\_gpioPin23 = ${LEGATO\_ROOT}/interfaces/le\_gpio.api  
le\_gpioPin42 = ${LEGATO\_ROOT}/interfaces/le\_gpio.api  
}  
}

cflags:  
{  
“-std=c99”  
}

sources:  
{  
gpio.c  
}

---

<div class="post-metadata">

**Author:** ![tanaporn\_y](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@tanaporn\_y](https://forum.legato.io/u/tanaporn_y)\
**Post date:** [January 14, 2022, 9:33am UTC](https://forum.legato.io/t/how-to-connecting-gpio13-with-wp76xx/6060/18 "2022-01-14T09:33:18Z")

</div>

#include “legato.h”  
#include “interfaces.h”

COMPONENT\_INIT  
{  
LE\_INFO(“Pin13 read PP - High: %d”, le\_gpioPin13\_Read());

}

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [January 14, 2022, 9:41am UTC](https://forum.legato.io/t/how-to-connecting-gpio13-with-wp76xx/6060/19 "2022-01-14T09:41:34Z")

</div>

why don’t you try my app first?  
It is more simple that just one GPIO is used.

---

<div class="post-metadata">

**Author:** ![tanaporn\_y](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@tanaporn\_y](https://forum.legato.io/u/tanaporn_y)\
**Post date:** [January 14, 2022, 9:46am UTC](https://forum.legato.io/t/how-to-connecting-gpio13-with-wp76xx/6060/20 "2022-01-14T09:46:17Z")

</div>

I already tried it was the same result

[Next page](https://forum.legato.io/t/how-to-connecting-gpio13-with-wp76xx/6060.md?page=2)
