Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ttn-otaa-network-time.ino returns with USER CALLBACK: Not a success #818

Closed
geronimoooooooo opened this issue Nov 19, 2021 · 5 comments
Closed
Assignees
Labels

Comments

@geronimoooooooo
Copy link

I need to get time to my device ttgo t-beam and therefore I used ttn-otaa-network-time.ino.
https://github.com/mcci-catena/arduino-lmic/blob/master/examples/ttn-otaa-network-time/ttn-otaa-network-time.ino

But I never pass

if (flagSuccess != 1) {
Serial.println(F("USER CALLBACK: Not a success"));
return;
}

flagSuccess has always value 0.
The communication with TTN v3 works fine and there are no other problems.

latest mcci arduino-lmic
platformIO
Regio EU868
ttgo t-beam v1.1

Does this example work with TTN v3? Do I have to set up anything special to be able to query time?

any help would be appreciated

@dhineshkumarmcci
Copy link

yes, this example work with TTN V3.

Do I have to set up anything special to be able to query time?

Yes, you have to set LMIC_ENABLE_DeviceTimeReq to 1 in config.h, please find link below.
https://github.com/mcci-catena/arduino-lmic/blob/master/src/lmic/config.h#L172

@terrillmoore
Copy link
Member

terrillmoore commented Nov 20, 2021

@geronimoooooooo did this fix your problem? This is working for us, so this might not be a bug.

@terrillmoore
Copy link
Member

Now that TTN v3 is the standard, we should probably enable device time request by default in config.h.

@cyberman54
Copy link

I can confirm that getting the time from TTN v3 network is working this way. And it's pretty precise, i see +/- 100ms.

@terrillmoore
Copy link
Member

@cyberman54 Yes, we've found the same thing. It sometimes takes several queries to get the time, but when it comes in, it works well. I'll create an issue to track changing the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants