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
Timestamp with Android API
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Timestamp with Android API
** we moved this thread to the correct position - WLAN Gateway **
Here a sample (using WireShark with our free Dissector)
You see two time stamps: 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
Here a sample (using WireShark with our free Dissector)
You see two time stamps: 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[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
Re: Timestamp with Android API
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).
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).
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Timestamp with Android API
sorry?!? we did not understand your question - please explain where you get both timestamps from ...
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------