{"action":"created","issue":{"url":"https://api.github.com/repos/matthijskooijman/arduino-lmic/issues/16","repository_url":"https://api.github.com/repos/matthijskooijman/arduino-lmic","labels_url":"https://api.github.com/repos/matthijskooijman/arduino-lmic/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/matthijskooijman/arduino-lmic/issues/16/comments","events_url":"https://api.github.com/repos/matthijskooijman/arduino-lmic/issues/16/events","html_url":"https://github.com/matthijskooijman/arduino-lmic/issues/16","id":150560304,"number":16,"title":"EV_TXCOMPLETE slow to occur","user":{"login":"torntrousers","id":12925578,"avatar_url":"https://avatars.githubusercontent.com/u/12925578?v=3","gravatar_id":"","url":"https://api.github.com/users/torntrousers","html_url":"https://github.com/torntrousers","followers_url":"https://api.github.com/users/torntrousers/followers","following_url":"https://api.github.com/users/torntrousers/following{/other_user}","gists_url":"https://api.github.com/users/torntrousers/gists{/gist_id}","starred_url":"https://api.github.com/users/torntrousers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torntrousers/subscriptions","organizations_url":"https://api.github.com/users/torntrousers/orgs","repos_url":"https://api.github.com/users/torntrousers/repos","events_url":"https://api.github.com/users/torntrousers/events{/privacy}","received_events_url":"https://api.github.com/users/torntrousers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-23T14:30:30Z","updated_at":"2016-04-25T09:45:47Z","closed_at":null,"body":"I've been looking at a battery powered node using an ESP8266 and RFM95W hoping to get quite long battery life sleeping most of the time, however it turns out that it takes quite a long time for the node to do a send and get the TX_COMPLETE event back, 6 - 10 seconds, so even when using deepSleep for the rest of the time that 10 seconds of up time would drain the batteries quite quickly.\r\n\r\nThat seems odd, it shouldn't take so long should it? Poking around in the LMIC code and the SX1276 datasheet it sounded like after a send DIO0 going high would indicate the send is complete so I've tried using that to trigger when to put the ESP8266 in deepSleep, and that seems to work, DIO0 goes high about 130 milliseconds after the send and putting the ESP8266 to sleep then the gateway still seems to get the transmission ok.\r\n\r\nI wonder is this a bug in the LMIC code that its not doing the EV_TXCOMPLETE sooner, or perhaps is the SX1276 carrying on finishing the send after i put the ESP to sleep after 130milliseconds and the SX1276 stays awake? Any ideas?\r\n\r\nI've put this code i have for this ESP8266/RFM95W node [here](https://github.com/HarringayMakerSpace/IoT/blob/master/LoraNode1/LoraNode1.ino).\r\n\r\n(I've previously asked about this over [here](http://forum.thethingsnetwork.org/t/esp8266-rfm95w-node-how-long-should-a-send-take/1890))  "},"comment":{"url":"https://api.github.com/repos/matthijskooijman/arduino-lmic/issues/comments/214237959","html_url":"https://github.com/matthijskooijman/arduino-lmic/issues/16#issuecomment-214237959","issue_url":"https://api.github.com/repos/matthijskooijman/arduino-lmic/issues/16","id":214237959,"user":{"login":"torntrousers","id":12925578,"avatar_url":"https://avatars.githubusercontent.com/u/12925578?v=3","gravatar_id":"","url":"https://api.github.com/users/torntrousers","html_url":"https://github.com/torntrousers","followers_url":"https://api.github.com/users/torntrousers/followers","following_url":"https://api.github.com/users/torntrousers/following{/other_user}","gists_url":"https://api.github.com/users/torntrousers/gists{/gist_id}","starred_url":"https://api.github.com/users/torntrousers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torntrousers/subscriptions","organizations_url":"https://api.github.com/users/torntrousers/orgs","repos_url":"https://api.github.com/users/torntrousers/repos","events_url":"https://api.github.com/users/torntrousers/events{/privacy}","received_events_url":"https://api.github.com/users/torntrousers/received_events","type":"User","site_admin":false},"created_at":"2016-04-25T09:45:46Z","updated_at":"2016-04-25T09:45:46Z","body":"Thanks for the suggestion. I've tried that but it doesn't seem to help though and TXCOMPLETE still takes six seconds or so to happen."}}