{
  "title": "ZBike Infinity Bluetooth test vectors",
  "applies_to": "ZBike Infinity, firmware 1.39 and later",
  "source": "ZBike Infinity Bluetooth Integration Guide, 1.0 web edition (help.zycle.eu)",
  "byte_order": "FTMS and Cycling Power: little-endian. Zycle service: big-endian (except the ERG target in Information).",
  "hex_format": "Space-separated octets in transmission order.",
  "vectors": [
    {
      "id": "ftms_feature",
      "service": "Fitness Machine (0x1826)",
      "characteristic": "Fitness Machine Feature",
      "uuid": "0x2ACC",
      "direction": "read",
      "hex": "86 50 00 00 0C 20 00 00",
      "length": 8,
      "decoded": {
        "fitness_machine_features": "0x00005086",
        "fitness_machine_feature_bits": [
          1,
          2,
          7,
          12,
          14
        ],
        "target_setting_features": "0x0000200C",
        "target_setting_feature_bits": [
          2,
          3,
          13
        ]
      }
    },
    {
      "id": "ftms_resistance_range",
      "service": "Fitness Machine (0x1826)",
      "characteristic": "Supported Resistance Level Range",
      "uuid": "0x2AD6",
      "direction": "read",
      "hex": "00 00 C8 00 01 00",
      "length": 6,
      "decoded": {
        "minimum": 0,
        "maximum": 200,
        "increment": 1
      },
      "note": "Plain integers. Do not apply the FTMS 0.1 resolution."
    },
    {
      "id": "ftms_power_range",
      "service": "Fitness Machine (0x1826)",
      "characteristic": "Supported Power Range",
      "uuid": "0x2AD8",
      "direction": "read",
      "hex": "00 00 A0 0F 01 00",
      "length": 6,
      "decoded": {
        "minimum": 0,
        "maximum": 4000,
        "increment": 1
      }
    },
    {
      "id": "ftms_indoor_bike_data",
      "service": "Fitness Machine (0x1826)",
      "characteristic": "Indoor Bike Data",
      "uuid": "0x2AD2",
      "direction": "notification",
      "hex": "74 08 A8 0C B4 00 95 40 00 54 00 FA 00 2D 07",
      "length": 15,
      "decoded": {
        "flags": "0x0874",
        "speed_kmh": 32.4,
        "cadence_rpm": 90.0,
        "total_distance_m": 16533,
        "resistance_level": 84,
        "power_w": 250,
        "elapsed_time_s": 1837
      }
    },
    {
      "id": "cp_request_control_write",
      "service": "Fitness Machine (0x1826)",
      "characteristic": "Fitness Machine Control Point",
      "uuid": "0x2AD9",
      "direction": "write",
      "hex": "00",
      "length": 1,
      "decoded": {
        "op_code": "0x00",
        "procedure": "Request Control"
      }
    },
    {
      "id": "cp_request_control_indication",
      "service": "Fitness Machine (0x1826)",
      "characteristic": "Fitness Machine Control Point",
      "uuid": "0x2AD9",
      "direction": "indication",
      "hex": "80 00 01",
      "length": 3,
      "decoded": {
        "request_op_code": "0x00",
        "result": "0x01 Success"
      }
    },
    {
      "id": "cp_set_resistance_write",
      "service": "Fitness Machine (0x1826)",
      "characteristic": "Fitness Machine Control Point",
      "uuid": "0x2AD9",
      "direction": "write",
      "hex": "04 96",
      "length": 2,
      "decoded": {
        "op_code": "0x04",
        "procedure": "Set Target Resistance Level",
        "resistance_level": 150
      }
    },
    {
      "id": "cp_set_resistance_indication",
      "service": "Fitness Machine (0x1826)",
      "characteristic": "Fitness Machine Control Point",
      "uuid": "0x2AD9",
      "direction": "indication",
      "hex": "80 04 01",
      "length": 3,
      "decoded": {
        "request_op_code": "0x04",
        "result": "0x01 Success"
      }
    },
    {
      "id": "cp_set_power_write",
      "service": "Fitness Machine (0x1826)",
      "characteristic": "Fitness Machine Control Point",
      "uuid": "0x2AD9",
      "direction": "write",
      "hex": "05 2C 01",
      "length": 3,
      "decoded": {
        "op_code": "0x05",
        "procedure": "Set Target Power",
        "target_power_w": 300
      }
    },
    {
      "id": "cp_set_power_indication",
      "service": "Fitness Machine (0x1826)",
      "characteristic": "Fitness Machine Control Point",
      "uuid": "0x2AD9",
      "direction": "indication",
      "hex": "80 05 01",
      "length": 3,
      "decoded": {
        "request_op_code": "0x05",
        "result": "0x01 Success"
      }
    },
    {
      "id": "cp_set_simulation_write",
      "service": "Fitness Machine (0x1826)",
      "characteristic": "Fitness Machine Control Point",
      "uuid": "0x2AD9",
      "direction": "write",
      "hex": "11 00 00 2C 01 33 33",
      "length": 7,
      "decoded": {
        "op_code": "0x11",
        "procedure": "Set Indoor Bike Simulation Parameters",
        "wind_speed_mps": 0.0,
        "grade_percent": 3.0,
        "crr": 0.0051,
        "cw_kg_per_m": 0.51
      }
    },
    {
      "id": "cp_set_simulation_indication",
      "service": "Fitness Machine (0x1826)",
      "characteristic": "Fitness Machine Control Point",
      "uuid": "0x2AD9",
      "direction": "indication",
      "hex": "80 11 01",
      "length": 3,
      "decoded": {
        "request_op_code": "0x11",
        "result": "0x01 Success"
      }
    },
    {
      "id": "cp_unimplemented_write",
      "service": "Fitness Machine (0x1826)",
      "characteristic": "Fitness Machine Control Point",
      "uuid": "0x2AD9",
      "direction": "write",
      "hex": "07",
      "length": 1,
      "decoded": {
        "op_code": "0x07",
        "procedure": "Start or Resume (not implemented)"
      }
    },
    {
      "id": "cp_op_code_not_supported_indication",
      "service": "Fitness Machine (0x1826)",
      "characteristic": "Fitness Machine Control Point",
      "uuid": "0x2AD9",
      "direction": "indication",
      "hex": "80 07 02",
      "length": 3,
      "decoded": {
        "request_op_code": "0x07",
        "result": "0x02 Op Code not supported"
      }
    },
    {
      "id": "cp_control_not_permitted_indication",
      "service": "Fitness Machine (0x1826)",
      "characteristic": "Fitness Machine Control Point",
      "uuid": "0x2AD9",
      "direction": "indication",
      "hex": "80 05 05",
      "length": 3,
      "decoded": {
        "request_op_code": "0x05",
        "result": "0x05 Control not permitted"
      }
    },
    {
      "id": "cp_set_simulation_descent_write",
      "service": "Fitness Machine (0x1826)",
      "characteristic": "Fitness Machine Control Point",
      "uuid": "0x2AD9",
      "direction": "write",
      "hex": "11 00 00 D4 FE 33 33",
      "length": 7,
      "decoded": {
        "op_code": "0x11",
        "procedure": "Set Indoor Bike Simulation Parameters",
        "wind_speed_mps": 0.0,
        "grade_percent": -3.0,
        "crr": 0.0051,
        "cw_kg_per_m": 0.51
      }
    },
    {
      "id": "status_target_resistance_changed",
      "service": "Fitness Machine (0x1826)",
      "characteristic": "Fitness Machine Status",
      "uuid": "0x2ADA",
      "direction": "notification",
      "hex": "07 96",
      "length": 2,
      "decoded": {
        "op_code": "0x07",
        "resistance_level": 150
      }
    },
    {
      "id": "status_target_power_changed",
      "service": "Fitness Machine (0x1826)",
      "characteristic": "Fitness Machine Status",
      "uuid": "0x2ADA",
      "direction": "notification",
      "hex": "08 2C 01",
      "length": 3,
      "decoded": {
        "op_code": "0x08",
        "target_power_w": 300
      }
    },
    {
      "id": "status_simulation_changed",
      "service": "Fitness Machine (0x1826)",
      "characteristic": "Fitness Machine Status",
      "uuid": "0x2ADA",
      "direction": "notification",
      "hex": "12 00 00 2C 01 33 33",
      "length": 7,
      "decoded": {
        "op_code": "0x12",
        "wind_speed_mps": 0.0,
        "grade_percent": 3.0,
        "crr": 0.0051,
        "cw_kg_per_m": 0.51
      }
    },
    {
      "id": "cps_feature",
      "service": "Cycling Power (0x1818)",
      "characteristic": "Cycling Power Feature",
      "uuid": "0x2A65",
      "direction": "read",
      "hex": "0C 00 00 00",
      "length": 4,
      "decoded": {
        "features": "0x0000000C",
        "feature_bits": [
          2,
          3
        ]
      }
    },
    {
      "id": "cps_measurement_1",
      "service": "Cycling Power (0x1818)",
      "characteristic": "Cycling Power Measurement",
      "uuid": "0x2A63",
      "direction": "notification",
      "hex": "30 00 FA 00 DB 60 00 00 00 68 C3 0A 00 B4",
      "length": 14,
      "decoded": {
        "flags": "0x0030",
        "power_w": 250,
        "cumulative_wheel_revolutions": 24795,
        "last_wheel_event_time": 26624,
        "cumulative_crank_revolutions": 2755,
        "last_crank_event_time": 46080
      }
    },
    {
      "id": "cps_measurement_2",
      "service": "Cycling Power (0x1818)",
      "characteristic": "Cycling Power Measurement",
      "uuid": "0x2A63",
      "direction": "notification",
      "hex": "30 00 FA 00 F6 60 00 00 00 78 C6 0A 00 BC",
      "length": 14,
      "decoded": {
        "flags": "0x0030",
        "power_w": 250,
        "cumulative_wheel_revolutions": 24822,
        "last_wheel_event_time": 30720,
        "cumulative_crank_revolutions": 2758,
        "last_crank_event_time": 48128
      },
      "note": "Two seconds after cps_measurement_1. Cadence from the pair: 3 revolutions in 2048/1024 s = 90.0 rpm."
    },
    {
      "id": "zycle_information_simulation",
      "service": "Zycle (db6dba4b-a18d-44ae-90f1-38d01dec8f51)",
      "characteristic": "Information",
      "uuid": "db6d0001-a18d-44ae-90f1-38d01dec8f51",
      "direction": "notification",
      "hex": "00 FA 00 5A 00 12 D6 87 04 01 08 02 00 02 DE",
      "length": 15,
      "decoded": {
        "power_w": 250,
        "cadence_rpm": 90,
        "odometer_m": 1234567,
        "bike_mode": 4,
        "parameter1": 1,
        "parameter2": 8,
        "balance_left_percent": 51.2,
        "smoothness_percent": 73.4,
        "chainring_index": 1,
        "sprocket_index": 8
      },
      "note": "Big-endian, except the ERG target (parameter 1 = low octet)."
    },
    {
      "id": "zycle_information_power",
      "service": "Zycle (db6dba4b-a18d-44ae-90f1-38d01dec8f51)",
      "characteristic": "Information",
      "uuid": "db6d0001-a18d-44ae-90f1-38d01dec8f51",
      "direction": "notification",
      "hex": "00 FA 00 5A 00 12 D6 87 02 2C 01 02 00 02 DE",
      "length": 15,
      "decoded": {
        "power_w": 250,
        "cadence_rpm": 90,
        "odometer_m": 1234567,
        "bike_mode": 2,
        "parameter1": 44,
        "parameter2": 1,
        "balance_left_percent": 51.2,
        "smoothness_percent": 73.4,
        "target_power_w": 300
      },
      "note": "Big-endian, except the ERG target (parameter 1 = low octet)."
    },
    {
      "id": "zycle_information_basic",
      "service": "Zycle (db6dba4b-a18d-44ae-90f1-38d01dec8f51)",
      "characteristic": "Information",
      "uuid": "db6d0001-a18d-44ae-90f1-38d01dec8f51",
      "direction": "notification",
      "hex": "00 FA 00 5A 00 12 D6 87 01 54 00 02 00 02 DE",
      "length": 15,
      "decoded": {
        "power_w": 250,
        "cadence_rpm": 90,
        "odometer_m": 1234567,
        "bike_mode": 1,
        "parameter1": 84,
        "parameter2": 0,
        "balance_left_percent": 51.2,
        "smoothness_percent": 73.4,
        "resistance_level": 84
      },
      "note": "Big-endian, except the ERG target (parameter 1 = low octet)."
    },
    {
      "id": "zycle_command_version_write",
      "service": "Zycle (db6dba4b-a18d-44ae-90f1-38d01dec8f51)",
      "characteristic": "Command",
      "uuid": "db6d0005-a18d-44ae-90f1-38d01dec8f51",
      "direction": "write (without response)",
      "hex": "00 01",
      "length": 2,
      "decoded": {
        "command": "0x0001 Version"
      }
    },
    {
      "id": "zycle_command_version_notification",
      "service": "Zycle (db6dba4b-a18d-44ae-90f1-38d01dec8f51)",
      "characteristic": "Command",
      "uuid": "db6d0005-a18d-44ae-90f1-38d01dec8f51",
      "direction": "notification",
      "hex": "01 27 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
      "length": 28,
      "decoded": {
        "firmware_major": 1,
        "firmware_minor": 39,
        "firmware": "1.39"
      }
    }
  ]
}