# Reset modem API function

**URL:** <https://forum.legato.io/t/reset-modem-api-function/3233>\
**Category:** Legato Application Framework\
**Created:** [April 25, 2018, 10:09pm UTC](https://forum.legato.io/t/reset-modem-api-function/3233 "2018-04-25T22:09:18Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![raf](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@raf](https://forum.legato.io/u/raf)\
**Post date:** [April 27, 2018, 2:01am UTC](https://forum.legato.io/t/reset-modem-api-function/3233/6 "2018-04-27T02:01:12Z")

</div>

Hi.

I too needed this some time ago and implemented it much like @jyijyi using `faultAction: reboot` in the adef file. It has the added benefit of allowing the app to run sandboxed and let the supervisor deal with fault recovery.

I went a step further and bundled this functionality up in a separate app with the intention of adding more “custom” APIs for other system functions I might need available to any app running on my system.

Basically, my _utility_ app `.c` file consisted of something like this:

```auto
void sys_util_Reboot()
{
	LE_INFO("User-initiated system reboot...");
	kill(getpid(), SIGINT);
}

COMPONENT_INIT
{
    LE_INFO(" ***Starting System Utility Service***");
}

```

With a simple `.api` file containing:

```auto
/**
 * Function that reboots the system.
 */
FUNCTION Reboot
(
);

```

Hope this helps.  
Raf

---

_[View the full topic](https://forum.legato.io/t/reset-modem-api-function/3233)._
