Commit aa9763a
committed
samples: adjust light switch keepalive mechanism
When the parent router supports "MAC Data Poll Keepalive" method only,
using `zb_set_keepalive_timeout()` is equivalent to establishing the
poll period.
However, if the parent router supports "End Device Timeout Request Keepalive"
method, the end device will send End Device Timeout Requests according to
the `zb_set_keepalive_timeout()` configuration.
These messages have their corresponding End Device Timeout Responses,
leading to an increment of the radio usage and consequently, power
consumption increase.
This commit makes use of `zb_zdo_pim_set_long_poll_interval()` to establish
the periodicity of the Data Requests, which determine the latency of the device,
while keeping a larger periodicity for the keepalive messages (in case parent
router doesn't support "End Device Timeout Request Keepalive" method.
Signed-off-by: Eduardo Montoya <[email protected]>1 parent a54a025 commit aa9763a
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
646 | 646 | | |
647 | 647 | | |
648 | 648 | | |
| 649 | + | |
| 650 | + | |
649 | 651 | | |
650 | 652 | | |
651 | 653 | | |
| |||
833 | 835 | | |
834 | 836 | | |
835 | 837 | | |
836 | | - | |
| 838 | + | |
837 | 839 | | |
838 | 840 | | |
839 | 841 | | |
| |||
0 commit comments