Hi! I am developing a zigbee sleeping device using jn5169 MCU and JN-SW-4170 SDK. When the device loses its connection, it should go to sleep and wake up once a minute and try to reconnect, but if the button is pressed, it should also wake up and try to reconnect. I am using the PWRM_eScheduleActivity () function to sleep. How to cancel or restart an event scheduled by this function if the button was pressed and the reconnection was successful?
Hi Alkarax,
Could you please confirm the AN that you are working on?
What is the value that you are getting in the variable u8WakeInt in the vISR_SystemController function?
What is the timer that you are working on?
Regards,
Mario
Hi Alkarax,
I am sorry, I think that I am understanding your issue.
Are you still getting the button event after the reconnection?
Regards,
Mario
Hi @Alkarax,
Just to confirm, do you want to avoid entering into sleep mode after the reconnection?
You could call PWRM_eStartActivity to avoid entering into sleep mode and after that, you could call PWRM_eFinishActivity to allow entry into sleep.
Regards,
Mario
Hi, Mario! No, not like this. Imagine the situation: my device lost connection and enter into sleep for a minute, after 10 seconds I press a button, and it wakes up and reconnects successfully. Now I need to enter into sleep and wake up every 5 seconds (because I am online and send pull requests), but a minute from the beginning of the first sleep has not passed and the past event is still active, even though I no longer need it.
Best regards