Page 1 of 1
Creating Interval Workouts
Posted: January 17th, 2021, 1:54 am
by RandyF
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!
Re: Creating Interval Workouts
Posted: January 26th, 2021, 12:23 pm
by tijmenvangulik
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
Re: Creating Interval Workouts
Posted: February 2nd, 2021, 10:49 am
by RandyF
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
Re: Creating Interval Workouts
Posted: February 15th, 2021, 1:46 am
by Tsnor
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.
Re: Creating Interval Workouts
Posted: March 2nd, 2021, 6:13 am
by Mark Pettit
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
Posted: March 26th, 2021, 7:00 am
by FooTheBar
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
Posted: April 18th, 2021, 8:09 pm
by Mavvie
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.
Re: Creating Interval Workouts
Posted: April 19th, 2021, 3:42 am
by Citroen
Mavvie wrote: ↑April 18th, 2021, 8:09 pm
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.
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
Posted: April 19th, 2021, 12:23 pm
by Mavvie
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.
Re: Creating Interval Workouts
Posted: April 19th, 2021, 1:46 pm
by Citroen
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.
Re: Creating Interval Workouts
Posted: April 27th, 2021, 7:55 am
by Mark Pettit
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
Posted: May 6th, 2021, 4:32 pm
by FooTheBar
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.