Skip to content

Feature Proposal: Enable the replaying of data recorded from a real Concept2 erg #3

@MoralCode

Description

@MoralCode

Copied from raralabs#26 due to abandoned repo:

while developing https://github.com/OpenRowingCommunity/OpenErgView, I have logged quite a lot of packet data from the multiplex endpoint of Concept2 ergs.

It is also somewhat tedious to have to go physically to an erg to perform most of the testing and i'd like to have a way to potentially automate it.

I've already started working on such a feature and have a proof-of-concept at https://github.com/MoralCode/pm5-emulator/tree/replay, however i'd be interested in getting feedback from the community on whether or not this is a useful addition and how to integrate it into the API/usage flow of this emulator so that it is useful.

How it works

I have created a file format for storing data received from the multiplex endpoint of the concept2 bluetooth specification. I have been saving these files with the extension .erg (because linux lets you do whatever and this seemed appropriate). These are text files containing one data packet per line. Each line contains a time delta and the packet data separated by a colon (:). The time delta value is an integer representing the number of milliseconds since the last packet was received in the previous line. The data value is a series of 40 hexadecimal characters representing the data received from the Erg. The first line in the file will have a time delta of 0 as there is no Previous line to compare it to. Time deltas throughout the rest of the file can vary between many hundreds of milliseconds and as low as 0 or 1. Here is an example of a line from this file: 112:3e0201f30300000000000000d82e001000000000

This file is currently saved as replaylog.erg in the top level directory of this repository. And when this file is detected, it will be replayed when a Bluetooth device connects to the emulated erg.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions