Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

SDK 2.0 compatibility with older

Rank

Total Posts: 6

Joined 2016-05-29

PM

Hi, i used 2.0 Library for Java. I have a trouble when i create a ".fit" file because is correctly encoded with FitCSVTool.jar in SDK, but it cannot be read from the most of web application and desktop (probably because they use the old library release). I want only add to "fit" file a GPS track and use other parameter available in the message object. Is this procedure compatible with old version? If i use the 2.0 library, could programs that use the older version work fine?

Thanks
     
Rank

Total Posts: 20

Joined 2015-05-11

PM

Hello theolo77,

FIT 2.0 files are not compatible with FIT 1.0 decoders. However, you can still create FIT 1.0 compatible files through the SDK by specifying the protocol version when creating an encoder as shown below:
FileEncoder encode = new FileEncoder(new java.io.File("FileName.fit")Fit.ProtocolVersion.V1_0)

If you are creating a .FIT file from a .CSV file, you can also specify the protocol version in the CSVTool by using the "-p" flag (i.e, -p1 will set the protocol version to 1.0 and -p2 will set it to 2.0).

Note that attempting to encode a file that uses FIT 2.0 features (such as developer data) as a FIT 1.0 file will fail.      
Rank

Total Posts: 6

Joined 2016-05-29

PM

Thanks!!!! It works perfectly!!!!
     
RankRank

Total Posts: 44

Joined 2013-04-07

PM

MarioM - 30 May 2016 11:41 AM

FIT 2.0 files are not compatible with FIT 1.0 decoders.

I have a problem this reply to understand

According to my understanding:
The essential difference between SDK 1 and SDK 2 are the new developer messages.
The record structure has remained unchanged.

If a „FIT 2.0“ file contains no developer messages and no messages > Fit-Profile 16.74, why is the file not compatible with “FIT 1.0” decoders?
What are the differences I have not noticed?

Thank you

PS:
I think, theolo77 uses a "FIT-CSV 1.0"?      
Rank

Total Posts: 6

Joined 2016-05-29

PM

Hi, I'm developing in Java for a custom device... I have raw data that i want to put into .fit file for better sharing and use VIRB. So I used the encode engine Fit.ProtocolVersion.V2_0 and it doesn't work. I also thought that the version 2.0 was different only for developer message, but they write that has changed the encode so probably is not compatible.
Bye.
Thanks for answer...      
Rank

Total Posts: 20

Joined 2015-05-11

PM

Encoding a file as FIT 2.0 will also modify the protocol version recorded in the file header. Older decoders will abort the decode process when they hit the protocol version byte and see that it is not equal to 1.

A FIT 1.0 compatible file can still be created using FIT 2.0 SDKs by specifying the protocol version number as I have shown for the Java SDK above.