HI @ssozonoff,
I don’t believe card.attn modes sleep and watchdog can be combined because they both use the JSON “seconds” value, so even if the Notecard firmware can enable both simultaneously (which I’m not sure - I’d have to experiment) they would have the same duration - which would create a race condition.
Regarding your second question - the host can be woken by the Notecard following an inbound sync if a .qi(s) file changes that is monitored by card.attn:
{ “req”: “card.attn”, “mode”: “arm,files”, “files”: [“hostwake.qi”] }
This assumes that the Notecard is configured to continuous or periodic mode (I assume the latter in your case as I assume you are sleeping the host to conserve power).
I’m not clear why you want to combine attn.sleep with attn.watchdog
- do you need to sleep the host for power conservation ?
- are you relying on the Notecard to store context for the host (in the sleep payload) (A .dbx file is a better alternative for storing critical host non-volatile context).
- Is the intent to use the watchdog to guard against the host not waking correctly ?
.dbx files:
Note that if my replies are off base it may be because of insufficient understand of the problem that you are attempting to solve - if you could supply us with a little more information it would help us to offer better support.
Thanks
Sean