Skip to content

SR/F (and SR/S) Logs have a new format with no official decode examples #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
briantrice opened this issue Feb 21, 2020 · 10 comments
Open
Assignees

Comments

@briantrice
Copy link
Member

Zero has a new format for SR/F logs which only roughly matches the existing formats, so the parser will almost need to be written from scratch.

To be clear on one point: we have no copies of officially decoded logs to emulate. This is key to understanding the data embedded (though the basic record format and messages are recoverable).

It is encoded in a more clever way which is taking time to develop against. Assistance would be most appreciated.

@briantrice briantrice added the bug label Feb 21, 2020
@briantrice briantrice self-assigned this Feb 21, 2020
@briantrice briantrice changed the title SR/F Logs have a new format with no official decode examples SR/F (and SR/S) Logs have a new format with no official decode examples Feb 21, 2020
@hoegge
Copy link

hoegge commented Jan 13, 2022

Seems like the parser can partially understand the log from SR/S but not the time stand for example. I have looked at the code, and for an outsider it seems like to big a challenge to try to decode it. Can I help, if I can supply both binary and decoded examples for you?

@atomicdog
Copy link

A decoded file with the binary would be very helpful. Without a decoded file there is only a small amount of data that can be decoded from the binary and it's a very tedious process.

@briantrice
Copy link
Member Author

Thanks for the feedback. Yes, please provide decodes if at all possible. My Google ID is briantrice at gmail dot com and you may email me or use Google Drive to share confidential files.

My policy is to treat all submitted information as confidential, and if I add derived information to a test suite, I will ensure that you've given permission to use it, and I'll do my best to scrub personal or identifiable information (usually just VIN and perhaps configuration or ride details depending on context).

@briantrice
Copy link
Member Author

Pull requests, patches, source file suggestions, etc. are all welcome. I'll do my best to accept whatever seems valid and safe.

I will say that it's clear that the firmware on the bike produces the log events in a binary format, directly translated from internal binary state machines, as updated from binary CAN messages, and does not include a fully-featured log event printer, so Zero is being very jealous with interpretation of the motorcycle's operation.

Now, I am not a lawyer (IANAL), but I would argue that if an owner of this generation of Zero motorcycle had a dispute with Zero over the operation of the bike, Zero has decided to privilege their own corporate access over the interests of their owners. Owners have currently no way to dispute or even see Zero's interpretation of the bike's logs.

I believe that laws concerning Right to Repair have something to say about this, and I invite owners to look into this on their own for whatever legal jurisdiction they live in.

@atomicdog
Copy link

I got distracted by other projects, but I had started a fork where I'm rewritten the parser using Kaitai struct.

It looks like the serial console commands also display data that's at least close to the data' order in the logs.
For example, the charger info displayed looks to be in the same order as the log data.

@briantrice
Copy link
Member Author

That's a great idea. I would like you to contact me privately about your development process and lessons learned, if you please. My GitHub username at gmail is best.

@briantrice briantrice pinned this issue Jan 27, 2022
@briantrice
Copy link
Member Author

I've made a PR representing your changes. Input or requests welcome. I'll see whether I can test it soon.

@kscholty
Copy link

Hi, what's the status of this? Seems quite dead by now...
Is there any hope that we will get a parser for the new models? My DSR/X logs produce a lot of gibberish....

@atomicdog
Copy link

It's a 'tough nut to crack'. I work on it from time to time but the lack of progress gets frustrating, so I haven't tried recently.

@kscholty
Copy link

Yes, I can see that. If there is anything I can do to help, let me know.

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

No branches or pull requests

4 participants