Skip to content

An application that polls data from a Concept2 Performance Monitor (PM), displays data on-screen, and optionally feeds the data to a SignalR Hub. Also allows workouts to be programmed onto the PM via SignalR messages, affording the ability to program via connection to Beyond the Whiteboard APIs or manual UI entry.

License

Notifications You must be signed in to change notification settings

addixon/ErgCompetePM

Repository files navigation

ErgCompetePM

Built in .NET 5.0, this application establishes and maintains communication wtih a Concept2 PerformanceMonitor. Standard workout data is polled at minimum intervals and, if desired, forwarded to a listening SignalR hub.

This application leverages LibUsb (by means of LibUsbDotNet) and is therefore platform-independent. The PM3 libraries provided by CSAFE were dlls compiled for Windows only and for that reason were not compatible with my project.

Additionally, while many CSAFE and PM3 commands are not currently used in this application, they do exist and can be leveraged. Many SET commands include convenience constructors to allow a friendly invocation of them with their relevant data.

Known issues

At this time, the Runtime Identifiers do not seem to be respected. These are used in establishing the correct libusb library to use. A workaround is to manually specify the desired library based on OS in LibUsbDotNet.LibUsbDotNet.Generated.NativeMethods.cs

If a device is disconnected and then reconnected within the auto discovery window, any write command results in a Timeout. I intend to explore events instead of polling to get a faster read on when a device is disconnected, but a workaround is to lower the AutoDiscovery period.

Recognitions

In the process of converting this application from the PM3 libraries to a lower-level usb implementation, there were a few projects that helped provide insight into troubleshooting and communication standards. Those are:

Notes

This is one of my first attempts at device communication, so I am sure that there are many areas for improvement. This code is also in-development and there are many areas of cleanup that need to be performed left over from various iterations of experimentation in addition to some functionality being pulled into additional services. Exception handling throughout the project also needs to be improved and made consistent. That said, I do hope that it proves useful to someone who is wanting to integrate with a Performance Monitor via the CSAFE protocols.

About

An application that polls data from a Concept2 Performance Monitor (PM), displays data on-screen, and optionally feeds the data to a SignalR Hub. Also allows workouts to be programmed onto the PM via SignalR messages, affording the ability to program via connection to Beyond the Whiteboard APIs or manual UI entry.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages