Repair or hack pro-form Tour de France exercise bike.

kilomotor

Joined Jan 17, 2022
13
Great to hear it works!! I was worried that your lower board was fried...tough to troubleshoot over the internet! And the lower controller is the same across different models of bike, interesting

Some ideas that I need to investigate further...
1. There are definitely higher "gears". When the console is operational and you change the incline of the bike, the "gear" also INCREASES. So the console does some magic to change the gear in concert with the incline. At first I thought it might be a mechanical linkage or the lower control board doing this, but I noticed the gear doesn't change when using my Arduino to change the incline. In highest gear and max incline the magnets are strong enough to stop my pedalling -- I will snoop the console message to record what gear setting this might be.
2. The lower board measures cadence and sends a response message to the console. The lower board is only silent when it is not connected to the console. The console in normal operation sends a message to the lower board at 2hz, even when we aren't making input to the console. The lower board responds and sends a message containing a value corresponding to cadence. Cadence is all my lower board can measure, so I think that is all it can send. The console then can calculate rpm, speed, distance and power (based on gear and cadence).

It should be possible to decode the messages sent by the lower board. I will record some and post them for analysis. Hopefully it is straight hex relating to rpm, unlike the weird incline and gear codes.

I can't figure out the codes for the gear and incline though -- is it some 6bit with parity and error correction? There is a pattern, going from B0 to B9-C0 to C6 or the inverse, but it makes my brain hurt trying to imagine the meaningful code to generate the patterns (I'm not a programmer by training!).

I'm interested in the ESP8266, I may need to source one to try it out. But then I'd need to learn something new!
 

dgrekov

Joined Jan 8, 2023
15
how would you send a signal down at 2hz to the board using arduino?

I am more of a programmer by experience so let me take a pass looking at the incline / resistance codes and see if there is any kind of pattern…
 

dgrekov

Joined Jan 8, 2023
15
Quick question … how does the board handle out of band or nonsensical values? Maybe we can try out various permutations and see how the board handles it, but don’t want to brick it…
 

kilomotor

Joined Jan 17, 2022
13
I don't think I explained the console to control board interaction very well. The console sends a message to the lower board 2 times per second (2Hz) and the lower board responds with data of it's own. I think it only sends back cadence, but maybe there is more in the response. A bit hard to tell... The following is a capture of the data sent between console and lower board when turning on the bike but NOT pedaling and NOT changing gears/incline. So you can see there is a constant flow of messages, 2 out and 2 back to the console every second. The longer messages in this exchange are from the lower board.

BAB6B1B0B6B0B0B0B7B0B0B0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6C18D8A
BAB5B1B0B3B0B0B0B2B0B0B0B0C1C18D8A
BAB5B1B0B3B0B2B0B1B0B2B0B0B3C4B6C18D8A

So the messages are mostly the same except for the bytes 14 to 17 which contain cadence info. Unfortunately it is coded in the weird B0-B9,C1-C6 format. But! it should be possible to reverse engineer the cadence values by writing values to the console data lines via the RS485 without the lower board connected (ie. write BAB5B1B0B3B0B2B0B1B0B2B0B0B3C4B6C18D8A) and seeing how the console interprets the message.

In terms of writing max values to the gear control, that should be fine as long as it isn't driven past the limits of the motor. But maybe not necessary as I can just record the command when I ride the bike and max out the incline.
So here is the exchange between console and lower board as I shift from gear 20 to 26 while at max incline. And it looks like the max gear value might be BAB6B1B0B6B0B1B0B5B0B0B7B7B1C38D8A.

BAB5B1B0B3B0B0B0B2B0B0B0B0C1C18D8A
BAB5B1B0B3B0B2B0B1B0B2B0B0B2B4B8B38D8A
BAB5B1B0B3B0B0B0B2B0B0B0B0C1C18D8A
BAB5B1B0B3B0B2B0B1B0B2B0B0B2C4B7C18D8A
BAB5B1B0B3B0B0B0B2B0B0B0B0C1C18D8A
BAB5B1B0B3B0B2B0B1B0B2B0B0B2C4B7C18D8A
BAB5B1B0B3B0B0B0B2B0B0B0B0C1C18D8A
BAB5B1B0B3B0B2B0B1B0B2B0B0B3B1B7B68D8A
BAB5B1B0B3B0B0B0B2B0B0B0B0C1C18D8A
BAB5B1B0B3B0B2B0B1B0B2B0B0B3B3B7B48D8A
BAB5B1B0B3B0B0B0B2B0B0B0B0C1C18D8A
BAB5B1B0B3B0B2B0B1B0B2B0B0B3B3B7B48D8A
BAB6B1B0B6B0B0B0B5B0B0B5C4B3B78D8A
BAB6B1B0B6B0B1B0B5B0B0B5C4B3B68D8A
BAB5B1B0B3B0B0B0B2B0B0B0B0C1C18D8A
BAB5B1B0B3B0B2B0B1B0B2B0B0B3B4B7B38D8A
BAB5B1B0B3B0B0B0B2B0B0B0B0C1C18D8A
BAB5B1B0B3B0B2B0B1B0B2B0B0B3B5B7B28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B0B3B0B2B0B1B0B2B0B0B2C5B7B98D8A

There are some unusual things going on in this exchange that I can't figure out at the moment, maybe important to the protocol, maybe not? The incline commands are prefaced by BAB6, but it seems there are two commands paired together each time. Is the first BAB6 command for error checking? and the second command sends the value? The first commands seem to come in only two different values, BAB6B1B0B6B0B0B0B5B0B0B7B7B1C48D8A or BAB6B1B0B6B0B0B0B5B0B0B7B4B2B08D8A. Anyway, it is getting too late to think about this, until next time...zzzzzz
 

dgrekov

Joined Jan 8, 2023
15
couple of observations and thoughts so far:

First I think we can agree that we know of 3 commands (at least) being sent form the console to the board:
B4 - Incline command
B5 - Status Report request command
B6 - Resistance command

For B5 ... we always ask for status the same way and get a response back with the values:

C: BA B5 B1 B0 B3 B0 B0 B0 B2 B0 B0 B0 B0 C1 C1 8D 8A
B: BA B5 B1 B0 B3 B0 B2 B0 B1 B0 B2 B0 B0 B3 C4 B6 C1 8D 8A


removing identical bytes, we get this:


C: .. B5 .. .. .. .. B0 .. B2 .. B0 .. .. C1 C1 .. ..
B: .. B5 .. .. .. .. B2 .. B1 .. B2 .. .. B3 C4 B6 C1 .. ..


at high cadence it sends: B3 C4 B6 C1 or B3 C3 B6 C2 and at low cadence it sends B0 B0 C1 B7

Now, with the control board response ... it's longer for cadence responses then requests ... it's not longer for gear ACKs...
So, if we look at the list above and remove all the B5s you get a nice list of gear changes ... cleaning up that list further you get something interesting:


.. B6 .. .. .. .. B0 .. .. .. .. B5 C4 B3 B7 .. ..
.. B6 .. .. .. .. B1 .. .. .. .. B5 C4 B3 B6 .. ..
.. B6 .. .. .. .. B0 .. .. .. .. B6 B0 B3 B4 .. ..
.. B6 .. .. .. .. B1 .. .. .. .. B6 B0 B3 B3 .. ..
.. B6 .. .. .. .. B0 .. .. .. .. B6 B3 B3 B1 .. ..
.. B6 .. .. .. .. B1 .. .. .. .. B6 B3 B3 B0 .. ..
.. B6 .. .. .. .. B0 .. .. .. .. B6 B6 B2 C5 .. ..
.. B6 .. .. .. .. B1 .. .. .. .. B6 B6 B2 C4 .. ..
.. B6 .. .. .. .. B0 .. .. .. .. B6 B9 B2 C2 .. ..
.. B6 .. .. .. .. B1 .. .. .. .. B6 B9 B2 C1 .. ..
.. B6 .. .. .. .. B0 .. .. .. .. B6 C2 B2 B9 .. ..
.. B6 .. .. .. .. B1 .. .. .. .. B6 C2 B2 B8 .. ..
.. B6 .. .. .. .. B0 .. .. .. .. B6 C5 B2 B6 .. ..
.. B6 .. .. .. .. B1 .. .. .. .. B6 C5 B2 B5 .. ..
.. B6 .. .. .. .. B0 .. .. .. .. B7 B1 B2 B3 .. ..
.. B6 .. .. .. .. B1 .. .. .. .. B7 B1 B2 B2 .. ..
.. B6 .. .. .. .. B0 .. .. .. .. B7 B4 B2 B0 .. ..
.. B6 .. .. .. .. B1 .. .. .. .. B7 B4 B1 C6 .. ..
.. B6 .. .. .. .. B0 .. .. .. .. B7 B7 B1 C4 .. ..
.. B6 .. .. .. .. B1 .. .. .. .. B7 B7 B1 C3 .. ..
.. B6 .. .. .. .. B0 .. .. .. .. B7 B4 B2 B0 .. ..
.. B6 .. .. .. .. B1 .. .. .. .. B7 B4 B1 C6 .. ..
.. B6 .. .. .. .. B0 .. .. .. .. B7 B7 B1 C4 .. ..
.. B6 .. .. .. .. B1 .. .. .. .. B7 B7 B1 C3 .. ..
.. B6 .. .. .. .. B0 .. .. .. .. B7 B4 B2 B0 .. ..
.. B6 .. .. .. .. B1 .. .. .. .. B7 B4 B1 C6 .. ..
.. B6 .. .. .. .. B0 .. .. .. .. B7 B7 B1 C4 .. ..
.. B6 .. .. .. .. B1 .. .. .. .. B7 B7 B1 C3 .. ..


B0 looks like a request and B1 is an ack ... but look at the values ... they're always one lower than the request ... not sure if it's recommending the next one in the sequence or what ... also, compare these values to the originally mapped 22 gears


.. B6 .. .. .. .. B0 .. .. .. .. B0 C6 B8 B5 .. .. 1
.. B6 .. .. .. .. B0 .. .. .. .. B1 B1 B8 B3 .. .. 2
.. B6 .. .. .. .. B0 .. .. .. .. B1 B4 B8 B0 .. .. 3
.. B6 .. .. .. .. B0 .. .. .. .. B1 B7 B7 C4 .. .. 4
.. B6 .. .. .. .. B0 .. .. .. .. B1 C1 B7 C1 .. .. 5
.. B6 .. .. .. .. B0 .. .. .. .. B1 C4 B7 B7 .. .. 6
.. B6 .. .. .. .. B0 .. .. .. .. B2 B0 B7 B4 .. .. 7
.. B6 .. .. .. .. B0 .. .. .. .. B2 B3 B7 B1 .. .. 8
.. B6 .. .. .. .. B0 .. .. .. .. B2 B6 B6 C5 .. .. 9
.. B6 .. .. .. .. B0 .. .. .. .. B2 B8 B6 C3 .. .. 10
.. B6 .. .. .. .. B0 .. .. .. .. B2 C2 B6 B9 .. .. 11
.. B6 .. .. .. .. B0 .. .. .. .. B2 C5 B6 B6 .. .. 12
.. B6 .. .. .. .. B0 .. .. .. .. B3 B1 B6 B3 .. .. 13
.. B6 .. .. .. .. B0 .. .. .. .. B3 B4 B6 B0 .. .. 14
.. B6 .. .. .. .. B0 .. .. .. .. B3 B7 B5 C4 .. .. 15
.. B6 .. .. .. .. B0 .. .. .. .. B3 C1 B5 C1 .. .. 16
.. B6 .. .. .. .. B0 .. .. .. .. B3 C4 B5 B7 .. .. 17
.. B6 .. .. .. .. B0 .. .. .. .. B3 C6 B5 B5 .. .. 18
.. B6 .. .. .. .. B0 .. .. .. .. B4 B2 B5 B2 .. .. 19
.. B6 .. .. .. .. B0 .. .. .. .. B4 B5 B4 C6 .. .. 20
.. B6 .. .. .. .. B0 .. .. .. .. B4 B8 B4 C3 .. .. 21
.. B6 .. .. .. .. B0 .. .. .. .. B4 C2 B4 B9 .. .. 22


If you break up the values into two 2-byte values ... you get one that always grows to get from B0 C6 and ends at C7 C7 and a second value that starts at B8 B5 and ends at B1 C3 note how the bytes are always in the B or C range and rarely end up in values higher than C6 or lower than B0... there is also no BA or really anything past B9 ...

Maybe we're overthinking this ... how many resistance magnets (or outputs) are there on the board? Also ... my version of the bike has two gear switches on the handle bars vs one resistance setting in the panel, what does yours have? and theoretically they allowed me to change the "front" and "rear" gears of the bike ... maybe the math was done in the control panel, or maybe it gets sent as separate values to the board?

now it's my turn to sleep!
 

kilomotor

Joined Jan 17, 2022
13
On my bike, there are only 1 set of buttons to adjust gears (up or down) and 1 set to adjust incline (up or down). And only one set of magnets that are moved in and out by a servo motor. (There are buttons on the console and the handlebars, but they perform the same functions). There is no ability to change the big ring. I think the math for gear changes is set in the console. I'm starting to think the lower board is always the same and expects certain values to change incline and gear and doesn't care where they come from. And when I say "gear", it is really just resistance on the aluminum flywheel caused by moving the magnets further over or away. It seems there is redundancy built in with the ACK response. Maybe it is not needed? Or maybe it is useful to determine that the resistance or incline change has actually happened.
It turns out the cadence values transmitted by the lower board can be calculated from the 14th and 15th bytes. We only get certain values, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, C1, C2, C3, C4, C5, C6. 16 unique values in total. They directly correspond to the numbers 0 to 15. B0 = 0, B1 = 1,... B9 = 9, C1 = 10 (weird but bear with me), C2 = 11,... C6 =15 etc. Now, in a message like BAB5B1B0B3B0B2B0B1B0B2B0B0B3C4B6C18D8A we take B3 and C4. B3 = 3 and C4 = 13. The 14th byte is in 16s so our cadence would be 3*16+13=61. Bytes of B2 and C5 would be 2*16+14=46 or B6 and B4 would be 6*16+4=100. It actually works, everytime! So with this in mind, I am now off to write a quick sketch to display cadence from the values sent by the lower console and compare to the console output.

I realize I have an advantage in that my console actually still works, so if there is anything in the protocol that I haven't explained, please ask.
 

dgrekov

Joined Jan 8, 2023
15
This is great research, and after we’re done with the research, I’ll get coding a bigger sketch where we can expose the details via BLE or something similar to integrate into zwift and other standardized trainers. With that being said, here is something interesting.
I’ve taken apart my console, since it doesn’t work and confirmed some things:

7530C263-AF9B-4DAD-BE75-51BE61BAF326.jpeg
Here is where the lower board header connects, I think the labels are pretty obvious where :)

also, I’ve traced where my handlebar switches connected and found this header here where clearly the handle bar switches are just dumb buttons without much brains… and they can probably be used to control the gears here as well…
8F23075A-5093-45BF-AD9B-59D74EA6E420.jpeg
 

dgrekov

Joined Jan 8, 2023
15
OK, looking at the numbers, just booting we see:

B0 B0 C1 B7 .. .. 0 0 10 7 so that is Cadence Value 0 : ??? Value 167

When pedaling we see:
B3 C4 B6 C1 .. .. 3 13 6 10 ----- Cadence - 61 : ??? - 106
B3 C3 B6 C2 .. .. 3 12 6 11 ----- Cadence - 60 : ??? - 107


question is ... can you try pedaling at the same cadences with different resistance? Also, are you able to see the "watts" reading? In my bike's manual it's mentioned as

Each training bike is individually calibrated to measure your power output and allow you to monitor your watts and pedaling cadence directly on the console.
By monitoring your watts and pedaling cadence, you can see how hard you are training and make sure that you are challenging yourself and improving.
so maybe the second value is either a calculation of watts (which is weird that it's shrinking the harder you pedal) or the "apparent resistance" so that wats can be calculated

Power = Torque x Cadence ... so it might be some measure of torque?
 

kilomotor

Joined Jan 17, 2022
13
I rode the bike at the same cadence and different gear levels. Bytes 16 and 17 didn't change going from gear 0 to gear 26. Are they just redundant bytes for error correction? Or maybe a hangover from a previous protocol directly driving an LCD display... At cadence of 63, bytes 16-17 are 0xB6, 0xB9. Watts go from about 25w (gear1) to 165w (gear 26) at a cadence of 63 but bytes 16-17 didn't change.

I think watts calculation is done internally by the console. I would suspect that the calibration would be done by setting the resistance magnets at a certain position for gear 1 and extrapolating the rest. Maybe they do it with a power meter at the factory to account for variations in bikes. Or maybe they do a spindown calculation of the flywheel. Or maybe they wing it! If you read about Wahoo or Tacx trainers and their power calculations, the engineering and instrumentation are intense... it is not for the faint of heart! My bike manual makes no mention of being calibrated for watts and I can say just from experience that it is probably almost accurate for certain gears and wildly off for many others.
 

kilomotor

Joined Jan 17, 2022
13
I injected some cadences values into the console to determine power at different cadences and gears. Incline was set at zero. I was interested to find that speed doesn't change with weight (it is possible to set the weight of the rider on my console). Also, speed is capped at 39.9miles/hr (after that it rolls over to 0) and this seems to happen at about 300watts of power. And watts for cadence of 100 and 120 are the same? I will check this again tomorrow. Of course, I have a simple, basic console, who knows what the other bikes calculated for watts?
Here is a table of the results. The numbers below the cadence values are watts. I think there is an equation that describes the power calculation but it is too late to think about that. I think (intuitively) the high and low ends are a bit off, but, well who knows?

GearCad 20Cad 40Cad 60Cad 80Cad 100Cad 120
181324385454
591429456262
10121939638989
1517285892131131
20264387138195195
253966132209293293
264372143225315315
 
Last edited:

dgrekov

Joined Jan 8, 2023
15
So I was looking at the cadence and resistance values again ... and I will check but I bet it will be true for the angle ... but the two numbers always add up to roughly the same amount ... case in point if you sum up both numbers in the resistance message that's send you get 148 or 149 ... always ... as the first number goes up, the second goes down. Looks like the same for cadence, always seems to total 167 ... need to check the incline ... but the short version seems to be that maybe it's a checksum or some kind?

On a different note, can you send me pictures of your connectors from the handles? how many wheres come from there and what kind?

Also do you know what is the formal name of that red connector cable that comes from the board below?
 

kilomotor

Joined Jan 17, 2022
13
Annotated console board. The gear and incline controls have three wires, one per button and a common ground. There is a ribbon cable going to the buttons on the front of the console -- incline and gears can also be controlled from there.

I don't know what the 4 pin red connector is called... It looks like a JST SM style connector, but I bet it would be hard to find an exact match, even if you spent the next week searching Digikey!
20230122_102452.jpg
 

kilomotor

Joined Jan 17, 2022
13
I've recently used a Seeed XIAO ESP32-C3 board to transmit value of instantaneous cadence and instantaneous power via Bluetooth Low Energy (BLE). The ESP will also receive values for incline and adjust the resistance level accordingly to simulate riding up or down hills. I've been using it successfully to connect and ride in Zwift. I've uploaded some code and a schematic to Github, maybe that helps someone.
https://github.com/kevinmott09/proformBLE

The BLE code was reused from a project by Gene's Green Machine. His Zwift connected exercise bike instructable:
https://www.instructables.com/Zwift-Capable-Pedal-Generator/. Great projects, I adapted the code to fit the Proform situation.

I disconnected the console from the lower control board to add the ESP. So the console no longer displays power, gears, time, etc.

In my version, the ESP takes input from 4 buttons allowing a the ride to change gears - the bike simulates shifting (by changing resistance). I've programmed 3 front gear ranges and 11 rear ranges. The buttons shift the front rings up or down and the rear cassette up or down. The ESP also gets incline values from Zwift and converts them to resistance settings. The bike seems to have about 128 resistance settings. Zwift goes from 0 to 15 degrees incline so initially I had 8 steps of resistance per degree of incline - -this was absolutely BRUTAL so I dialed it back to 4 steps per degree.

The ESP will also take the Zwift incline and set the tilt of the bike based on the Zwift numbers. The incline changes often so I found the clunking of the tilt annoying and disabled it in my current running code (it is still enabled in the Git code).

There are definite bugs in the code - click too fast on the gear buttons and you will lock your power and cadence output. Sometimes it doesn't display power when connected and requires a new connection. There is a weird boost (or loss) in power when shifting gears. A work in progress, but I hope to tackle the issues soon. Power numbers match the bike numbers more or less in the cadence range of 60 to 100 and vary more beyond these ranges.

I've been putting some more detail up on a (disused) blog I have had for a while. I intend to try to verify the power numbers in the future to calibrate the bike a bit better.

https://kevinathome.blogspot.com/

Cheers all,
K
 
Last edited:

dgrekov

Joined Jan 8, 2023
15
Oh man, you got it up there ahead of me... I'm working on an alternative software also on an ESP32-S3 with a screen. Once I have it ready and tested, I'll share the link as well and we can compare notes!

Got busy at work recently so did not have enough time. Awesome progress!!!!
 

cronert

Joined May 6, 2023
4
Great to see some good work on this.
I did a little research a number of years ago and have a small bit of info which may help.
I recognised the the communications to be a variation of "Modbus" although pro-form do not stick to the Modbus rules.
https://ozeki.hu/p_5855-modbus-ascii.html
The data is essentially 7 bit ASCII Hex, each command from the console starting with a colon ":" and ending with a CRC, the reply is similar.
Here are some of my findings..
angle :41 06 0001 0030 88 (Modbus write Single Holding Register)
resistance :61 06 0005 0050 44 (Modbus write Single Holding Register)
cadance :51 03 0003 0000 A9 answer... :51 03 04 01030000 A4 (Modbus Read Multiple Holding Registers)
wheel rpm? :61 03 0006 0000 96 answer... :61 03 04 0106001C 75
power? :51 03 0002 0000 AA answer... :51 03 04 01020001 A4
 

dgrekov

Joined Jan 8, 2023
15
OMG, this blew my mind right open and clarified so many things for me ... that's why the numbers never added up and the bytes looked weird. Since it's 7bit ASCII HEX and since it's Modbus, we can now make more generic rules. Basically if you lop off the 8th bit from each frame, then convert that to ASCII and then parse that as numbers, you get something consistent:

So taking apart a few requests and responses we get this:

CommandDeviceCommand
(06 = write, 03 = read)
Register AddressValueCheck valueValue + Check Value
(not sent)
Set inline to 2941 (Incline)060006001D (29)9B (155)184
Get Cadence51 (Sensor)0300020000AA (170)170
Set Resistance to 11961 (Wheel)0600050077 (119)1D (29)148

For Cadence réponse, the frame seems to look like this:
CommandDeviceCommand
(06 = write, 03 = read)
Number of valuesValueValueCheck ValueValue + Check Value
(not sent)

cadence response51 (sensor)03020102003D (61)6A (106)167
cadence response51 (sensor)030201020000 (0)A7 (167)167
rpm response?61 (wheel)03040106001C (28)75 (117)145
power response?51 (sensor)030401020001 (1)A4 (164)165

Will keep exploring, but it does open up some more possibilities to look out for.
 
Last edited:

cronert

Joined May 6, 2023
4
I'm happy my tinkering is of some use.
I have a TDF model PFEVEX71916.1
I also purchased a used TDF PFEX014180.0 console which does not work with the controller on my original model.
Of course the console could be faulty!, but I have verified the rx data does get to the pin of the cpu.
And the requests from the console are compatible with my original model (resistance/incline works fine), the data response is having no effect at the console.
I was thinking of brute forcing the data response to the console and see if the console reacts in any way!?.
The idea was to then do a "man in the middle" translator for rpm, cadence and power using a PIC micro (assembly language).
 

dgrekov

Joined Jan 8, 2023
15
I'm happy my tinkering is of some use.
I have a TDF model PFEVEX71916.1
I also purchased a used TDF PFEX014180.0 console which does not work with the controller on my original model.
Of course the console could be faulty!, but I have verified the rx data does get to the pin of the cpu.
And the requests from the console are compatible with my original model (resistance/incline works fine), the data response is having no effect at the console.
I was thinking of brute forcing the data response to the console and see if the console reacts in any way!?.
The idea was to then do a "man in the middle" translator for rpm, cadence and power using a PIC micro (assembly language).
For sure man, you can also use something like an ESP32 as it has multiple hardware serial interfaces and pretend to be a console in one direction and a bike in the other...
 

kilomotor

Joined Jan 17, 2022
13
Great to see some good work on this.
I did a little research a number of years ago and have a small bit of info which may help.
I recognised the the communications to be a variation of "Modbus" although pro-form do not stick to the Modbus rules.
https://ozeki.hu/p_5855-modbus-ascii.html
The data is essentially 7 bit ASCII Hex, each command from the console starting with a colon ":" and ending with a CRC, the reply is similar.
Here are some of my findings..
angle :41 06 0001 0030 88 (Modbus write Single Holding Register)
resistance :61 06 0005 0050 44 (Modbus write Single Holding Register)
cadance :51 03 0003 0000 A9 answer... :51 03 04 01030000 A4 (Modbus Read Multiple Holding Registers)
wheel rpm? :61 03 0006 0000 96 answer... :61 03 04 0106001C 75
power? :51 03 0002 0000 AA answer... :51 03 04 01020001 A4
The Modbus info is very cool. Nice work! I need to look again at my RX/TX values to see what the numbers are when they are 7 bits.

The "man in the middle" is a great idea to retain the console buttons/display and also send out a BLE signal if so desired.

I don't think my simple bike transmits power or wheel rpm -- just cadence. There is only the cadence reed switch on my bike measuring cadence. Do different bikes transmit more values? I assumed they were all the same and only transmitted cadence from the lower board but maybe the more sophisticated bikes actually can measure power.
 
Top