Page 1 of 1

Discrepancy between Meter Hex Log and EKM Dash indication

Posted: Fri Mar 07, 2014 3:57 am
by cctalk
I have discovered the Meter date discrepancy between the EKM Dash indication and the Meter Hex Log.
The EKM Dash shows Meter Date 2014-03-07 12:16:48
and in the log I see 31 34 30 33 30 38 30 37 31 30 34 36 30 32
what means 2014-03-08 10:46:02. Could you explain this, please.
Many thanks.
The Meter Hex Log:

Meter Model: EKM-Omnimeter Pulse v.4
Address: 192.168.1.125
Port: 50000

Send
2F 3F 30 30 30 33 30 30 30 30 30 39 34 33 30 30
21 0D 0A

Receive
02 10 24 15 30 30 30 33 30 30 30 30 30 39 34 33
30 30 30 33 35 36 37 30 30 30 30 30 31 34 34 33
30 30 30 32 36 37 34 38 30 30 30 30 30 30 33 38
30 30 30 30 33 33 31 36 30 30 30 33 32 33 31 30
30 30 30 30 30 30 33 38 30 30 30 30 31 34 36 36
30 30 30 32 35 32 34 38 30 30 30 33 35 36 37 30
30 30 30 32 36 37 34 38 30 30 30 30 32 32 34 31
32 32 34 31 30 30 30 30 30 30 30 30 30 30 30 30
30 34 33 30 30 30 30 30 30 30 30 30 30 30 30 30
30 30 30 30 30 39 37 30 30 30 30 30 39 37 30 43
30 30 30 43 30 30 30 20 31 30 30 30 30 30 30 30
30 30 30 30 30 30 30 30 30 30 30 30 30 30 33 38
30 30 30 30 30 33 38 35 30 30 32 30 30 30 30 30
30 35 34 30 30 30 30 30 31 32 39 30 30 30 30 30
30 35 32 30 31 32 32 30 30 31 34 30 33 30 38 30
37 31 30 34 36 30 32 30 30 21 0D 0A 03 4A 14

Re: Discrepancy between Meter Hex Log and EKM Dash indicatio

Posted: Fri Mar 07, 2014 5:44 pm
by riv
Joining the question. The outputs are:

Script:
... 31 34 30 33 30 38 30 37 30 38 34 38 33 33 ...
meterDate = 2014-03-08 08:48:33
computerDate = 2014-03-07 19:41:26
==================================================================
EKM Dash:
Meter Date 2014-03-07 19:49:26
Computer Date 2014-03-07 19:42:21

Anyone how how to get right hour value from it?

Thank you

Re: Discrepancy between Meter Hex Log and EKM Dash indicatio

Posted: Fri Mar 07, 2014 6:34 pm
by Jameson
Thanks riv and cctalk for bringing this to our attention.
Meter Time in Hex.png
Meter Time in Hex.png (373.85 KiB) Viewed 11827 times
Here is the Hex that I got for time on a V4 meter:

31 34 30 33 30 37 30
36 31 37 31 35 32 39

From this I parse 14 03 07 06 17 15 29

06 is the day of the week.

To be honest, Im not seeing it now (though I did spot some other issue where I couldn't set my meter time to anything I wanted). So I will look into this further - Setting time, verifying time in Hex, etc

Here is what I would do first (this assumes a meter connected via USB converter or iSerial), go to Edit Meter > General > Date and Time. Click "Now" and then very quickly click "Set" and enter your password. This is the closest approximation you will get you syncing with your computer time. This worked for me just now, the bug I just mentioned, we will look into.

From what you guys sent me it looks like there is more to this story, is your EKM Dash misinterpreting your data? If you restart the Dash does the problem correct itself? Thanks for any help or any additional information you can give. I would also want to make sure you are looking at the latest read in both the Hex Inspector and in the Data column.

Thanks again, we really appreciate this kind of user involvement and feedback :ugeek:

Regards,

Re: Discrepancy between Meter Hex Log and EKM Dash indicatio

Posted: Fri Mar 07, 2014 7:44 pm
by riv
No, the restart of Dash is not fixing the problem, more funny - Dash show correct data since I reset meter a few weeks ago to the right time, so small discrepancy what I have is used for specific testing purpose.
Following code has been used to sync with the computer clock earlier:

my $now_date = strftime("%y%m%d", localtime);
my $now_time = strftime("%H%M%S", localtime);
my $now_dayofweek = strftime("%w", localtime) + 1;
my $now_string = sprintf("%s0%i%s", $now_date, $now_dayofweek, $now_time);
ekm_write_command($sock, "\x01\x57\x31\x02\x30\x30\x36\x30\x28" . $now_string . "\x29\x03");

Re: Discrepancy between Meter Hex Log and EKM Dash indicatio

Posted: Sat Mar 08, 2014 11:30 am
by Jameson
We have narrowed down what we think could be going on. We have been able to reproduce the issue with a different meter. It seems like the issue is with how the EKM Dash interprets the time of the v4 meter is messed up. No matter what time the v4 meter reports to the Dash, the Dash will display the Day of the Month and the Hours as the same as computer time. For example if the meter is set to March 5th 08:54:32 and the computer time is March 6th 4:42:39, then the Dash will display the meter time as March 6th 4:54:32.

This also messes up your ability to set meter time. I was able to set meter time to computer time, but not to any time that I wanted. Just follow the instructions I already posted here to do this.

This should be an easy bug to fix, we will release a fix with our next update.

So thanks again for all of your help. We want to keep pushing the Dash forward to be a more useful tool, any help you can give to get us there is great.

Best regards,

Re: Discrepancy between Meter Hex Log and EKM Dash indicatio

Posted: Sun Mar 09, 2014 9:05 am
by riv
re-synching clock looks like sorted the problem yesterday, but today after timezone has been changed from EST to EDT, it does now want to sync right:

I am sending ekm_sync_time now_string = 14030901120317 value

but receiving back "31 34 30 33 30 39 30 31 31 31 30 33 31 38 = [14030901110318]"

EKM: meterDate = 2014-03-09 11:03:18
EKM: computerDate = 2014-03-09 12:03:18

Any clue why the meter does not want to set to EDT now?

The code is still the same and password is set for now to empty string "":

ekm_write_command($sock, "\x01\x50\x31\x02\x28" . $password . "\x29\x03");
ekm_write_command($sock, "\x01\x57\x31\x02\x30\x30\x36\x30\x28" . $now_string . "\x29\x03");

sub ekm_write_command {
my $sock = shift(@_);
my $command = shift(@_);

if (length($command) > 7) {
my $crc16sting = substr($command,1,length($command)-1);
my $calc_crc16 = ekm_calc_crc16($crc16sting);
my $crc16hi = ($calc_crc16>>8);
my $crc16lo = ($calc_crc16-($crc16hi<<8));

my $tosend = $command . chr($crc16hi) . chr($crc16lo);

syswrite($sock, $tosend);
}
}

Another question regarding losing the clock precision - just less then 2 hours, after dash clock resync, the discrepancy between went to 3-4 seconds:
Meter Date 2014-03-09 14:54:40
Computer Date 2014-03-09 14:54:43

Why does the meter lose so much in so small amount of time?

Thank you

Re: Discrepancy between Meter Hex Log and EKM Dash indicatio

Posted: Mon Mar 10, 2014 6:24 am
by riv
Please ignore my question on the clock sync. It has been fixed. I will share the script in a couple of days.