I did some experiment with the sample code that @mlw suggested.
I got the gnss enabled, GetDate() and GetTime() also working.
Then, I called the le_rtc_*** functions as per the documentation. Now the app is stuck on connecting to RTC service.
As per the documentation, le_rtc_connectService() is a blocking call. I checked the log and confirmed.
I did check that modemService is running. But it doesn’t go through this call. (checked with sandbox:false and true as well)
Am I missing something? Please suggest.
Here is the snippet of the auto generated code…
// Library initialization function.
// Will be called by the dynamic linker loader when the library is loaded.
attribute((constructor)) void _timeSyncComponent_Init(void)
LE_DEBUG(“Initializing timeSyncComponent component library.”);
// Connect client-side IPC interfaces.
// Register the component with the Log Daemon.
timeSyncComponent_LogSession = log_RegComponent("timeSyncComponent", &timeSyncComponent_LogLevelFilterPtr);
//Queue the COMPONENT_INIT function to be called by the event loop