Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

File CRC failed

Rank

Total Posts: 13

Joined 0

PM

I have implemented the FIT code as it can be downloaded from the site. I use the encode messages to wrtite data to a file. This works most of the time but some files do result in an Fit decode error: File CRC failed. Does somebody knows how it can be that one time it is fine and the other time there is an error?

I attached a file with and without an error.

Furthermore the protocol is automatically using compressed time stamps. The size of a file is not an issue so I prefer to use no compressed time stamps. How can this be fixed?

Thanks a lot.      

File Attachments

RankRankRank

Total Posts: 91

Joined 2012-10-12

PM

Hi Twom,

I had a look at your two files and noticed a couple of things.
-The header datasize is still 0x00000000
-The header CRC is the initial value (CRC of header only)
-Your file ends on a message boundary (no file CRC present at all)
It seems to me Encode.Close() was not called on the 2nd file. Try checking the logic of your application in this area.

Why do you say compressed timestamps are being used? I didn't see any record headers with bit7 set (see section 4.1.1 and 4.1.2 in the FIT Protocol Document). What language are you programming in?



     
RankRankRank

Total Posts: 91

Joined 2012-10-12

PM

-For some reason there is an issue with our forum and downloading attachments at the moment. We are trying to resolve it.      
Rank

Total Posts: 13

Joined 0

PM

Thanks for your reply! CRC fault was a mistake in my code. When I quit my application the close class is not called correctly (probably my service is killed).

The issue with the fit files is that SportTracks is giving me the message "Missing compressed header time stamp". How can I create such one, such that it will parse my messages correctly.

Thanks a lot!

Best regards.

(I'm programming in Android).      
RankRankRankRank

Total Posts: 122

Joined 2010-10-25

PM

I get this as well with my generated .fit files using the Java sdk. I don't think it's my problem but actualy a SportTracks parsing problem. The problem is that writeing complex files with lots of options is far easier than reading them. Somewhere there is a difference compared to a stanbdard Garmin device generated file but I am not sure what...      
Avatar
RankRankRankRank

Total Posts: 296

Joined 0

PM

There's an alternative .FIT importer for SportTracks: Garmin FIT Devices Plugin:
http://zonefivesoftware.com/sporttracks/plugins/?p=garmin-fit-devices

You can try out that, there's a good chance that it imports your files well.

Unfortunately, I couldn't download your attached files above, so I couldn't give it a try.