# Biderectional communication between Apps

**URL:** <https://forum.legato.io/t/biderectional-communication-between-apps/5532>\
**Category:** Legato Application Framework\
**Created:** [December 3, 2020, 5:26pm UTC](https://forum.legato.io/t/biderectional-communication-between-apps/5532 "2020-12-03T17:26:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![reinhard2](https://avatars.discourse-cdn.com/v4/letter/r/958977/32.png) [@reinhard2](https://forum.legato.io/u/reinhard2)\
**Post date:** [December 3, 2020, 5:26pm UTC](https://forum.legato.io/t/biderectional-communication-between-apps/5532/1 "2020-12-03T17:26:27Z")

</div>

Is there a way to properly implement bidirectional communication between 2 seperate Apps? Without using callback-functions?

---

<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:** [December 3, 2020, 10:08pm UTC](https://forum.legato.io/t/biderectional-communication-between-apps/5532/2 "2020-12-03T22:08:17Z")

</div>

Have you tried IPC communication between two applications?

---

<div class="post-metadata">

**Author:** ![reinhard2](https://avatars.discourse-cdn.com/v4/letter/r/958977/32.png) [@reinhard2](https://forum.legato.io/u/reinhard2)\
**Post date:** [December 3, 2020, 10:38pm UTC](https://forum.legato.io/t/biderectional-communication-between-apps/5532/3 "2020-12-03T22:38:49Z")

</div>

I tried using an .api file. But as i understand it the “Client” App can only call “Server” App functions and send data that way, or am i understanding it wrong. Or is it possible to configure each App as Server **and** Client?

---

<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:** [December 4, 2020, 12:02am UTC](https://forum.legato.io/t/biderectional-communication-between-apps/5532/4 "2020-12-04T00:02:27Z")

</div>

You can refer to this

> [@Cannot get callback between components (IPC) to work properly](https://forum.legato.io/t/cannot-get-callback-between-components-ipc-to-work-properly/4653):
>
> Hi, I’m currently working on an application that must send data from one component (component A) to the other (component B) (via IPC). The sending part is implemented via API in component B. communication.api FUNCTION send ( char buffer[BUFFER\_SIZE] IN ); However component B can have data ready at any time for component A. For this case I want to use a callback to send data from component B to component A. I tried the following: communication.api DEFINE BUFFER\_SIZE = 64; HANDLER o…

---

<div class="post-metadata">

**Author:** ![reinhard2](https://avatars.discourse-cdn.com/v4/letter/r/958977/32.png) [@reinhard2](https://forum.legato.io/u/reinhard2)\
**Post date:** [December 4, 2020, 8:49am UTC](https://forum.legato.io/t/biderectional-communication-between-apps/5532/5 "2020-12-04T08:49:38Z")

</div>

I tried using this Event approach and was able to get it to work, thanks!

But it seems i am limited to only sending 4 bytes of data. But i need to send a char array that can easily be 200 char long. Is there a way to increase the payload size?

---

<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:** [December 4, 2020, 9:08am UTC](https://forum.legato.io/t/biderectional-communication-between-apps/5532/6 "2020-12-04T09:08:07Z")

</div>

you can write a loop to send those data repeatedly.

Or you can refer to here to specify the type in .api file:

> **[Syntax - Legato Docs](https://docs.legato.io/latest/apiFilesSyntax.html#apiFilesSyntax_typesStruct)**
>
> legato™ is an open source Linux-based embedded platform designed to simplify connected IoT application development

---

<div class="post-metadata">

**Author:** ![reinhard2](https://avatars.discourse-cdn.com/v4/letter/r/958977/32.png) [@reinhard2](https://forum.legato.io/u/reinhard2)\
**Post date:** [December 4, 2020, 9:38am UTC](https://forum.legato.io/t/biderectional-communication-between-apps/5532/7 "2020-12-04T09:38:55Z")

</div>

It works now! Thanks for your Help!
