Hi @lvdp,
The sensor application note has been designed with a periodic reporting(maximum reporting interval/ sleep interval) of 1 minute and thus the end device time out (keep alive time) was kept as 2 minutes in Light sensor application note. If you modify the value for periodic reporting interval, the gateway/control bridge will not receive the poll request (keep-alive) from the sensor within 2 minutes and thus making the sensor leave network when it wakes up after 10 minutes. So, if periodic sleep is modified the end device time out should also be modified.
The parameter passed to the ZPS_bAplAfSetEndDeviceTimeout decides the end device timeout , below are the values that this function can take:
typedef enum {
ZED_TIMEOUT_10_SEC, // 0 -> 10 seconds
ZED_TIMEOUT_2_MIN, // 1 -> 2 minutes
ZED_TIMEOUT_4_MIN, // 2 -> 4 minutes
ZED_TIMEOUT_8_MIN, // 3 -> 8 minutes
ZED_TIMEOUT_16_MIN, // 4 -> 16 minutes
ZED_TIMEOUT_32_MIN, // 5 -> 32 minutes
ZED_TIMEOUT_64_MIN, // 6 -> 64 minutes
ZED_TIMEOUT_128_MIN, // 7 -> 128 minutes
ZED_TIMEOUT_256_MIN, // 8 -> 256 minutes (4 hrs 16 min)
ZED_TIMEOUT_512_MIN, // 9 -> 512 minutes (8 hrs 32 min)
ZED_TIMEOUT_1024_MIN, // 10 -> 1024 minutes (17 hrs 4 min)
ZED_TIMEOUT_2048_MIN, // 11 -> 2048 minutes (1 day 10 hrs 8 min)
ZED_TIMEOUT_4096_MIN, // 12 -> 4096 minutes (2 days 20 hrs 16 min)
ZED_TIMEOUT_8192_MIN, // 13 -> 8192 minutes (5 days 16 hrs 32 min)
ZED_TIMEOUT_16384_MIN, // 14 -> 16384 minutes (11 days 9 hrs 4 min)
ZED_TIMEOUT_INDEX_MAX,
ZED_TIMEOUT_UNDEFINED = 0xff
}teZedTimeout;
So, for the 12 hours interval, the best suitable value is 1024 minutes.
ZPS_bAplAfSetEndDeviceTimeout(ZED_TIMEOUT_2_MIN);
to
ZPS_bAplAfSetEndDeviceTimeout( ZED_TIMEOUT_1024_MIN);
Regards,
Mario