KICKR Virtual Bike Service - StephenDone/kickr_bluetooth GitHub Wiki
The KICKR Virtual Bike Service is an entirely custom service from Wahoo. It controls the groupset configuration. It also reads the current virtual gear, as well as all 12 buttons on the shifters.
There are three custom characteristics within the service:
a026ee0d-0a7d-4ab3-97fa-f1500f9feb8b KICKR Virtual Bike
a026e039-0a7d-4ab3-97fa-f1500f9feb8b ['write-without-response', 'notify'] KICKR Groupset
a026e03a-0a7d-4ab3-97fa-f1500f9feb8b ['notify'] KICKR Chosen Gear
a026e03c-0a7d-4ab3-97fa-f1500f9feb8b ['notify'] KICKR Buttons
a026e039-0a7d-4ab3-97fa-f1500f9feb8b ['write-without-response', 'notify']
This characteristic configures the virtual groupset. Options include Di2/etap, number of chainrings and tooth count, cassette size and tooth count, left/right to front/rear brake configuration.
Command | Data | Notes |
---|---|---|
02 83 00 |
XX YY ZZ |
Di2 / Mechanical |
02 83 01 |
XX YY ZZ |
Di2 Synchro |
02 83 02 |
XX YY ZZ |
SRAM eTap |
02 83 03 |
XX YY ZZ |
SRAM Mechanical |
02 83 04 |
XX YY ZZ |
Campagnolo |
XX YY ZZ
are the chainring tooth counts.
If there is a single chainring, then the values are XX 00 00
.
If there are two chainrings, then the values are XX YY 00
.
I.E. The command must always be 6 bytes. If there are fewer than 3 chainrings, then the command is padded with 0x00 bytes.
Command / Data | Notes |
---|---|
02 83 00 22 32 00 |
2x 34/50 Di2 or mechanical |
02 83 01 22 32 00 |
2x 34/50 Di2 Synchro |
02 83 02 16 27 00 |
2x 22/39 SRAM eTap |
02 83 03 22 32 00 |
2x 34/50 SRAM Mechanical |
02 83 04 22 32 00 |
2x 34/50 Campagnolo |
02 83 04 2a 00 00 |
1x 42 Campagnolo |
02 83 04 1e 27 32 |
3x 30/39/50 Campagnolo - a triple |
Writing the following chainring configuration...
02 83 02 16 27 00
22/39 SRAM eTap
...yields the following two notifications as a response...
fe 02 01 83 02 16 27 00
fd 02 00 ff ff
The cassette configuration can contain up to 13 gears. If the desired configuration has less than 13 gears, the remaining fields must be filled with zeroes, to pad the write out to the same length.
Command | Data | Notes |
---|---|---|
02 84 |
AA BB CC DD EE FF GG HH II JJ KK LL MM |
AA to MM are the gears |
Examples | ||
02 84 |
17 16 15 14 13 12 11 10 0f 0e 0d 0c 0b |
A 23-11, 13-speed cassette |
02 84 |
1b 18 15 13 11 0f 0e 0d 0c 00 00 00 00 |
A 27-12, 9-speed cassette |
Operation | Command | Data |
---|---|---|
Write | 02 84 |
17 16 15 14 13 12 11 10 0f 0e 0d 0c 0b |
Notify | fe 02 01 84 |
17 16 15 14 13 12 11 10 0f 0e 0d 0c 0b |
Write | 02 84 |
1b 18 15 13 11 0f 0e 0d 0c 00 00 00 00 |
Notify | fe 02 01 84 |
1b 18 15 13 11 0f 0e 0d 0c 00 00 00 00 |
This just determines which lever brakes the front brake, and which brakes the rear.
Operation | Command/Data | Notes |
---|---|---|
Write | 02 00 |
Front Brake on Right |
Notify | fe 02 01 00 |
|
Write | 02 80 |
Front Brake on Left |
Notify | fe 02 01 80 |
Send 03
Recv fe 03 01 00 01 ff
a026e03a-0a7d-4ab3-97fa-f1500f9feb8b ['notify']
This characteristic reads the current virtual gear selected by the rider.
The notifications take the following forms:
- Notifications at regular intervals. These are 11 bytes long and provide the count and index of chainring and cassette in each notification.
- Notifications in response to shift events. These are 6 bytes long and provide the same data as the interval notifications, just without 5 bytes of padding.
- Groupset configuration change notifications. These are 4 bytes in length.
Data | Notes |
---|---|
07 00 00 02 02 0d 00 00 00 00 00 |
Regular Notification - Chainring 1/2, Cassette 3/13 |
07 00 |
Command |
00 |
Chainring Index - zero based, so (1) |
02 |
Cassette Index - zero based, so (3) |
02 |
Chainring Count (2) |
0d |
Cassette Size (13) |
00 00 00 00 00 |
Padding |
01 00 00 03 02 0d |
Event Notification - Chainring 1/2, Cassette 4/13 |
01 00 |
Command |
00 |
Chainring Index - zero based, so (1) |
03 |
Cassette Index - zero based, so (4) |
02 |
Chainring Count (2) |
0d |
Cassette Size (13) |
02 00 00 00 |
Groupset Config Change |
a026e03c-0a7d-4ab3-97fa-f1500f9feb8b ['notify']
This characteristic reads the shifter buttons.
The notifications take the following two forms:
- Notifications at regular intervals. These are 14 bytes long and provide the state of all 12 shifter buttons in each notification.
- Notifications in response to button events. These are 3 bytes long and provide the state of a single button to which the transition relates.
An example of this notification type is below. In these notifications, the position of the switch byte implicitly denotes the switch. The value of the byte specifies how many times the switch has been pushed and whether that switch is currently down or up. The most significant bit of each switch byte denotes the switch being depressed. The low order 7 bits are an incrementing roll counter - so if any notifications are missed, you can determine how many times the switch has been pressed since the last notification received, unless you miss more than 127 presses of a single button.
Data | Notes |
---|---|
FF 0F 02 07 05 03 02 29 00 03 03 01 00 0B |
Regular Notification - Chainring 1/2, Cassette 3/13 |
FF 0F |
Command |
02 |
Left Brake, pressed twice |
07 |
Left Top Front - Decline, pressed 7 times |
05 |
Left Top Back - Incline, pressed 5 times |
03 |
Left Shift Inner, pressed 3 times |
02 |
Left Shift Outer, pressed twice |
29 |
Left Steer, pressed 9 times |
00 |
Right Brake, pressed 0 times |
03 |
Right Top Back, pressed 3 times |
03 |
Right Top Front, pressed 3 times |
01 |
Right Shift Inner, pressed once |
00 |
Right Shift Outer, pressed 0 times |
0B |
Right Steer |
These are sent each time a button is pressed or released. In these notifications, the button is explicitly specified using (12 bits of) a 16-bit bitfield. Remember to re-order the bytes to form the bitfield. The index of the set bit in the bit field indicates which switch the event relates to. The order of the switches is as in the table above. The format of the single button state byte is as described for the interval notifications above.
Data | Notes |
---|---|
20 00 89 |
Button Event Notification - |
20 00 |
Little Endian 16-bit bitfield - single set bit identifies switch 20 00 -> 0x0020 -> bit 5 set -> 6th bit -> Left Steer |
89 |
Button State Byte MSB is Button Down flag -> Button is down Low order 7 bits are switch press count -> Switch pressed 9 times |