# send api command in cyclic sleep mode

**URL:** <https://forums.digi.com/t/send-api-command-in-cyclic-sleep-mode/19445>\
**Category:** XBee - 802.15.4\
**Tags:** sleep, api-mode, cyclic, gpio\
**Created:** [April 27, 2018, 4:30pm UTC](https://forums.digi.com/t/send-api-command-in-cyclic-sleep-mode/19445 "2018-04-27T16:30:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JBaczuk](https://avatars.discourse-cdn.com/v4/letter/j/cab0a1/32.png) [@JBaczuk](https://forums.digi.com/u/JBaczuk)\
**Post date:** [April 27, 2018, 4:30pm UTC](https://forums.digi.com/t/send-api-command-in-cyclic-sleep-mode/19445/1 "2018-04-27T16:30:42Z")

</div>

I have a coordinator XBEE S2C running FW 4059 and an end device, same HW, running the same FW version. The end device is in transparent mode and sends data periodically, then sleeps. I have it configured for cyclic sleep mode with 7.95 sec sleep and wait to sleep for 50 ms. The coordinator is in API mode, broadcast mode (DH - 0, DL - FFFF) so that I can send remote AT commands to toggle the GPIO on the end device. The periodic data transmission is working when testing in XCTU, but whenever I try to send a remote AT command from the coordinator, sometimes it returns a (Status OK) but doesn’t toggle the pin. Sometimes it returns a (TX failure).

I assume I’m missing something about how to send commands while in cyclic sleep mode. Thanks!
