# LMiC's TX\_COMPLETE event takes 20-30 seconds to fire

**URL:** <https://www.thethingsnetwork.org/forum/t/lmics-tx-complete-event-takes-20-30-seconds-to-fire/2639>\
**Category:** End Devices (Nodes)\
**Created:** [June 29, 2016, 9:08am UTC](https://www.thethingsnetwork.org/forum/t/lmics-tx-complete-event-takes-20-30-seconds-to-fire/2639 "2016-06-29T09:08:44Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![telkamp](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/telkamp/32/35697_2.png) [@telkamp](https://www.thethingsnetwork.org/forum/u/telkamp)\
**Post date:** [June 29, 2016, 6:49pm UTC](https://www.thethingsnetwork.org/forum/t/lmics-tx-complete-event-takes-20-30-seconds-to-fire/2639/8 "2016-06-29T18:49:04Z")

</div>

It’s not duty cycle related.

LMiC purposely delays the TX\_COMPLETE event to prevent the next transmission to collide with a downlink that the node did not receive, but the gateway is still busy sending (and therefor not in receive mode).

It uses a worst-case for that, at SF12 in the RX2 window, that is defined by DNW2\_SAFETY\_ZONE (in lmic.c) with a default of 3 seconds.

Maybe this is bit conservative, also because TTN is use SF9 in RX2.

We could implement this another way, by not using the TX\_COMPLETE event to prevent too early tx, such that the node can go in sleep as soon as possible after the RX2 preamble window.

---

_[View the full topic](https://www.thethingsnetwork.org/forum/t/lmics-tx-complete-event-takes-20-30-seconds-to-fire/2639)._
