I would like to change the sleep time depend on the received lora message. So that I can set the sleep time by sending a lora message with a sleep time to the node. is this possible?
Dynamic sleep time
Update this variable to whatever you want it to sleep, note it’s in milliseconds
uint32_t appTxDutyCycle = 5 * 60 * 1000; // this will make it sleep for 5 minutes
cheers,
Jay
Yes this is totally possible. Search for examples on how to handle LoRaWAN downlink messages. Then extract a value from them to update the variable as @jayjay mentioned (preferably you don’t send milliseconds but instead some multiple like minutes and do calculations back to ms on the MCU).
The dynamic sleep time with appTxDutyCycle is working fine, thanks