Welcome Guest,Register Now
Log In

ANT-FS and FIT

The tools you need to create and share files between ANT devices.

The Flexible and Interoperable Data Transfer (FIT) protocol is designed specifically for the storing and sharing of data that originates from sport, fitness and health devices. The FIT protocol defines a set of data storage templates (FIT messages) that can be used to store information such as user profiles and activity data in files. It is specifically designed to be compact, interoperable and extensible.

ANT File Share (ANT-FS) is an extension of the ANT protocol that provides a robust framework for transferring files wirelessly between two devices.  ANT-FS was designed for ultra low power, and can be used in coin cell battery operated devices on both sides of the link. ANT-FS is often used in display devices with storage capabilities, such as fitness watches, which collect real-time data from sensors and allow it to be downloaded by a PC at a later time. The ANT-FS network key has been reserved for use by ANT-FS devices.

To use ANT-FS in an interoperable way, refer to the ANT+ Sync Device Profile which specifies the channel parameters and other minimum requirements for interoperability.

The following example use case illustrates one way that the FIT protocol is used to transfer personal monitoring information acquired during exercise to an internet database.

  1. ANT+ Sensors measure parameters such as heart rate and running speed
  2. Data is broadcast in real time, using interoperable ANT+ data formats
  3. Session events and real time activity data is collected and saved into a FIT file on a display device
  4. The FIT file is transferred to the PC using ANT File Share (ANT-FS)
  5. The FIT data may be used directly on the PC or transferred to internet applications

After the initial wireless sensor data is collected, the FIT protocol provides a consistent format allowing all devices in the subsequent chain to share and use the data.

Getting Familiar with FIT Format

Step 1: The FIT Protocol Document  provides essential details on the FIT format.  The document includes explanations of the binary file format including  File Header, File CRC, Message Definition, FIT Base Types, Compressed vs. Normal Timestamp Headers as well as worked examples.

Step 2: An SDK  is provided to simplify implementing FIT on the target platform.  The SDK includes example programs to Encode and Decode FIT data in many popular programming languages.  Sample .FIT files as well as a tool to convert back and forth to .csv are also included.  Experimenting with these examples and demo apps is the next step to becoming familiar with FIT. The FIT SDK includes:

  • FitGen.exe – FIT code generation tool
  • config.csv – Configuration file for customizing generated C code
  • c\ - C code
  • cpp\ - C++ code
  • java\ - Java code
  • Documentation including the FIT Protocol Document, FIT Profile, and SDK Introductory Guide

Step 3: The FIT File Types Document  describes the predefined FIT File types which consist of common message groupings and methods for best practice.  The FIT Profile (Profile.xls)  lists all predefined FIT messages and FIT data types.  This document is useful for understanding the content and format of particular messages. Custom messages and files may also be generated for application specific cases.

Implementing FIT

  • The FIT SDK is provided to facilitate implementing FIT on your target device and will generate the necessary source code and libraries.  Numerous popular programming languages are supported.
  • The SDK Introductory Guide  provides detail on the advanced features of the code generator such as how to optimize product code to reduce RAM/ROM requirements or generate custom messages and fields. 
  • Care should be taken to follow the FIT File Types document for best practices. Additionally, if you are using an ANT+ device profile, this may specify further FIT data requirements specific to your device type.

Getting familiar with ANT-FS

Step 1: The “ANT-FS Technical Specification” provides an overview of the operation of ANT-FS.  Sections 1 – 8 are essential to understand the terminology and mechanisms involved. Note that ANT-FS applications typically use the ANT-FS network key (which may not be used by other applications).

Step 2: A great way of understanding how ANT-FS works is to use the ANT-FS PC tools and experiment with their different features. The “ANT-FS Reference Design User Manual” provides instructions for using the ANT-FS PC Host to connect to the ANT-FS PC client and download files from it.  Walking through these will provide you a good idea of the steps involved on establishing a session through ANT-FS and transferring files between two devices.

Implementing ANT-FS

  • Libraries for Windows (C#/C++) and MacOSX (C++) are available to simplify the development of ANT-FS enabled software. Both host and client stacks are included. The source code of the ANT-FS PC tools is also available as a reference.  The ANT-FS PC Host makes use of the C++ library, while the ANT-FS PC Client uses the C# version of the library.  Also, a console application implementing very basic ANT-FS functionality (both client and host) in C# is included with the “ANT Windows Library Package”.
  • If you are implementing ANT-FS in an embedded device, you can use: reference code for the ANT-FS client.  We do not have reference embedded code for the ANT-FS host; the source code of the Windows / MacOSX libraries should be used as a reference.
  • Some ANT products (specifically, the CC257x) have ANT-FS client functionality embedded directly on the chip.  This includes the over the air ANT-FS protocol extension and the required file system utilities to manage stored data in non-volatile storage (EEPROM).  More details about this feature are available in the “Integrated ANT-FS Control Document”.   The Integrated ANT-FS Reference Design package can also help you explore this feature.
  • It is highly recommended to test your ANT-FS implementation against the corresponding PC tool during development (i.e., if you are developing a client device, test against the ANT-FS PC Host).  The optional debug logging feature of the PC tools can be an invaluable feature during your development, both as a troubleshooting tool and a detailed reference of the messaging involved in an ANT-FS session.