FreeEMS Serial Protocol

FreeEMS topics that aren't specific to hardware development or firmware development.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: FreeEMS Serial Protocol

Post by Fred »

malcom2073 wrote:As per a document I'm assuming Fred already sent you (If he did not, ask and I'll see if I can find it again)
Yes, this is the first thing I did, and asked him not to share on the forum as they're out of date and should not become a defacto standard. This is one of the things he meant by secrecy above.
Now that you have the packet read, you should de-escape the bytes. Once again that is documented in the protocol document which bytes mean what. Once all that wonderful magic is finished, you now have a complete datalog packet.
I sincerely hope that you do NOT do it like this!!!! Reading guts out of the packet before deescaping and checksumming is completely flawed! The packet must be received, deescaped, and checksummed IN THAT ORDER. ONLY then can the header be read and the contents interpreted appropriately.
The datalog packet format <SNIP> but be advised, this is subject to change as the datalog format will in the future be configurable.
The datalog packet format <SNIP> but be advised, this is subject to change as the datalog format has been configurable for more than two years.
Fixed! I've used it several times over that period when I've needed specific data at a higher frequency. You just have to change your external tooling to suit. Laborious, but only a little.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
malcom2073
LQFP112 - Up with the play
Posts: 211
Joined: Tue May 01, 2012 4:17 pm
Location: Shrewsbury PA
Contact:

Re: FreeEMS Serial Protocol

Post by malcom2073 »

Fred wrote:I sincerely hope that you do NOT do it like this!!!! Reading guts out of the packet before deescaping and checksumming is completely flawed! The packet must be received, deescaped, and checksummed IN THAT ORDER. ONLY then can the header be read and the contents interpreted appropriately.
Of course, I misspoke. You don't touch the header bytes until after you escape the whole thing and verify the checksum.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: FreeEMS Serial Protocol

Post by Fred »

Image
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
wilbertcr
DIP8 - Involved
Posts: 16
Joined: Tue Jul 08, 2014 7:44 pm

Re: FreeEMS Serial Protocol

Post by wilbertcr »

Thank you so much malcom2073.

Wilbert
User avatar
russian
LQFP112 - Up with the play
Posts: 154
Joined: Fri Feb 01, 2013 4:18 pm
Location: Jersey City, USA

Re: FreeEMS Serial Protocol

Post by russian »

Fred wrote:
malcom2073 wrote:As per a document I'm assuming Fred already sent you (If he did not, ask and I'll see if I can find it again)
Yes, this is the first thing I did, and asked him not to share on the forum as they're out of date and should not become a defacto standard. This is one of the things he meant by secrecy above.
I know it has been a while, I wonder if a more current version of protocol documentation is available anywhere? I would assume even an outdated document would be much better than nothing?
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: FreeEMS Serial Protocol

Post by Fred »

Poor assumption.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
russian
LQFP112 - Up with the play
Posts: 154
Joined: Fri Feb 01, 2013 4:18 pm
Location: Jersey City, USA

Re: FreeEMS Serial Protocol

Post by russian »

Fred wrote:Poor assumption.
No worries, I can always take the longer route. Thank you for help!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: FreeEMS Serial Protocol

Post by Fred »

You're welcome. You need all the help you can get. :-)
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
Post Reply