Reputation: 612
I have a 2011-spec Fiat Punto Evo and it have Blue & Me System equipped with Windows Embedded Automotive. It have a trip logging system called Eco:Drive. It logs all drive data to a USB storage with .bin file extension. Before, I can read the raw data via Eco:Drive app backed via Adobe Air. Now, the app is discontinued and I cant read the data. I try read the .bin file via C# as a binary file with .NET 5 console app but I cannot solve the encoding logic, it gives incomprehensible strings. For example:
In binary array:
95 153 96 13 66 64 71 48 73 45 0 5 12 95 152 176 13 66 64 71 64 73 109 0 5 12 95 159 80 29 66 64 71 80 73 37 46 5 12 95 154 64 29 66 64 71 96 73 29 0 5 12 95 159 104 13 66 64 71 128 73 5 45 5 12 95 158 232 13 66 64 71 144 72 221 0 5 12 95 154 16 13 66 64 71 160 73 29 0 5 12 95 153 248 13 66 64 71 176 73 5 0 5 12 95 153 40 21 66 64 71 192 72 237 0 5 12 95 158 104 13 66 64 71 208 72 205 0 5 12 95 152 248 13 66 64 71 224 72 197 45 5 12 95 152 112 13 66 64 71 240 72 197 0 5 12 95 152 80 13 66 64 72 0 72 197 0 5 12 95 152 48 13 66 64 72 16 72 197 0 5 12 95 152 88 13 66 128 72 32 72 189 0 5 12 95 152 96 13 66 128 72 48 72 173 0 5 12 95 159 120 5 66 128 72 64 72 181 0 5 12 95 152 96 13 66 128 72 80 72 181 0 5 12 95 159 176 5 66 128 72 96 72 181 0 5 12 95 152 24 13 66 128 72 112 72 173 0 5 12 95 152 72 13 66 128 72 128 72 181 0 5 12 95 152 128 13 66 128 72 144 72 189 0 5 12 95 152 128 13 66 128 72 160 72 181 0 5 12 95 152 112 13 66 128 72 176 72 173 0 5 12 95 159 32 5 66 128 72 192 72 181 0 5 12 95 152 160 13 66 128 72 208 72 173 0 5 12 95 159 112 5 66 128 72 224 72 213 0 5 12 95 152 240 13 66 128 72 240 73 85 0 5 12 95 152 248 29 66 128 73 16 73 53 0 5 12 95 155 144 29 66 128 73 32 72 237 0 5 12 95 154 160 13 66 128 73 48 72 205 0 5 12 95 153 0 13 66 128 73 64 72 197 0 5 12 95 159 128 5 66 128 73 80 72 189 0 5 12 95 159 136 5 66 128 73 96 72 189 0 5 12 95 159 224 5 66 128 73 112 72 173 0 5 12 95 152 192 13 66 128 73 128 72 181 0 5 12 95 152 8 13 66 128 73 144 72 181 0 5 12 95 153 96 13 66 128 73 160 72 197 0 5 12 95 152 112 13 66 128 121 144 64 25 208 72 67 144 64 0 4 2 128 174 42 33 64 128 0 0 0 0 0 0
If I convert item to String via ASCII encoding (Shorted):
Y@F?ef?x????X?E?-O?x%X?@e6O? X?E??@X?@?OmjO??%X?E? e?b?0%X?F
??)J?x%YF ??(??p%YF ?V?x [H@if?h?uV??[HP?]?B?h[H%???p%Z??????[Hp??(R?Z?G? E????p \@H?H????G ?V?x ???\@H? ?S ??P\?I ?a ??H\?I ?n B??\?I0 ?z R??]I@ Ez V?(]@IP =o ]@I
5h ]?Ip -_ ]?I? P ]?I? > 4I? ^@I? 5?? ???^?I??
I use this code snippet:
using (StreamReader streamReader = new StreamReader(path, true))
{
var binary = new BinaryReader(streamReader.BaseStream);
var text = binary.ReadBytes(Convert.ToInt32(streamReader.BaseStream.Length));
foreach (var item in text)
{
Console.WriteLine(item);
}
var m = Encoding.ASCII.GetString(text);
Console.WriteLine(m);
}
How can I convert these binaries to understandable string ? What is the true encoding ? Thanks.
P.S. : test file is here.
Edit:
I converted to raw data using StreamReader with ASCII encoding (Shortened) :
\u0006\u0001\u0006\u0001\u0000\u0048\u0049\u0043\u004e\u0050\u0057\u0033\u0035\u0031\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0046\u0031\u0039\u0039\u0046\u0050\u003f\u000d\u0001\u003f\u003f\u005f\u003f\u003f\u0058\u0000\u0000\u0000\u0000\u0000\u0000\u0040\u0030\u0009\u002d\u0000\u0005\u0018\u004f\u003f
Upvotes: 0
Views: 78