Creating Interval Workouts
Creating Interval Workouts
I've got a little project for myself going, and I've implemented enough CSAFE to start a basic workout, but I'd like to be able to create an interval workout - does anyone have any information about how to do that?
I know it is possible because my normal mobile app I used does it just fine (LiveRowing), and from what I understand, the Bluetooth interface is just CSAFE over Bluetooth.
Thanks!
I know it is possible because my normal mobile app I used does it just fine (LiveRowing), and from what I understand, the Bluetooth interface is just CSAFE over Bluetooth.
Thanks!
- tijmenvangulik
- 500m Poster
- Posts: 64
- Joined: November 25th, 2012, 10:24 am
Re: Creating Interval Workouts
Hi,
With Blue tooth you can directly to connect to characteristics (this is for getting information) or talk using csafe. For setting/sending data you need csafe. It is explained here:
https://www.concept2.com/files/pdf/us/m ... nition.pdf
When you download the software development kit they also provide more info on the csafe protocol and the commands.
https://www.concept2.com/service/softwa ... opment-kit
For blue tooth it best to pick a library which already implements the csafe protocol and some commands. There are multiple libraries available on git hub.
There
With Blue tooth you can directly to connect to characteristics (this is for getting information) or talk using csafe. For setting/sending data you need csafe. It is explained here:
https://www.concept2.com/files/pdf/us/m ... nition.pdf
When you download the software development kit they also provide more info on the csafe protocol and the commands.
https://www.concept2.com/service/softwa ... opment-kit
For blue tooth it best to pick a library which already implements the csafe protocol and some commands. There are multiple libraries available on git hub.
There
Re: Creating Interval Workouts
Thanks for the reply, but I have done all of that - I've implemented a CSAFE Protocol stack in C# and I can send/receive CSAFE commands from my PM5.
Currently I can:
* Set a single-distance workout length.
* Set a single-time workout.
* Set a Target Pace
* Set Target Calories
* Set the Program
* Start the Workout
* Record Data during the workout.
* Retrieve all post-workout data.
My question, specifically, was: "but I'd like to be able to create an interval workout "
Specifically, I'm looking at creating a workout like:
3:00m/0:30r/5:00m/1:00r/8:00m/1:30r/6:00m/1:15r/5:00m/0:00r
From what I have gathered in research for this, the commands to do this ARE NOT included in the Concept2 links that you kindly attached.
As I said, I know this is possible because this is the exact workout I use on my mobile app that connects with BLE. However, I understandably can't snoop their traffic to see what commands they are sending (unless I can, I'd take that as a solution as well).
Regards,
A
Currently I can:
* Set a single-distance workout length.
* Set a single-time workout.
* Set a Target Pace
* Set Target Calories
* Set the Program
* Start the Workout
* Record Data during the workout.
* Retrieve all post-workout data.
My question, specifically, was: "but I'd like to be able to create an interval workout "
Specifically, I'm looking at creating a workout like:
3:00m/0:30r/5:00m/1:00r/8:00m/1:30r/6:00m/1:15r/5:00m/0:00r
From what I have gathered in research for this, the commands to do this ARE NOT included in the Concept2 links that you kindly attached.
As I said, I know this is possible because this is the exact workout I use on my mobile app that connects with BLE. However, I understandably can't snoop their traffic to see what commands they are sending (unless I can, I'd take that as a solution as well).
Regards,
A
Re: Creating Interval Workouts
Suggest you email Concept2 directly with a pointer to this thread or a cut/paste. They are generally very helpful even with odd questions.
Try info@concept2.com as an email or use the contact info from their website. When you get an answer please post back here. I'm sort of interested too. Thanks.
Try info@concept2.com as an email or use the contact info from their website. When you get an answer please post back here. I'm sort of interested too. Thanks.
-
- Paddler
- Posts: 8
- Joined: December 20th, 2016, 3:01 pm
Re: Creating Interval Workouts
I'll be keen to see the result of this. But realistically, I doubt you'll get any response. What you're asking for is the SINGLE most obvious feature wanted by developers for the erg, and it just never comes. You'd swear it was a national security issue. The second most obvious feature of course is the heart rate monitor cool-down reading. But that will also never come.
Re: Creating Interval Workouts
I also to came here with this exact question. Maybe it's time to create a user-developed PM. (e.g. a small microcontroller that reads the signals from the flywheel and sends the info to an App).
Re: Creating Interval Workouts
I'd love to be able to do this as well.
The c2 csafe.h does mention some commands which may make this possible, but of course there's no documentation, example, or even mention of these commands on the entire rest of the internet.
https://github.com/tijmenvangulik/PM3Mo ... afe.h#L581
I tried some of the obvious ones (set workout type to 7, set workout interval count, ...), with no success.
The c2 csafe.h does mention some commands which may make this possible, but of course there's no documentation, example, or even mention of these commands on the entire rest of the internet.
https://github.com/tijmenvangulik/PM3Mo ... afe.h#L581
I tried some of the obvious ones (set workout type to 7, set workout interval count, ...), with no success.
- Citroen
- SpamTeam
- Posts: 8036
- Joined: March 16th, 2006, 3:28 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: Creating Interval Workouts
There used to be a full spec for CSAFE at http://www.fitlinxx.com/csafe/ but that has withered away.
With a bit of Google Fu I've found a copy of a C2 document at https://c2usa.fogbugz.com/default.asp?W13&nRevision=2
Re: Creating Interval Workouts
So I took the advice I saw and sent C2 an email. They got back immediately and sent me the most recent PM/CSAFE communication spec which includes examples for setting up interval workouts! Can't wait to add this to my project. I will post it here at some point; it's inspired by ErgometerJS but aims to be a simpler/more minimal interface.
Here's a copy for anyone else interested. See page ~73: https://drive.google.com/file/d/14kArl8 ... sp=sharing
By the way, you can still access the fitlinxx docs through the internet archive: https://web.archive.org/web/20071207110 ... mmands.htm
But of course this doesn't contain any PM-specific commands.
Here's a copy for anyone else interested. See page ~73: https://drive.google.com/file/d/14kArl8 ... sp=sharing
By the way, you can still access the fitlinxx docs through the internet archive: https://web.archive.org/web/20071207110 ... mmands.htm
But of course this doesn't contain any PM-specific commands.
- Citroen
- SpamTeam
- Posts: 8036
- Joined: March 16th, 2006, 3:28 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: Creating Interval Workouts
It would be even better if Concept2 could publish all of their non-confidential CSAFE docs in a small corner under https://www.concept2.com/service/software
I'd expect Scott H @ C2 has a library full of stuff that could be shared.
I'd expect Scott H @ C2 has a library full of stuff that could be shared.
-
- Paddler
- Posts: 8
- Joined: December 20th, 2016, 3:01 pm
Re: Creating Interval Workouts
Well Mavvie - I congratulate you. You have achieved what no man dreamed possible. I guess still too much to ask for wrt Heart Rate cool-down/recovery.
Re: Creating Interval Workouts
Did you manage to use the proprietary commands to create an interval training? I can use the normal commands, but my PM5 ignores the commands you mentionen on p. ~76.