BGS5T wrong date | Telit Cinterion IoT Developer Community
October 12, 2015 - 10:06am, 2446 views
I have module running MIDlet, which it's sending some data over GPRS. Module has been running since 28.9.2015 without any problems. Today I discovered that module's time is 1 day behind. I checked it's clock and from the looks of it, it's not even 1 seccond off.
Anyone knows why there could be problem with module's date? Inside the MIDlet only ***** that RTC is changed is on startup, when correct value is set. And at each reviced SMS, but no SMS was sent to module in this time.
EDIT: I also noticed that the month is wrong, so for today i have date: 11.11.2015. I have found a screenshot where date was still ok, it was 29.9.2015. After that I can't be sure when problem ocured.
I did a little bit more reaserch. I can't get the values for the date, but I can see at which server time data was sent. And I could see that on few occasions it coulden't send data (problem with the server, or with service provider). When that happens and it can't send data for specific time interval, module will reset. And when MIDlet starts again, module will get time from service provider. Would be posible that service provider forwarderd wrong time and date settings?
This difference is quite big. How are you set and read the time? Are you using RTC only or some Java classes?
Generally the RTC of BGS5 is not very accurate. And therefore if the precise time is needed the time synchronisation should be done on a regular basis.
The clock inaccuracy may increase especially if some empty loops exist in the user program (or in practise nearly empty loops without any delays added) which puts a significant load on the module and hampers other processes execution.
So I'd add some regular time synchronisation (for example with NTP server or just the wireless network time) and check if it is possible to add more delays in loops without any harm to the program logic.
I discovered that one one occasion module didn't send data for six hours. This was the only module with this problem and this module also has othere service providers then other modules. So on furhter investigation I discovered that service provider was doing some maintance at that time that module was offline. And since I get my time from the network it could be that network was still not working properly when module got it's time.
I don't have any empety loops and in every loop there should be enogh of sleep time.
It seems that the network is the main suspect here.
So for now we can consider this thread as solved.