This contraption 💾 is something called a "rowing machine", which is a seat that slides along a long horizontal track; and a pully attached to a flywheel with a chain. The flywheel is attached to a microcontroller with a screen and some buttons, which displays useful information to the operator. To operate the machine, you simply pull the chain repeatedly with your hands and legs until you are more healthy. This motion is reminiscent of the "squats" emote in the critically acclaimed MMORPG Final Fantasy XIV.
Nominally one uses a "Concept2 RowErg" to enhance their STR and CON stats, but that is not why I'm writing about it!
Unbeknownst to me when I purchased it, there are several ways to connect the machine's microcontroller to other devices, which opens up the possibility of using this as a game controller, and so on. On the machine I have, the microcontroller + display apparatus is called a "PM5", and older versions of this machine have different interfaces. The "PM" seems to stand for "Performance Monitor", and the 5 is the version number.
The PM5 is attached to the dynamo via what looks to be a simple analogue connection, and it is able to translate the line voltage into useful information about the current state of the machine, which is then displayed to the operator of the machine. This device can also connect to heart rate monitors to supplement the workout data extracted from the dynamo. The PM5 also has a number of different workout modes, and features some built-in games that I haven't tried yet. It can also save a log of your workouts to a FAT-formatted USB drive.
The PM5 supports the following options for connecting to other devices:
There's also support for something called "ANT", which is some kind of wireless protocol.
TLDR: It's MIDI for exercise equipment, except it's not MIDI.
CSAFE stands for "Communications Specification for Fitness Equipment", which is a standardized protocol for exercise machines to communicate with other devices.
From what I can tell, USB and Bluetooth are not standard transports for standard CSAFE. CSAFE uses an RJ45 jack with a specific wiring pattern, and carries audio and serial data. Reading between the lines, the USB and Bluetooth interfaces here are probably just serial interfaces.
According to the specification published by Concept2 💾, the PM5 implements two different versions of the CSAFE protocol. The first version is called the "public" version, which is the standard CSAFE protocol. The second version is called the "proprietary" version, which is a non-standard variant of CSAFE. The docs are very clear that you are only able to use one or the other, and that they should not be mixed.
Annoyingly, Concept2's documentation also states that only partial access to the proprietary variant is available without "authentication" for USB and RS485 connections, but full access is apparently allowed to Bluetooth connections without special "authentication". This appears to be some means of restricting which developers are allowed full access to the non-standard protocol.
However, the standard CSAFE protocol appears to be available to all three connection types without requiring special authentication.
I'm not going to exhaustively enumerate what is in the protocol document, because there is a lot of functionality documented there and you should go look yourself if you are interested, but these are some variables the "public" protocol exposes that I think might be useful to access for games:
The documented "proprietary" protocol looks to be more concerned with the workout modes that the PM5 implements, stuff specific to a racing system, some way to control the display, user profiles, lots of stats, memory, and so on. The "proprietary" protocol also has a means of querying the flywheel speed, which sounds useful, but you might be able to determine that indirectly from some of the parameters exposed in the public protocol.
It is unclear from the specification documentation which functionality you are locked out of without authentication when using the wired interfaces, but there is an error code for it, so hypothetically this is something one could enumerate.
The specification documentation cautions that one should not send subsequent commands until an acknowledgement has been received or the minimum frame spacing has elapsed. This gives us a sampling interval of 50 milliseconds (a paltry 20 fps). Depending on how you intend to use this data, this coarse sampling interval may be problematic.
Finally, the manual that comes with the device wisely advises against twisting the handle, as the connecting chain is a roller chain that could be damaged if you twist it.
Realistically this device for measuring Ergo Erg, hench its name.
The PM5 microcontroller is able to provide some derived information, such as distance traveled, watts, etc, but these are all essentially just functions of the same variable.
This could be used as a means of propelling a character or vehicle in a game, but there is no way to steer provided by the machine. The obvious temptation is to modify the handle in some way to add an additional steering mechanism, but given the caution about twisting the chain, I would recommend against doing that.
Unfortunately, I think Combat Rowing VR is likely to be improbable without additional sensors due to the PM5's low sampling rate, the lack of steering, and inability to determine the position of the seat and handle.
A more realistic angle is to consider the strengths of the device instead of ignoring them entirely. When you are operating the machine the normal way, you are essentially functioning as a human control loop with your ergs being the setpoint (or some fake proxy for it like "calories"). The telemetry from the device is then meant to guide you by cluing you in on how far off you are from your target erging. This is also known as the human emotion called "exercise", which some people claim is intrinsically satisfying.[citation needed]
With all that in mind, here are a few ideas that I think might make for useful applications of this game controller without requiring any modifications or supplemental sensors:
This page contains general information about the device, as well as pictures and videos and other things.
This is the official documentation for both the "public" and "proprietary" CSAFE protocols supported by the PM5, and is very comprehensive.
This is Concept2's official developer portal, which features a link to their CSAFE specification document, links to several old SDKs, and some other information.
I got really excited when I saw that there was a SDK available, but it turns out the installer is broken on Windows 10, which might be why they now provide the specification document separately. The good news is you probably don't really need their SDK anyway for USB and Bluetooth, since it looks like they're using a regular HID device interface for both.
This site has a collection of opensource browser-based applications that use Web Bluetooth to connect to the PM5. This is likely an excellent starting point for learning how to communicate with the PM5 over Bluetooth.
This site also has some articles about how to interpret the data reported by the machine.
PyRow is a python library that provides an interface over the CSAFE USB interface. At this time of writing, the library appears to have an issue that prevents it from working with the latest firmware version. Likewise, the readme looks to be out of date, the readme states that the library has only been tested with Python 2.7, and the repository hasn't been updated in 5 years.
However, the breaking issue looks to be trivial to fix, and a quick scan through the forks show that making PyRow work with Python 3 may only require some simple changes.
YMMV. I think this is mostly useful as a reference for how to use communicate with the device over USB.
This is a cross platform C library for interfacing with USB and Bluetooth HID devices, and has nothing to do with the Concept2 RowErg otherwise. I have included it, because it will likely be useful when implementing rowing machine support in some game engines.