Skip to content

cansync: Sync two CAN logs of the same bus from different hosts #44

Description

@Notgnoshi

Goals:

  • Identify time synchronization offsets - how close are the system clocks?
    • How does this change if the socket is using hardware timestamps?
  • Identify dropped frames
    • These might be dropped by userspace (candump / candumpr itself) or by the kernel / transceiver?
  • Optional goal: Given a bunch of files from multiple devices, figure out which files overlap with each other (this isn't phrased well; I don't have a good idea of what this actually means in practice, nor do I have a concrete enough use-case to motivate it)

Challenges:

  • We're not guaranteed every frame in one log will be in another (error frames, dropped frames)
  • We're not guaranteed both log files start at or even near the same time (could range from a few seconds to a few hours)
  • The timestamps may range from thousands of years to a fraction of a second different
  • CAN traffic can tend to be cyclical, so finding two windows of two files that align doesn't necessarily mean that those are the same messages
  • The naive algorithm (find where two large windows are equal) is not performant

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tool ideaIdea for a new tool to process CAN data

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions