SensorAgrv20.sleepAgr(...) problem

Post Reply
Posts: 119
Joined: Mon Jun 02, 2014 11:31 am

SensorAgrv20.sleepAgr(...) problem

Post by MaticS » Mon Dec 16, 2019 10:26 pm

Hi, we have a v12 Plug&Sense node that was fixed (serviced) a while ago, but it used to work well for the last couple of months.
However, now we notice a strange functiion of SensorAgrv20.sleepAgr(...) function call:
(1) the node seems to only sleep for around a second, then executes the code onwards
(2) when executing on the code after the sleepAgr(...), there are no wake-up flags (pluvio interrupt, RTC interrupt)

To isolate the problem, we tested the example weather station reading code, and just added a USB.println("abcd") after the 2 if clauses that check for the interrupt type and the flags. Here is what happens when the code executes (therefore the exact Ag_12_weather_station_sensor_reading sample, with sleepAgr time set to "00:00:00:10" on line 77, and added line 125 USB.println("abcd"):


Moreover, no matter how we change the sleep time, and no matter if we change alarm type to RTC_OFFSET or RTC_ABSOLUTE, it always proceeds in about 1 second, e.g. always sleeping (but not really sleeping) the same, and doesn't give any flags because the code in the if() conditions doesn't execute (just the println executes, therefore no other flags conditions are met).

We tried with setting the clock. Any other suggestion? We really hope the node is not faulty again because it was serviced just about half a year ago and had the internals (partly?) replaced.

BR Matic

Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: SensorAgrv20.sleepAgr(...) problem

Post by libelium-dev » Wed Dec 18, 2019 1:35 pm


It seems that there are interferences in the interruption pin. Please try to find out where the interruptions come. Please include "ifs" to check the following interruptions.
  • PIR_3G_INT
Let us know your findings.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest