ANT+ Garmin G.FIT User manual

G.FIT
User Guide and Specification

Page 2 of 117 G.FIT User Guide and Specification, Rev 2.0_Alpha.14
thisisant.com
Copyright Information and Usage Notice
This information disclosed herein is the exclusive property of Garmin Canada Inc. No part of this publication
may be reproduced or transmitted in any form or by any means including electronic storage, reproduction,
execution, or transmission without the prior written consent of Garmin Canada Inc. The recipient of this
document by its retention and use agrees to respect the copyright of the information contained herein.
The information contained in this document is subject to change without notice and should not be construed
as a commitment by Garmin Canada Inc. unless such commitment is expressly given in a covering document.
The Garmin Canada Inc. ANT Products described by the information in this document are not designed,
intended, or authorized for use as components in systems intended for surgical implant into the body, or
other applications intended to support or sustain life, or for any other application in which the failure of the
Garmin product could create a situation where personal injury or death may occur. If you use the Products
for such unintended and unauthorized applications, you do so at your own risk and you shall indemnify and
hold Garmin and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims,
costs, damages, and expenses, and reasonable attorney fees arising out of, di rectly or indirectly, any claim of
personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that
Garmin was negligent regarding the design or manufacture of the Product.
©2019 Garmin Canada Inc. All Rights Reserved.

G.FIT User Guide and Specification, Rev 2.0_Alpha.14 Page 3 of 117
thisisant.com
Revision History
Revision
Effective Date
Description
1.0
June 2017
Initial Customer Sample Release.
1.1
September 2017
Customer Sampling Update
1.2
September 2017
Production Release
2.0
May 2018
Update serial interface with messaging for G.FIT 4.0.0
•Add controllable features
•Extension to custom events
•Consistent resistance resolution
•Product information configuration outside of FE metrics, with
customizable device/manufacturer strings
•Add configuration option to disable HR pairing
•Add rower instantaneous pace as a transmitted field over BLE
Additions to GFIT_SetDeviceID (0xE3) to include information on how the
channel ID is constructed from the device ID
2.0_Alpha.05
May 2018
Format cleanup, G.FIT template. Spelling and phrasing changes in progress.
2.0_alpha.06
May 2018
Added section 4.7 –G.FIT custom service.
Reworking spin down command payload table and descriptions
Fixed all references.
2.0._alpha.07
May 2018
Fixed incorrect message sizes, missing/incorrect invalid values.
Updated section 4.6 –Custom Events.
Added section 6.1- ANT+ Manufacturer specific pages
Add clearer resistance specification and calcs.
2.0_alpha.10
July 2018
Merge in changes from Tom and Mark.
2.0_alpha.11
November 2018
Updating company branding
2.0_alpha.13
June 2019
Updated HR Serial Message Format
2.0_alpha.14
June2019
Added more parameters to section 7.3.2 –
gfit_fep_set_channel_configuration
Added interaction details for new parameters and gfit_hrp_set_pairing_mode
Added section 7.3.23 –gfit_fep_set_developer_options (0xDB)
Added section 7.5.8 –gfit_event_ble_peripheral (0xBA)

Page 4 of 117 G.FIT User Guide and Specification, Rev 2.0_Alpha.14
thisisant.com
Table of Contents
1Support ...................................................................................................................................................................... 11
1.1 G.FIT technical references .................................................................................................. 11
2Use case ..................................................................................................................................................................... 13
3Development kit contents ........................................................................................................................................ 15
3.1 G.FIT libraries ................................................................................................................... 15
3.2 G.FIT software development kit ........................................................................................... 15
3.2.1 Example SoC application (demo_gfit) ....................................................................... 16
3.2.2 Fitness equipment console simulator PC application ................................................... 16
3.2.3 Reference CIQ application ...................................................................................... 16
3.2.4 Reference iOS application ....................................................................................... 16
3.2.5 SimulANT+ ........................................................................................................... 16
4G.FIT operation ......................................................................................................................................................... 17
4.1 Fitness equipment (FE) states ............................................................................................. 17
4.1.1 G.FIT CONFIGURATION (OFF) ................................................................................. 18
4.1.2 OFF ..................................................................................................................... 18
4.1.3 READY ................................................................................................................. 18
4.1.4 IN USE ................................................................................................................. 18
4.1.5 FINISHED (PAUSED) .............................................................................................. 19
4.2 Pairing heart rate monitors ................................................................................................. 20
4.2.1 Proximity pairing ................................................................................................... 20
4.2.2 Channel ID based pairing ....................................................................................... 21
4.3 G.FIT configuration ............................................................................................................ 21
4.4 Event handling .................................................................................................................. 22
4.4.1 Enabling events ..................................................................................................... 23
4.4.2 Event responses .................................................................................................... 23
4.5 Custom events ................................................................................................................... 26
5Connecting to G.FIT over BLE .................................................................................................................................. 27
5.1 Interpreting resistance ....................................................................................................... 28
5.2 G.FIT custom service .......................................................................................................... 30
5.2.1 Custom control point characteristic .......................................................................... 30
5.2.2 Custom data characteristic ..................................................................................... 31
5.2.3 Procedures ........................................................................................................... 31
5.2.4 Setting the user and/or bicycle weight ..................................................................... 31
5.2.5 Setting manufacturer specific data .......................................................................... 33
5.2.6 Notification of updated manufacturer specific value ................................................... 34
6Connecting to G.FIT over ANT+ FE-C...................................................................................................................... 36
6.1 Dual frequency FE-C........................................................................................................... 36
6.2 ANT+ manufacturer specific pages ....................................................................................... 36

G.FIT User Guide and Specification, Rev 2.0_Alpha.14 Page 5 of 117
thisisant.com
6.2.1 Receiving custom events ........................................................................................ 36
6.2.2 Sending custom events .......................................................................................... 37
6.3 Using SimulANT+ to view transmitted data ........................................................................... 37
6.4 Tracking FE-C channel with CIQ application .......................................................................... 38
6.4.1 Installing CIQ application on a compatible Garmin watch ........................................... 38
6.4.2 Opening the application ......................................................................................... 38
6.4.3 Connecting to the G.FIT ANT+ FE -C channel............................................................. 38
6.4.4 Viewing live workout data....................................................................................... 38
6.4.5 Saving user’s workout session ................................................................................. 38
6.4.6 Viewing workout data ............................................................................................ 38
6.5 FE-C Control Messages ....................................................................................................... 38
7Serial interface .......................................................................................................................................................... 39
7.1 Using extended serial messages .......................................................................................... 39
7.1.1 Commands (0xE2) ................................................................................................. 40
7.1.2 Requests (0xE1) .................................................................................................... 40
7.1.3 Responses/events (0xE0) ....................................................................................... 41
7.2 G.FIT response codes ......................................................................................................... 41
7.3 Commands (0xE2) .............................................................................................................. 44
7.3.1 gfit_fep_set_state_ (0xD0) ..................................................................................... 44
7.3.2 gfit_fep_set_channel_configuration (0xD1) ............................................................... 45
7.3.3 gfit_hrp_set_pairing_mode (0xD2) .......................................................................... 47
7.3.4 gfit_hrp_set_inuse_scan_timeout (0xD3) .................................................................. 48
7.3.5 gfit_hrp_set_pairing_proximity (0xD5) ..................................................................... 49
7.3.6 gfit_hrp_pair_to_device (0xD6) ............................................................................... 50
7.3.7 gfit_hrp_disconnect_device (0xD7) .......................................................................... 52
7.3.8 gfit_enter_bootloader (0xD8) .................................................................................. 53
7.3.9 gfit_fep_set_inuse_adv_timeout (0xD9) ................................................................... 54
7.3.10 gfit_fep_set_equipment_type (0xE0) ................................................................... 55
7.3.11 gfit_fep_set_XX_data (0xE1) ............................................................................... 57
7.3.12 gfit_hrp_set_heart_rate (0xE2) ........................................................................... 66
7.3.13 gfit_fep_set_device_id (0xE3) ............................................................................. 67
7.3.14 fe_command_product_info (0xE4) ....................................................................... 69
7.3.15 gfit_fep_send_command_update (0xE5) ............................................................... 71
7.3.16 fe_command_status_update (0xE6) ..................................................................... 72
7.3.17 gfit_fep_abort_pending_commands (0xE7) ........................................................... 75
7.3.18 gfit_fep_set_max_resistance (0xE8) .................................................................... 76
7.3.19 gfit_fep_spin_down_ (0xE9) ............................................................................... 77
7.3.20 gfit_fep_send_custom_event (0xB0) .................................................................... 85
7.3.21 gfit_fep_send_manufacturer_specific_page (0xB3) ................................................ 86
7.3.22 gfit_fep_set_transmission_pattern (0xDA) ............................................................ 87

Page 6 of 117 G.FIT User Guide and Specification, Rev 2.0_Alpha.14
thisisant.com
7.3.23 gfit_fep_set_developer_options (0xDB) ................................................................ 88
7.4 Requests (0xE1) ................................................................................................................ 89
7.4.1 gfit_get_version_string (0xC0) ................................................................................ 89
7.5 Events (0xE0) .................................................................................................................... 91
7.5.1 gfit_event_receive_heart_rate_ (0xB2) .................................................................... 91
7.5.2 Session command event (0xB4) ............................................................................... 95
7.5.3 gfit_event_set_target_ (0xB5) ................................................................................ 96
7.5.4 gfit_event_set_simulation_parameters (0xB6) ........................................................... 97
7.5.5 gfit_event_set_user_data (0xB7) ............................................................................. 98
7.5.6 Spin down Calibration Event (0xB8) ............................... Error! Bookmark not defined.
7.5.7 gfit_event_entering_bootloader (0xB9) ...................................................................100
7.5.8 gfit_event_ble_peripheral (0xBA) ...........................................................................100
7.5.9 gfit_event_custom (0xB1)......................................................................................101
7.6 Other ANT commands ........................................................................................................102
7.6.1 Read ANT ID ........................................................................................................102
7.6.2 RSSI calibration offset ..........................................................................................103
Appendix A - G.FIT SoC library........................................................................................................................................ 104
A.1 Compiling the demo application ..........................................................................................104
A.1.1 Library license key ................................................................................................104
A.1.2 Compiler compatibility ...........................................................................................105
Appendix B - Fitness equipment console simulator...................................................................................................... 106
B.1 Introduction .....................................................................................................................106
B.2 Installing ANT USB interface board driver ............................................................................106
B.3 Basic operation .................................................................................................................108
B.3.1 Initial G.FIT setup ................................................................................................108
B.3.2 Turning on the simulated console ...........................................................................110
B.3.3 Pairing a heart rate monitor...................................................................................110
B.3.4 Successfully paired heart rate monitor ....................................................................111
B.3.5 Disconnecting a paired heart rate monitor ...............................................................111
B.3.6 Starting a workout/session ....................................................................................111
B.3.7 Pausing/resuming a session ...................................................................................112
B.3.8 Ending a session ..................................................................................................112
B.3.9 Turning off the simulated console ..........................................................................112
B.3.10 Enabling/disabling full screen mode ....................................................................112
8Heading 1 - Template guidance............................................................................................................................. 113
8.1 Heading 2 ........................................................................................................................113
8.1.1 Heading 3 ............................................................................................................113
8.2 Headings use sentence style capitalization ...........................................................................113
8.2.1 Like this ..............................................................................................................113
8.2.2 Not Like This .......................................................................................................113

G.FIT User Guide and Specification, Rev 2.0_Alpha.14 Page 7 of 117
thisisant.com
8.3 Captions, tables, figures, and equations ..............................................................................113
8.4 Bullets and numbered text ................................................................................................. 114
8.5 Notes, bold text, italicized text, and document names ...........................................................115
8.6 Watermarks......................................................................................................................115
9Second ‘Heading 1’ heading................................................................................................................................... 116
Appendix C - Sample appendix title ............................................................................................................................... 117
C.1 Appendix H2.....................................................................................................................117
C.1.1 Appendix H3 ........................................................................................................117
C.2 Table and Figure captions for use in Appendices ..................................................................117
List of Figures
Figure 2-1. G.FIT use case illustration ........................................................................................... 14
Figure 4-1. Fitness equipment state machine .................................................................................. 17
Figure 4-2. G.FIT pairing zones ..................................................................................................... 21
Figure 4-3. Order of G.FIT configuration commands ........................................................................ 22
Figure 4-4. Event handling (ANT) .................................................................................................. 24
Figure 4-5. Event handling (BLE) ................................................................................................... 25
Figure 5-1. Using BLE to set the user weight .................................................................................. 33
Figure 5-2. Using BLE to set a manufacturer specific value ............................................................... 34
Figure 5-3. Notifying a display of a new manufacturer specific value ................................................. 35
Figure 6-1. Viewing received data pages on SimulANT+ ................................................................... 37
Figure 7-1. Serial message general packet structure ........................................................................ 39
Figure 7-2. Extended serial message types ..................................................................................... 40
Figure 7-3. Extended serial command ............................................................................................ 40
Figure 7-4. Extended serial request ............................................................................................... 41
Figure 7-5. Extended serial response ............................................................................................. 41
Figure 7-6. Extended serial event .................................................................................................. 41
Figure 7-7. Example: Setting FE metrics serial command (0xE1) ....................................................... 60
Figure 7-8. Example: Successful spin down calibration process (ANT) ................................................ 81
Figure 7-9. Example: Successful spin down calibration process (BLE) ................................................ 82
Figure 7-10. Example: Cancelled spin down calibration process (ANT) ............................................... 83
Figure 7-11. Example: Cancelled spin down calibration process (BLE) ................................................ 84
Figure 7-12. Example: Requested spin down calibration process (BLE) ............................................... 84
Figure 13. Sequence diagram: proximity pairing mode hr events ....................................................... 92
Figure 14. Sequence diagram: channel ID based pairing mode connection ......................................... 93
Figure 7-15. Sequence diagram: disconnecting from connected monitor device B ................................ 94
List of Tables
Table 5-1. Representations of resistance by context ........................................................................ 28

Page 8 of 117 G.FIT User Guide and Specification, Rev 2.0_Alpha.14
thisisant.com
Table 5-2. Representations of resistance by data characteristic ........................................................ 29
Table 5-3. Example transmitted resistance values ........................................................................... 29
Table 5-4. Service characteristics (primary service) ......................................................................... 30
Table 5-5. Custom control point characteristic structure................................................................... 30
Table 5-6. Op code and parameters ............................................................................................... 30
Table 5-7. G.FIT BLE response codes ............................................................................................. 30
Table 5-8. Custom data characteristic structure .............................................................................. 31
Table 5-9. Op code and parameters ............................................................................................... 31
Table 6-1. G.FIT ANT+ manufacturer specific page format ............................................................... 36
Table 7-1. G.FIT response codes ................................................................................................... 41
Table 7-2. gfit_fep_set_state_ command message ........................................................................... 44
Table 7-3. gfit_fep_set_state_ response message ............................................................................ 45
Table 7-4. gfit_fep_set_channel_configuration command message .................................................... 46
Table 7-5. gfit_fep_set_channel_configuration response message ..................................................... 46
Table 7-6. gfit_hrp_set_pairing_mode command message ................................................................ 47
Table 7-7. gfit_hrp_set_pairing_mode response message ................................................................. 47
Table 7-8. gfit_hrp_set_inuse_scan_timeout command message ....................................................... 48
Table 7-9. gfit_hrp_set_inuse_scan_timeout response message ........................................................ 48
Table 7-10. gfit_hrp_set_pairing_proximity command message ......................................................... 49
Table 7-11. gfit_hrp_set_pairing_proximity response message .......................................................... 49
Table 7-12. gfit_hrp_pair_to_device command message ................................................................... 50
Table 7-13. ANT and BLE channel IDs ............................................................................................ 50
Table 7-14. gfit_hrp_pair_to_device response message .................................................................... 51
Table 7-15. gfit_hrp_disconnect_device command message .............................................................. 52
Table 7-16. gfit_hrp_disconnect_device response message ............................................................... 52
Table 7-17. gfit_enter_bootloader command message ...................................................................... 53
Table 7-18. gfit_enter_bootloader response message ...................................................................... 53
Table 7-19. gfit_fep_set_inuse_adv_timeout command message ....................................................... 54
Table 7-20. gfit_fep_set_inuse_adv_timeout response mess age ........................................................ 54
Table 7-21. gfit_fep_set_equipment_type command message ........................................................... 55
Table 7-22. gfit_fep_set_equipment_type response message ............................................................ 56
Table 7-23. gfit_fep_set_XX_data command message ...................................................................... 58
Table 7-24. gfit_fep_set_XX_data response message ....................................................................... 58
Table 7-25. Field lengths .............................................................................................................. 59
Table 7-26. Treadmill field IDs and field lengths ............................................................................. 61
Table 7-27. Trainer/indoor bike field IDs and field lengths ............................................................... 62
Table 7-28. Elliptical/cross trainer field IDs and field lengths............................................................ 63
Table 7-29. Rower field IDs and field lengths ................................................................................. 64
Table 7-30. Step climber field IDs and field lengths ......................................................................... 65
Table 7-31. gfit_hrp_set_heart_rate command message ................................................................... 66

G.FIT User Guide and Specification, Rev 2.0_Alpha.14 Page 9 of 117
thisisant.com
Table 7-32. gfit_hrp_set_heart_rate response message .................................................................... 66
Table 7-33. Device ID to channel ID conversion .............................................................................. 67
Table 7-34. gfit_fep_set_device_id command message .................................................................... 67
Table 7-35. gfit_fep_set_device_id response message ..................................................................... 68
Table 7-36. fe_command_product_info command message ............................................................... 69
Table 7-37. fe_command_product_info response message ................................................................ 69
Table 7-38. Product information types and values ........................................................................... 70
Table 7-39. gfit_fep_send_command_update command message ...................................................... 71
Table 7-40. gfit_fep_send_command_update response message ....................................................... 71
Table 7-41. fe_command_status_update command message ............................................................. 72
Table 7-42. fe_command_status_update response message .............................................................. 72
Table 7-43. Status type ................................................................................................................ 73
Table 7-44. Status parameters ...................................................................................................... 74
Table 7-45. gfit_fep_abort_pending_commands command message ................................................... 75
Table 7-46. gfit_fep_abort_pending_commands response message .................................................... 75
Table 7-47. gfit_fep_set_max_resistance command message ............................................................ 76
Table 7-48. gfit_fep_set_max_resistance response message ............................................................. 76
Table 7-49. gfit_fep_spin_down_ command message ....................................................................... 77
Table 7-50. gfit_fep_spin_down_ payload ....................................................................................... 79
Table 7-51. gfit_fep_spin_down_ response message ........................................................................ 80
Table 7-52. gfit_fep_send_custom_event command message ............................................................ 85
Table 7-53. gfit_fep_send_custom_event response message ............................................................. 85
Table 7-54. gfit_fep_send_manufacturer_specific_page command message ........................................ 86
Table 7-55. gfit_fep_send_manufacturer_specific_page response message ......................................... 86
Table 7-8. gfit_fep_set_transmission_pattern command message ...................................................... 87
Table 7-9. gfit_fep_set_transmission_pattern response message ....................................................... 87
Table 7-56. gfit_get_version_string request message ....................................................................... 89
Table 7-57. gfit_get_version_string response message .................................................................... 89
Table 7-58. gfit_event_receive_heart_rate_ event message .............................................................. 91
Table 7-59. Session command event message ................................................................................. 95
Table 7-60. gfit_event_set_target_ event message .......................................................................... 96
Table 7-61. Target types .............................................................................................................. 96
Table 7-62. gfit_event_set_simulation_parameters event message .................................................... 97
Table 7-63. gfit_event_set_user_data event message ...................................................................... 98
Table 7-64. Spin down calibration event message ........................................................................... 99
Table 7-65. gfit_event_entering_bootloader event message ............................................................100
Table 7-66. gfit_event_custom event message ...............................................................................101
Table 7-67. Request to retrieve ANT ID .........................................................................................102
Table 7-68. ANT ID read response message ...................................................................................102
Table 7-69. RSSI calibration offset message ..................................................................................103

Page 10 of 117 G.FIT User Guide and Specification, Rev 2.0_Alpha.14
thisisant.com
Table 7-70. RSSI calibration offset response message .....................................................................103
Table 8-1. Table captions go over table ........................................................................................113
List of Equations
Equation 5-1. Interpreting transmitted resistance values .................................................................. 29
Equation 7-1. Calculating gfit_fep_set_XX_data length ..................................................................... 59
Equation 8-1. Deriving the scale factor .........................................................................................113

G.FIT User Guide and Specification, Rev 2.0_Alpha.14 Page 11 of 117
thisisant.com
1Support
The D52 ANT SoC module series (including G.FIT) uses the nRF52832 from Nordic Semiconductor. You can
seek technical support from Nordic Semiconductor, www.nordicsemi.com. G.FIT application support can be
sought from Garmin Canada via www.thisisant.com.
1.1 G.FIT technical references
Refer to current versions of the listed documents and software. To ensure you are using the current versions,
check www.thisisant.com, www.bluetooth.com, www.nordicsemi.com, or
http://infocenter.nordicsemi.com/index.jsp or contact your Garmin Canada representative. User registration
may be required.
Documents:
a. G.FIT User Guide and Specification
b. G.FIT Firmware Updater Application Note
c. G.FIT and Premium Module Manufacturing Considerations Application Note
d. nRF52832 Product Specification, Nordic Semiconductor
e. nRF52 Series Compatibility Matrix, Nordic Semiconductor In focenter
f. nRF52832 Objective Product Specification, Nordic Semiconductor
g. nRF52832 S332 SoftDevice Specification, Dynastream Innovations
h. nRF52 Development Kit Documentation, Nordic Semiconductor Infocenter
i. ANT SoC Module Starter Kit User Manual, Dynastream Innovations
j. ANT Message Protocol and Usage, Dynastream Innovations
k. Interfacing with ANT General Purpose Chipsets and Modules, Dynastream Innovations
l. Application Note: Interpreting RF Radiation Patterns, Dynastream Innovations
m. Bluetooth Fitness Machine Service/Profile, Bluetooth SIG
n. Bluetooth Core Specification, Bluetooth SIG
Software:
a. G.FIT SDK –simulators, G.FIT, iOS, Connect IQ demo code
b. G.FIT Library –G.FIT Library files, S332 ANT/Bluetooth SoftDevice, Evaluation G.FIT Network
Processor binary
c. S332 nRF52832 SoftDevice, Garmin Canada
d. nRF5 SDK, Nordic Semiconductor
e. ANTwareII –a system testing and debugging tool, Dynastream Innovations
f. SimulANT+

Page 12 of 117 G.FIT User Guide and Specification, Rev 2.0_Alpha.14
thisisant.com
Design models (all apply to G.FIT modules):
a. D52Q Altium library, Dynastream Innovations
b. D52Q module STEP model, Dynastream Innovations
c. D52M Altium library, Dynastream Innovations
d. D52M module STEP model, Dynastream Innovations

G.FIT User Guide and Specification, Rev 2.0_Alpha.14 Page 13 of 117
thisisant.com
2Use case
G.FIT is a turnkey dual-protocol ANT/Bluetooth® low
energy (BLE) solution for wireless fitness equipment
and smart bike trainers, optimized for group training
environments with 50+ fitness devices and multiple
receivers.
As group fitness training grows in demand, many
challenges to a good experience are presenting
themselves:
•Gym and studio environments have lots of WiFi
(and other) interference.
•Available heart rate monitors from multiple
manufacturers and wireless standards.
•Gym users and instructors are mostly non -
technical users.
•Gym patrons bring in their own personal
devices (e.g. watches and phones).
•Gyms have many types of equipment from
multiple manufacturers to maintain, many of them with different operating procedures.
With these challenges in mind, Garmin Canada Inc. has evolved individual fitness machines and smart bike
trainers to incorporate wireless standards group fitness capabilities. The G.FIT solution is the result of that
evolution, and solves the challenges of group fitness:
•G.FIT works around WiFi interference to ensure large groups of 50+ devices can connect
concurrently.
•G.FIT solves pairing and setup difficulties with dual protocol support for both ANT+ and BLE heart
rate monitors.
•G.FIT makes it easy for non-technical users to pair by using proximity pairing and list pairing
features.
•G.FIT solves personal device pairing by re-broadcasting ANT+ or BLE heart rate data and works
with Bluetooth FTMS (including Control Point) and the ANT+ FE-C Device Profile so that
people can record entire workout sessions on their own personal devices.
•G.FIT enables technology maintenance with both built-in support for easy wireless updates and
the addition of custom tailored features and controls using the G.FIT SDK.

Page 14 of 117 G.FIT User Guide and Specification, Rev 2.0_Alpha.14
thisisant.com
Figure 2-1. G.FIT use case illustration –fitness equipment
Figure 2-2 - G.FIT use case illustration - smart bike trainer

G.FIT User Guide and Specification, Rev 2.0_Alpha.14 Page 15 of 117
thisisant.com
3Development kit contents & software downloads
The D52 starter kit (D52DK2) contains all the necessary equipment needed to start G.FIT development. Se e
https://www.thisisant.com/developer/components/gfit/#873_tab .
•G.FIT compatible module: D52QSKM6IA-A Module
•USB Interface Board: The USB interface board is required so that the G.FIT module can be used
with the provided PC application. See section B.2 for more details on installing the necessary drivers.
•USB-m: The USB-m is required so that the developer can view the data being transmitted by the
G.FIT module. The USB-m can be used with SimulANT+ to connect to one of the G.FIT module’s
ANT+ FE-C channels.
G.FIT development is aided and supported by two download packages:
•G.FIT libraries package: a commercially licensed packages which contains static libraries, API
headers, evaluation network processor and ANT/BLE S332 SoftDevice.
•G.FIT software development kit (SDK): a package licensed under the ANT+ Shared Source
license that contains an example SoC application, FE simulator, and reference apps for Garmin
Connect IQ and iOS.
The following sections provide a more detailed overview of downloaded G.FIT development collateral, which
can all be obtained here: https://www.thisisant.com/developer/components/gfit/#874_tab
3.1 G.FIT libraries
The content of the G.FIT libraries package is as follows:
•G.FIT static library: Pre-built library, compiled in GCC, that can be used by custom applications using
G.FIT modules as an SoC. The static library, libgfit.a is available in the bin folder of the
G.FIT_Library zip file.
•API headers: These files, available in the inc\ folder of the G.FIT_Library zip file, need to be included
by your application to access the G.FIT static library, and provide documentation on the availa ble API
calls.
ogfit_interface.h: Function definitions and API documentation.
ogfit_defines.h: Constants, enumerations and data structures.
•G.FIT Evaluation Network Processor: Pre-built hex file for the G.FIT network processor intended for
evaluation purposes. This hex file can be used only in D52 development modules (D52QSKM6IA -A),
e.g., for use with the D52 ANT SoC Module Series Starter Kit (D52DK2) .
•ANT/BLE S332 SoftDevice
3.2 G.FIT software development kit
The G.FIT software development kit includes:
•Example SoC application (demo_gfit)
•Fitness equipment simulator PC application
•Reference CIQ application
•Reference iOS application

Page 16 of 117 G.FIT User Guide and Specification, Rev 2.0_Alpha.14
thisisant.com
•SimulANT+ (downloaded separately)
These are described in the following sections.
3.2.1
Example SoC application (demo_gfit)
Shows how to integrate the G.FIT library into an application. The demo implements a simple fitness
equipment console with three buttons: Start (button A), Stop (button B) and Disconnect HR (button C). The
demo shows how to initialize and configure G.FIT, trigger state transitions, and update data transmitted over
the ANT+ FE-C and BLE FTMS profiles. Paired HR values and control commands are output over Segger RTT.
The project file for the example application is located under apps \demo_gfit\armgcc. See section A.1 for
more details on compiling the demo.
3.2.2
Fitness equipment console simulator PC application
The fitness equipment console simulator PC application simulates a fitness equipment console that uses
G.FIT. See section Appendix B - Fitness equipment console simulator for more details.
3.2.3
Reference CIQ application
Garmin’s Connect IQ platform supports creating apps with custom ANT+ channels that can be used to
connect Garmin’s wearable and bike accessories with G.FIT enabled fitness equipment. If the user has a
Connect IQ compatible Garmin watch/bike computer, they can track their workout and save that activity for
viewing on Garmin Connect over the ANT+ FE -C channel. See section 6.4 for more details.
3.2.4
Reference iOS application
iOS devices supporting BT v4.0 and above are compatible with G.FIT over a BLE connection using the FTMS
(Fitness Machine Service), HRS (Heart Rate Service), and DIS (Device Information Service). An iOS
Application (including source code) is available in the download package to provide an example for scanning,
pairing and connecting with a G.FIT enabled fitness equipment device.
3.2.5
SimulANT+
SimulANT+ can be used to connect to one of the G.FIT ANT+ FE -C channels. See section 6.3 for more details.
SimulANT+ is available for download at https://www.thisisant.com/developer/resources/downloads/ . Before
downloading SimulANT+ you will need to create an account on http://www.thisisant.com.

G.FIT User Guide and Specification, Rev 2.0_Alpha.14 Page 17 of 117
thisisant.com
4G.FIT operation
4.1 Fitness equipment (FE) states
G.FIT has been designed so that it complies with the states defined in the ANT+ Fitness Equipment Device
Profile. The ANT+ Fitness Equipment Device Profile defines four states that the fitness equipment can be in.
Any FE device using G.FIT shall move between these states in response to user interaction as shown in Figure
4-1 below. These state transitions are completed using the gfit_fep_set_state_ command (section 7.3.1).
When G.FIT is power cycled, it will enter a configuration state. In this configuration stage the application
shall then configure G.FIT for the type of fitness equipment and desired fitness equipment behaviour. To
move out of configuration mode, mode to state READY. When the fitness equipment is not used it can remain
in a low power state, the OFF state. Typically, user activity such as pedaling will wake up the FE and activate
the user interface. This would be an example of when to make the transition to the RE ADY state. Some FE
may never sleep and would always default to the READY state when not in use.
From READY, a button press or sustained activity begins a workout session and puts the FE into the IN USE
state. At the end of the workout a button press or user inactivity may end the session and put the FE into the
FINISHED state. From FINISHED, another button press or elapsed time with no activity will return the FE to
the READY or OFF state.
OFF
READY
IN USE
FINISHED
(
PAUSED)
Equipment Turned ON
Or, User activity
Equipment Turned OFF
Or, Inactivity
User Presses START
Or, Sustained Activity
User Presses START
Or, Activity Resumes
Activity Stops
Or, User Presses STOP
User Ends Session
Or, Sustained Inactivity
G.FIT
CONFIGURATION
(OFF)
POWER
CYCLE
Figure 4-1. Fitness equipment state machine

Page 18 of 117 G.FIT User Guide and Specification, Rev 2.0_Alpha.14
thisisant.com
4.1.1
G.FIT CONFIGURATION (OFF)
Each time G.FIT is power cycled, its settings are reset and it enters a special OFF state; during this initial
OFF state, G.FIT is in configuration mode. In this initial OFF state , the application MCU configures G.FIT to
meet the desired behaviour for the given fitness equipment and required use case. All commands that are
used to configure G.FIT must be sent in this state. There are some minimum requirements that G.FIT
requires before transitioning from OFF to READY, see section 4.3 for the minimum G.FIT configuration
sequence.
4.1.2
OFF
This state is used to conserve power and it is recommended that G.FIT be put into this state after sustained
user inactivity.
4.1.2.1 Heart rate receive channels
Both ANT+ and BLE heart rate scan channels are closed.
4.1.2.2 Fitness equipment transmit channels
Both the ANT+ FE-C channel and BLE FTMS peripheral transmit channels are closed.
4.1.2.3 Transitioning from OFF
When transitioning from OFF to READY, the developer should ensure that all channels have finished closing
(see section 4.1.2.1, and section 4.1.2.2) before making the transition.
4.1.3
READY
This state should be entered when there is initial user activity or when a user has recently ended a session.
This state opens scanning channels that search for BLE and ANT+ heart rate monitors, allowing the user to
connect their heart rate monitors as they prepare for a workout. Since G.FIT is scanning during this time,
avoid running additional scans on other channels or doing flash writes. It also turns on the ANT+ FE-C
channel and the BLE FTMS peripheral which transmits data describing the user’s workout.
4.1.3.1 Heart rate receive channels
ANT+ and BLE heart rate scan channels are opened and will remain open while in state READY. If a heart
rate monitor is paired to G.FIT, a dedicated channel is opened to establish a connection with that heart rate
monitor, both ANT+ and BLE heart rate scan channels will remain open and scan for heart rates wh en
connected to a heart rate monitor.
4.1.3.2 Fitness equipment transmit channels
The ANT+ FE-C channel is opened and begins transmitting and BLE FTMS peripheral begins advertising. Both
channels will remain open and continue transmitting while in state READY. If a display is paired to G.FIT
while in state IN USE, a connection is established with the display and the BLE FTMS peripheral stops
advertising.
4.1.4
IN USE
This state should be entered when the user has sustained activity or has indicated a desire to start a workout
session by pressing the start button.
4.1.4.1 Heart rate receive channels
The heart rate receive channels have the following behaviour depending on the user interaction .
4.1.4.1.1
No heart rate monitor connected
If G.FIT moves to state IN USE and there are no heart rate monitors connected, then the ANT+ and BLE
heart rate scan channels will remain open for 30 seconds (by default, this can be adjusted using
HR_SetInUseScanTimeout, see section 7.3.4). After 30 seconds the ANT+ and BLE heart rate sc an channels

G.FIT User Guide and Specification, Rev 2.0_Alpha.14 Page 19 of 117
thisisant.com
will close preventing any heart rate monitors from pairing to the G.FIT. Avoid running additional scans on
other channels or doing flash writes while G.FIT is still scanning.
4.1.4.1.2
Heart rate monitor paired while IN USE
If a heart rate monitor is paired to the G.FIT module while in state IN USE, a dedicated channel is opened to
establish a connection with that heart rate monitor. After the connection is established to the heart rate
monitor, both ANT+ and BLE heart rate scan channels will close immediately.
4.1.4.1.3
Heart rate monitor paired while READY
If a heart rate monitor was paired to the G.FIT while it was in state READY, when the G.FIT transitions to
state IN USE both ANT+ and BLE heart rate scan channels will close immediately.
4.1.4.2 Fitness equipment transmit channels
The ANT+ FE-C channel remains open and continues transmitting while in state IN USE. The BLE FTMS
peripheral has the following behaviour depending on the user’s interactions.
4.1.4.2.1
No display connected to peripheral
If G.FIT moves to state IN USE and there is no display connected to the BLE FTMS peripheral, the peripheral
will continue to advertise for 30 seconds (by default, this can be adjusted using
HR_SetInUseAdvertisingTimeout, see section 7.3.9). After 30 seconds the BLE FTMS peripheral will stop
advertising preventing any displays from pairing to G.FIT.
4.1.4.2.2
Display connected while IN USE
If a display is paired to G.FIT while in state IN USE, a connection is established with the display and the
peripheral stops advertising.
4.1.4.2.3
Display connected while READY
If a display is paired to G.FIT while in state READY, the BLE FTMS peripheral will not advertise in state IN
USE.
4.1.5
FINISHED (PAUSED)
This state should be entered when a user presses stop or the user’s activity stops. Sustained inactivity should
cause G.FIT to transition state OFF or READY.
4.1.5.1 Heart rate receive channels
The heart rate receive channels have the following behaviour depending on the user interaction.
4.1.5.1.1
No heart rate monitor connected
If G.FIT moves to state FINISHED while there are no heart rate monitors connected, and both the ANT+ and
BLE heart rate scan channels are still open (the time spend in state IN USE was less than the
InUseScanTimeout), the InUseScanTimeout will reset and the scan channels will remain open for the timeout
duration.
4.1.5.1.2
Heart rate monitor paired
If a heart rate monitor was paired to the G.FIT when moving to state FINISHED, both ANT+ and BLE heart
rate scan channels will remain closed. The G.FIT will maintain the connection to the heart rate monitor while
in state FINISHED.
4.1.5.2 Fitness equipment transmit channels
The ANT+ FE-C channel remains open and continues transmitting while in state FINISHED. The BLE FTMS
peripheral has the following behaviour depending on the user’s interactions.

Page 20 of 117 G.FIT User Guide and Specification, Rev 2.0_Alpha.14
thisisant.com
4.1.5.2.1
No display connected to peripheral
If G.FIT moves to state FINISHED while there is no display connected and the BLE FTMS peripheral is still
advertising (the time spend in state IN USE was less than the InUseAdvertisingTimeout), the
InUseAdvertisingTimeout will reset and the peripheral will conti nue to advertise for the timeout duration.
4.1.5.2.2
Display connected
If a display is paired to G.FIT when moving to state FINISHED, the BLE FTMS peripheral will not advertise in
state FINISHED.
4.2 Pairing heart rate monitors
G.FIT provides two methods of connecting to heart rate monitors to best fit the required use case:
•Proximity pairing allows the user to pair a heart rate monitor by physically moving the heart rate
monitor to within the ‘pairing zone’ of the G.FIT module.
•Channel ID based pairing gives the application the flexibility to select wh ich heart rate monitor to
pair with; allowing the user to manually select the desired heart rate monitor by scrolling through all
available heart rate monitors seen by G.FIT.
4.2.1
Proximity pairing
G.FIT will pair with a heart rate monitor automatically based on the proximity to the G.FIT module. In order
to successfully pair with a heart rate monitor, the received signal strength received from the heart rate
monitor must maintain a specified signal strength during each phase of the connection process. There are
three phases in the connection process: searching, pairing, and tracking. See Figure 4-2 for typical zone
sizes.
Searching: This phase of the connection process searches for possible heart rate monitor to connect to. It
has the strictest RSSI threshold so that a heart rate monito r must be brought in close proximity to the G.FIT
module. Once a heart rate monitor is detected in the searching phase it then advances to the Pairing phase.
Pairing: This phase of the connection process ensures that the heart rate monitor found in the sea rching
phase maintains a close proximity to the G.FIT module. This helps prevent accidental connections to other
heart rate monitor. This threshold is less strict than searching but should be defined so that the user must
keep the heart rate monitor in the pairing zone during the initial connection process. Once G.FIT receives the
sufficient number or packets from the heart rate monitor within the defined signal strength, a connection is
established and the heart rate monitor advances to the tracking phase.
Tracking: The tracking phase is used to maintain a connection to the heart rate monitor while the user is
using the fitness equipment.
Table of contents