Welcome to the Small Earth Technology ANT+ Class Library

Small Earth Tech
Whitespace is the programmers punctuation mark

Overview

Welcome to the Small Earth Technology ANT+ class library and examples. My goal is to provide a frictionless as possible implementation to enable applications to interface and acquire data from a variety of ANT+ sensor sources. The primary class is AntPlus and it contains device profiles of ANT+ devices and common data pages. The AntRadioInterface class permits different interfaces to the hardware being used and lends itself to dependency injection.

The libraries are largely intended to support applications interfacing to ANT devices. This could be a group app, mobile app, push data to the cloud, or some other purpose.

The primary projects are AntPlus and AntRadioInterface. AntPlus defines the device profiles derived from the AntDevice class. The AntRadioInterface defines an interface to interact with an ANT radio to send and receive from an ANT device. Implementors of the AntRadioInterface supply a concrete implementation.

The projects in the Examples folder illustrate usage of the libraries. Of particular note is the AntUsbStick project. It provides a concrete implementation of the AntRadioInterface using the Dynastream/Garmin ANT USB sticks. This project is referenced by the examples.

Getting Started

Become an ANT+ Adopter! There is no membership fee. Create a login and go to Become an Adopter This provides you with access to device profiles, SDK's, and useful software tools.

Prerequisites

  • Visual Studio 2022 Community Edition or higher must be installed.

  • Clone or fork this repository.

  • OPTIONAL: ANT USB stick hardware and device drivers. I use two sticks for testing and some example projects require it. You can get them from DigiKey for around $45 for two.

  • OPTIONAL: Only needed if you intend to modify the libraries I've provided in the AntUsbStick project. Download the ANT PC SDK zip file, unblock, and install.

What's New

Introducing the Ant+ Hosting Extensions. It's also available as a NuGet package. The hosting extensions make it easy to add ANT+ and supporting classes to dependency injection containers. The extensions support MAUI and other Windows applications that employ dependency injection. A nice benefit leveraging DI is that it enables adding ANT device profiles that the ANT+ class library does not support.

What's Old

The AntMulticastServer console application and XamAntClient client are no longer supported. Xamarin is no longer being supported by Microsoft. MAUI is the successor to Xamarin.

Examples

  • The AntUsbStick class library is derived from AntRadioInterface and implements a concrete implementation that supports commercially available ANT USB sticks from Dynastream/Garmin. This project is essential to the other examples. It's now available as a NuGet package.

  • The WpfUsbStickApp WPF application demonstrates usage of the ANT class library. It depends on the AntUsbStick project and the hosting extensions.

  • The MauiAntGrpcClient This example illustrates using .NET MAUI and gRPC. You can find it in the Examples folder under MAUI-gRPC. It consists of four projects - a shared gRPC library, the gRPC service, the service installer, and the client application. The client application runs under Windows, Android emulators, and Android mobile devices. I have not tested it on any of the other platforms MAUI apps can run on. Details are located here.

Known Issues

Launching SimulANT+ may close ANT radio acquired by any of the example applications. Restarting the example application restores operation. Working on root cause and mitigation.

See Also