Timestamp with Android API

CAN to WLAN Gateways in a plastic housing with a flange
Post Reply
Thibault
Posts: 1
Joined: Tue 25. Jul 2017, 09:25

Timestamp with Android API

Post by Thibault » Tue 25. Jul 2017, 09:31

Hello,

I am using the Android API with your CAN to wifi HW. It all works fine. We still have a question on the timestamp. How to use the info timestamp lo and timestamp hi to build the timing of reception of the frame (which should be only one timestamp).

Thanks for your support
Best regards

User avatar
U.Wilhelm
Sales & Support
Sales & Support
Posts: 1078
Joined: Fri 10. Sep 2010, 19:34

Re: Timestamp with Android API

Post by U.Wilhelm » Wed 26. Jul 2017, 10:37

** we moved this thread to the correct position - WLAN Gateway **

Here a sample (using WireShark with our free Dissector)
You see two time stamps:
timestamp.JPG
timestamp.JPG (43.7 KiB) Viewed 1329 times
The Result is 1485329780 and here how to calculate ((ts_h << 32 + ts_l) / 1000000) in Seconds.
This means: Wed, 25 Jan 2017 07:36:20 - see http://www.unixtimestamp.com/index.php
The time is based on the internal RTC. If the RTC Battery is empty - the value is 0 --> 1970-01-01 00:00:00 UTC
--------------------------------
PEAK-System Technik
Technical Support Team
support@peak-system.com
-------------------------------

Bruno
Posts: 1
Joined: Tue 25. Jul 2017, 11:23

Re: Timestamp with Android API

Post by Bruno » Fri 28. Jul 2017, 05:09

Thank you for answering quickly but there's still something odd:
In a message int timestamp_lo = -1138924563 (0xBC1D63ED) and int timestamp_hi = 349517 (0x0005554D) so long timestamp64 = 1501162945 seconds whereas the system timestamp is 1501168955 (System.currentTimeMillis() / 1000L).

User avatar
U.Wilhelm
Sales & Support
Sales & Support
Posts: 1078
Joined: Fri 10. Sep 2010, 19:34

Re: Timestamp with Android API

Post by U.Wilhelm » Fri 28. Jul 2017, 12:56

sorry?!? we did not understand your question - please explain where you get both timestamps from ...
--------------------------------
PEAK-System Technik
Technical Support Team
support@peak-system.com
-------------------------------

Post Reply