This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Fix corrupt .fit file

I don't recall if I saved the following activity before my Garmin Edge 520 died or after recharging but nonetheless, the file is failing to upload to Garmin Connect stating "We don't support the file type you tried to import".

www.dropbox.com/.../2020-01-04-07-51-28.fit

Would someone be able to take a look at the file and see if it can be repaired?

Thanks in advance.

Nigel

Top Replies

  • Former Member
    Former Member over 4 years ago in reply to trux +1

    The one in the header is supposed to be deactivated by setting it to 0000, at least that's what I understood from the specification.

    yes, correct

    the ANT+ FIT SDK can do the file ch…

All Replies

  • You can do it yourself. There are some online FIT tools, as well as programs that you can install, designed for the repair of defectuous FIT files:

    http://garmin.kiesewetter.nl/
    https://www.fitfiletools.com/#/top (if none matches your needs, use for example the Section Remover, without actually removing anything)
    http://fitfilerepairtool.info/

  • Former Member
    0 Former Member over 4 years ago

    Nigel,

    recording to your fit file ended abruptly without summary at the end

    also missing file length and file checksum

    you could have repaired the file yourself with one of 's links Slight smile

    import/export with FIT File Tools's section remover did the trick

    4532.fitfiletools.zip

    happy & safe sporting

  • @, Sorry fot the deviation from the topic, but I know you are the expert for FIT files, and saw in another post, that you fixed a wrong checksum manually. I wanted to ask whether it is sufficient to set the two checksum bytes in the header to 0000, or whether it needs to be calculated and set to the right value. In one case I tried setting the checksum bytes to 0 on a perfectly good fit file, and although the file was accepted by the watch, it did not display all the content identically as at the same file with the original checksum.

  • Former Member
    0 Former Member over 4 years ago in reply to trux

    in the most cases(like this one) repaired with FIT File Tools, this manipulation is not necessary Wink

    I only favour this procedure for checking fit file content

    I wanted to ask whether it is sufficient to set the two checksum bytes in the header to 0000, or whether it needs to be calculated and set to the right value.

    the header checksum is not that important

    file length and file checksum(at the end) have more value being correct(ed)

    In one case I tried setting the checksum bytes to 0 on a perfectly good fit file, and although the file was accepted by the watch, it did not display all the content identically as at the same file with the original checksum.

    changing any value in the file needs a filechecksum recalc (including header data)

    happy & safe FITting

  • , thanks for the reply! In my case I tested a FIT file for the scheduler, not an activity FIT file. And unfortunately the fit tools don't read it. I was not aware there are two checksums, one in the header, and another one at the bottom. The one in the header is supposed to be deactivated by setting it to 0000, at least that's what I understood from the specification. I'd like to know if there is a simple way to calculate or set the ending checksum too, when none of the online tools work. Well, I will probably end using the SDK, but was hoping to be able doing some quick hack for testing just by hand.

  • Former Member
    0 Former Member over 4 years ago in reply to trux

    The one in the header is supposed to be deactivated by setting it to 0000, at least that's what I understood from the specification.

    yes, correct

    the ANT+ FIT SDK can do the file checksum

    @echo off
    
    setlocal EnableDelayedExpansion
    
    set APP_DIR=%~dp0
    set APP_NAME=FitTestTool.jar
    set APP_PATH="%APP_DIR%%APP_NAME%"
    
    set a=%*
    
    FOR %%b IN (!a!) DO (
       set c=%%b
       set c=!c:.fit=!
       call java -jar %APP_PATH% %%b -d > %%b_list_CRC.txt
    )
    pause

    as can uploading your FIT file here fit2tcx.runalyze.com

    or use a HEX editor Slight smile

    happy & safe FITting

  • thanks for the info trux

    I found the kiesewetter.nl webpage originally, but it failed to upload my file (probably due to the corruption?).

    Next time this happens I will attempt one of the other website you suggest.

  • many thanks for taking the time to look at this OnlyTwo. As I replied to trux, the kiesewetter.nl failed to upload the file and I wasn't aware of the other two website. Next time, I will certainly give them a go. Thanks again.