Daum Ergo Bike Reverse Engineering Part 3

Posted on May 10, 2020. Tagged as:

The Daum Ergo Bike writes result records for each training to SD-Card directory data/result/ergo_bike. The data can be extracted with emc2edit.exe provided by Daum and converted to CSV.

The result file format was undocumented so far. After procmon revealed that the records are 44 Bytes long it’s not too hard to figure out the details by comparing the binary content with the CSV data:

result_file = GreedyRange(
    "result_record" / Struct(
        "elapsed_time"  / Int32ul,   # s
        "distance"      / Float32l,  # m
        "energy"        / Float32l,  # kJ
        "slope"         / Int16sl,   # 1/10 %
        "torque"        / Int16ul,   # 1/10 NM
        "rpm"           / Int16ul,   # 1/10 RPM
        "speed"         / Int16ul,   # 1/10 km/h
        "power"         / Int16ul,   # Watt
        "gear"          / Int8ul,
        "device_active" / Int8ul,    # 1
        "pulse"         / Int8ul,    # bpm
        "pulse_type"    / Int8ul,    # 7=invalid pulse, 0/4=valid pulse?
        "pulse_time_1"  / Int16ul,
        "pulse_time_2"  / Int16ul,
        "pulse_time_3"  / Int16ul,
        "pulse_time_4"  / Int16ul,
        "pulse_time_5"  / Int16ul,
        "pulse_time_6"  / Int16ul,
        "training_type" / Int16ul,
        "training_value"/ Float32l
))

I’ve written a simple python script that decodes the result records to CSV similar to the emc2edit output. It’s Available on Github.