LINK ECU Binary Protocol
#1
LINK ECU Binary Protocol
Hello, I am trying to understand the binary protocol of the link ecu so I can finish implementing it in an android app. I was curious if anyone had any experience with the binary protocol or could understand how to calculate the RPM from the 4th & 5th bytes of the sample? I will be releasing this open source if anyone still uses the FM Link ECU
I found a text file included with the data log lab software, it is what I am using to decipher it.
Any help would be much appreciated!
I found a text file included with the data log lab software, it is what I am using to decipher it.
Any help would be much appreciated!
#4
I wrote a windows app that handled the link serial protocol just fine, but that was like 8 years ago and I am not sure what I did with the source code (was many hard drives ago). If I track it down, I'll be sure to try and help.
IIRC, I did bitwise operations to get out the time value and then divided a constant by the time to get the RPM value. Or something like that.
IIRC, I did bitwise operations to get out the time value and then divided a constant by the time to get the RPM value. Or something like that.
#5
Found this. Apologies if the code is ****, I wrote it a million years ago in a language I've since forgotten:
this.rpm = calculateRPM(bytearray[3], bytearray[4]);
private int calculateRPM(byte high, byte low)
{
int rpm = 0;
try
{
int increments_per_minute = 1875000; //(usec * 32 per minute)
int high_byte = (int)high;
int low_byte = (int)low;
int time = (high_byte << 5) + (low_byte >> 2);
rpm = increments_per_minute / time;
}
catch { }
return rpm;
}
{
int rpm = 0;
try
{
int increments_per_minute = 1875000; //(usec * 32 per minute)
int high_byte = (int)high;
int low_byte = (int)low;
int time = (high_byte << 5) + (low_byte >> 2);
rpm = increments_per_minute / time;
}
catch { }
return rpm;
}
Thread
Thread Starter
Forum
Replies
Last Post
bigmackloud
Miata parts for sale/trade
19
01-08-2021 11:24 AM