kizniche / ttgo-tbeam-ttn-tracker

TTGO T-Beam Tracker for TTN Mapper and TTN Tracker using US (915 MHz) and EU (868 MHz) frequencies
https://kylegabriel.com/projects/2019/04/lorawan-tracker-and-mapper.html
GNU General Public License v3.0
262 stars 139 forks source link

Need to allow for clock drift #4

Closed mtbspace closed 3 years ago

mtbspace commented 4 years ago

I think this may be device dependent, but I couldn't get things working reliably on my T-Beam until I added this in the the ttn_join() function in ttn.ino (add after LMIC_reset()):

LMIC_setClockError(MAX_CLOCK_ERROR * 5 / 100);

As per this discussion on the ttn forums: https://www.thethingsnetwork.org/forum/t/lmic-on-adafruit-lora-feather-successfully-sends-message-to-ttn-and-then-halts-with-packet-queued/3762/35

mtbspace commented 4 years ago

Although 5 worked for me, different devices might need different values depending on their clock accuracy. May be worth making it configurable?

kizniche commented 4 years ago

Just made it an editable option