# buffering of messages to endpoints when using sleep mode

**URL:** <https://forums.digi.com/t/buffering-of-messages-to-endpoints-when-using-sleep-mode/2277>\
**Category:** XBee - Zigbee\
**Created:** [June 24, 2008, 10:13am UTC](https://forums.digi.com/t/buffering-of-messages-to-endpoints-when-using-sleep-mode/2277 "2008-06-24T10:13:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hcgilje](https://avatars.discourse-cdn.com/v4/letter/h/50afbb/32.png) [@hcgilje](https://forums.digi.com/u/hcgilje)\
**Post date:** [June 24, 2008, 10:13am UTC](https://forums.digi.com/t/buffering-of-messages-to-endpoints-when-using-sleep-mode/2277/1 "2008-06-24T10:13:37Z")

</div>

I have a network set up with 1 coordinator and 4 end devices. The coordinator regularly turns on/off one of the pins on the end devices, and I use sleepmode 4, with SP set to 0x64 (2 seconds), ST at default 5 seconds. The SP on the coordinator is set to the same as the end devices, 0x64.

Since I want to have control over when the pins on the end devices are triggered, I first send a message to each module to activate the ST counter (so the end device is awake), and then after a short delay send the trigger message.  
In the manual it says that the coordinator can only buffer one message to an end device, but I was expecting that to be one message per end device?  
From my experience it seems only to store one message in total.  
What I was hoping to do was to send a list of commands adressed to each end device to wake them up, so I knew that within a 2 second time period all the end devices would poll the coordinator to look for a buffered message, and then wake up. Before the ST time runs out I send the actual trigger messages.

This only works with one end device for me. When I send to more than one, it doesnt work.  
My workaround has been to wake up each module individually with a delay slightly longer than the SP value between each wakeup, but this means the ST period needs to be extended (number of end devices x SP ++ ).  
So with more end devices and longer sleep periods this will be a big problem. For instance with 8 end devices and sleep period of 5 seconds, instead of being able to wake them up within 5 seconds I need 8x5=40 seconds ++ of ST time to make sure they are all awake at the same time.
