Tigge / antfs-cli

Extracts FIT files from ANT-FS based sport watches such as Garmin Forerunner 60, 405CX, 310XT, 610 and 910XT.
MIT License
311 stars 76 forks source link

No error handling on authentication #17

Open rkistner opened 12 years ago

rkistner commented 12 years ago

The current implementation always assumes that pairing and authentication is successful. This fails in the following two cases:

  1. Pairing is disabled on the device. The auth file is still written, even though the pairing fails. All subsequent connections fail because of the invalid auth file (stuck forever at "Downloading index...").
  2. The device is paired on a different machine (auth file changed). All subsequent connections fail because of the invalid auth file (stuck forever just after receiving the device serial number & name).

For both these cases no error message is shown, which makes it very confusing. To solve the issue, do the following:

  1. Delete the .config/garmin-extractor folder (or just the auth file).
  2. Enable pairing on the device, BEFORE running the script.
  3. Run the script - it should automatically pair now.

I've downloaded the official ANT-FS documentation, so I'll help with the missing implementation / bugfixes like this when I can. My time is limited though, so it might be a while before I get anything done. I also want to investigate whether it's worth it to write a proper ANT-FS implementation (perhaps based on python-ant), or just continue hacking on this project.

As far as I understand copyright and the ANT Adopter agreement, it is illegal to copy the official documentation and reference implementations. However, the protocol itself cannot be protected under copyright. This means that it's safe to use the official documentation to write an open-source implementation, as long as no parts of the documentation or reference implementation is directly copied.

Tigge commented 11 years ago

This works slightly better with 19bc8dc787757145179123655f08e93a4b63118c. Will improve further.