Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Garmin Product Information is incorrect #65

Open
riccode opened this issue Oct 8, 2020 · 2 comments
Open

Garmin Product Information is incorrect #65

riccode opened this issue Oct 8, 2020 · 2 comments

Comments

@riccode
Copy link

riccode commented Oct 8, 2020

In the FIT files there are two fields "product" and "garmin_product" which are not interchangeable. Therefore, when pulling out the device information for Garmin devices some values that are returned are incorrect. The code does not distinguish between the "product" fields and the "garmin_product" fields in the FIT file. . I reached out to Garmin directly and they noted that "product" has something to do with Garmin Connect and does not reference the product list from the FIT SDK. I had thought I could simply line up the manufacturer array ( with "1" representing Garmin manufacturer), but this doesn't work either. I'll illustrate with an example. If I run the code on a FIT file I will get a ['device_info]['product] array with 8 entries. However, I will get a manufacturer array with only 7 entries. It seems some values of 'product' in the FIT file do not have a corresponding 'manufacturer' value (while all 'garmin_product" ones do). I manually went through the FIT file and pulled the values to illustrate this point:

manufacturer 1 garmin_product 2050
manufacturer 1 garmin_product 2050
product 558
manufacturer 1 garmin_product 1620
manufacturer 1 garmin_product 2050
manufacturer 1 garmin_product 2050
manufacturer 1 garmin_product 1620
manufacturer 25165 product 3

note no manufacturer for 'product' 558.

Therefore without knowing which values in the ['device_info']['product'] array correspond to 'product' or 'garmin_product' it is impossible as far as I can tell to line these arrays up.

Therefore, $this->data_mesgs['device_info']['product'] should NOT contain values pulled from the "product" field. Is there some small change to the code that can be made to only pull the "garmin_product" field and ignore the "product" field?

@adriangibbons
Copy link
Owner

Hi @riccode

The issue is thanks to it not be clear whether the field contains product, garmin_product or favero_product as they all have the same field number in a device_info message.

From the Profile.xlsx file in the FIT SDK

Screen Shot 2020-10-10 at 9 51 44 am

Same goes for file_id messages. Not sure how this can be overcome - i.e. how do we know which of the three Field Names is present in a device_info message? I don't see any clue in the documentation.

Cheers, Adrian.

@riccode
Copy link
Author

riccode commented Oct 14, 2020

Adrian,

I reached out to Garmin, who in turn reached out to the FIT team and have made them aware of this. We will wait and see if they get back to me. So far the best solution I've found is using the software_version field. It seems that Garmin devices have a software_version below 1000, while software versions relating to 'product' had a software_version > 10,000.

riccode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants