Skip to content

device_info messages keep the original (non-Garmin) serial_number after editing — breaks device attribution / Training Effect for Hammerhead Karoo source files #84

Open

Description

@agglo001

Environment

  • fit-file-faker installed via pip install fit-file-faker (current release as of August 2026)
  • Python 3.12, running in Docker
  • Profile app_type: Custom
  • Source device: Hammerhead Karoo 3
  • Target device: Garmin Fenix 7 Pro Solar (product ID 4375), configured with my watch's real Unit ID as the serial number

Summary

After editing a Karoo-recorded FIT file, the file_id message correctly gets the configured Garmin manufacturer/product/serial_number, but the device_info message for the primary device (device_index=0) gets its manufacturer and product fields rewritten while its serial_number field is left untouched — still containing the Karoo's original (non-Garmin) serial number. This produces an internally inconsistent FIT file: file_id and device_info disagree about the device's serial number.

I believe this is why activities uploaded from Karoo files never get Training Effect / Training Status calculated on Garmin Connect, and why the activity's "Devices & Apps" section is empty in the Garmin Connect UI, even though the same profile/device selection works as expected for the file_id message.

Steps to reproduce

  1. Configure a profile with app_type: custom, targeting a Garmin device (e.g. Fenix 7 Pro Solar, product 4375) with a real Unit ID as the serial number.
  2. Edit a Karoo-recorded .fit file without uploading:
   fit-file-faker /path/to/karoo_ride.fit
  1. Inspect the file_id and device_info messages in the original vs. edited file (I used a small custom FIT parser to dump these fields; happy to share it if useful).

Observed data (device_index=0, the primary/head-unit record)

Field | Original file | Edited file -- | -- | -- file_id.manufacturer | 289 (Hammerhead) | 1 (Garmin) — correctly patched file_id.product | 3 | 4375 — correctly patched file_id.serial_number | 240970090 | 3506959378 (my configured Unit ID) — correctly patched device_info[0].manufacturer | 289 | 1 — correctly patched device_info[0].product | 3 | 4375 — correctly patched device_info[0].serial_number | 240970090 | 240970090 — unchanged, still the Karoo's original serial

Every device_info message for device_index=0 across the whole ride (~30 messages in my test file, presumably one per some periodic interval) shows the same pattern: manufacturer/product patched, serial_number not patched.

Expected behavior

device_info.serial_number for the primary device record should be rewritten to match the configured Unit ID, consistent with what's written to file_id.serial_number.

Additional observation

The peripheral sensor device_info records (e.g. device_index=3, originally a power meter reporting manufacturer=32) also get manufacturer/product rewritten to the Garmin values (1 / 4375), which seems unintended too — a connected sensor shouldn't be relabeled as the watch itself. Not sure if that's in scope for the same fix or a separate issue.

Why this matters

Per Garmin's anti-spoofing changes from December 2023 (referenced in a few other FIT-editing tools' docs/issue trackers), Garmin Connect appears to validate internal consistency of device identity before enabling Training Effect / Training Status calculation and device attribution in the UI. A file_id/device_info serial number mismatch looks like exactly the kind of inconsistency that would trip that validation.

Sample files:

test_modified.zip

Note: This issue was created mostly with use of AI - probably better than if I did it myself :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions