# Monitoring wakeup reasons of AR7594

**URL:** <https://forum.legato.io/t/monitoring-wakeup-reasons-of-ar7594/3503>\
**Category:** Legato Application Framework\
**Created:** [August 1, 2018, 12:27pm UTC](https://forum.legato.io/t/monitoring-wakeup-reasons-of-ar7594/3503 "2018-08-01T12:27:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![elektronenhirn](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/elektronenhirn/32/379_2.png) [@elektronenhirn](https://forum.legato.io/u/elektronenhirn)\
**Post date:** [August 1, 2018, 12:27pm UTC](https://forum.legato.io/t/monitoring-wakeup-reasons-of-ar7594/3503/1 "2018-08-01T12:27:34Z")

</div>

Hi,

we recently starting deploying our device to a number of test customers. Our device shall sleep (suspend to ram) most of the time, but it can be woken up by SMS and a couple of GPIOs.

While browsing through the logfiles from our test devices, we saw a couple of wakeups which we couldn’t explain. Some colleagues are already starting to blame EMF radiation.

So I was wondering if there is a way to track down the reason for each single wakeup:

1. Can Legato notify our application after a wakeup occured?
2. Can we query the wakeup reason from Legato or from the kernel then? (I noticed /sys/kernel/wakeup\_reasons/last\_resume\_reason, but it seems to be always empty)
3. Is there any kernel debug output we could activate to log the wakeup reason?

Cheers  
Flo

---

<div class="post-metadata">

**Author:** ![flu](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/flu/32/813_2.png) [@flu](https://forum.legato.io/u/flu)\
**Post date:** [August 8, 2018, 7:58am UTC](https://forum.legato.io/t/monitoring-wakeup-reasons-of-ar7594/3503/2 "2018-08-08T07:58:22Z")

</div>

Hello Flo,

If useful, here is a command that list the active wakeup sources:

```
# cat /sys/kernel/debug/wakeup_sources | sed -e s/"^ "/"unnamed"/ | awk '{print $6 "\t" $1}' | grep -v "^0" | sort -n
active_since	name
138671	msm_otg

```

(here the remaining wakeup source if due to the USB cable still connected to the device.)

It should be possible to read proc file system from a Legato Application. You have to tune yout \*.adef accordingly.

KR.

---

<div class="post-metadata">

**Author:** ![elektronenhirn](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/elektronenhirn/32/379_2.png) [@elektronenhirn](https://forum.legato.io/u/elektronenhirn)\
**Post date:** [August 10, 2018, 1:56pm UTC](https://forum.legato.io/t/monitoring-wakeup-reasons-of-ar7594/3503/3 "2018-08-10T13:56:25Z")

</div>

Hi KR,

thanks for your reply.

In the meantime we gathered some more hints:

- we observed that these wakeups are happening more frequent at places with no/or bad network signal (e.g. underground parking).
- the wakeups are not happening anymore if we switch on airplane mode (`cm radio off`)

=\> so our conclusion right now is that these wakeups are caused by the baseband processor.

We are just wondering: is that an intended - to be expected - behavior? Does the baseband processor actively wakeup the application processor regularly in case network signal is bad?  
Or are we suffering from some kind of electrical side-effect?

Any hints or experiences are highly appreciated.

Cheers  
Flo

---

<div class="post-metadata">

**Author:** ![elektronenhirn](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/elektronenhirn/32/379_2.png) [@elektronenhirn](https://forum.legato.io/u/elektronenhirn)\
**Post date:** [August 27, 2018, 1:42pm UTC](https://forum.legato.io/t/monitoring-wakeup-reasons-of-ar7594/3503/4 "2018-08-27T13:42:05Z")

</div>

In the meantime we got in contact with swi: they confirmed that behavior.

So wakeups in low/no signal situations should be considered as normal.
