Timestamp with Android API

CAN to WLAN Gateways in a plastic housing with a flange

Timestamp with Android API

Postby Thibault » Tue 25. Jul 2017, 08: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
Thibault
 
Posts: 1
Joined: Tue 25. Jul 2017, 08:25

Re: Timestamp with Android API

Postby U.Wilhelm » Wed 26. Jul 2017, 09: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 1113 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
-------------------------------
User avatar
U.Wilhelm
Sales & Support
Sales & Support
 
Posts: 1010
Joined: Fri 10. Sep 2010, 18:34
Location: Darmstadt

Re: Timestamp with Android API

Postby Bruno » Fri 28. Jul 2017, 04: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).
Bruno
 
Posts: 1
Joined: Tue 25. Jul 2017, 10:23

Re: Timestamp with Android API

Postby U.Wilhelm » Fri 28. Jul 2017, 11: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
-------------------------------
User avatar
U.Wilhelm
Sales & Support
Sales & Support
 
Posts: 1010
Joined: Fri 10. Sep 2010, 18:34
Location: Darmstadt


Return to PCAN-Wireless Gateway



This website uses cookies for analytics, for logins to the online shop and the forum, and for the handling of an order. By browsing this website you agree to the use of cookies. Detailed information on their use can be found in our privacy policy.

OKPrivacy Policy