Serial Communication Take 2

Official FreeEMS vanilla firmware development, the heart and soul of the system!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Serial Communication Take 2

Post by Fred »

There are two header bit flags for acks.

One says "I'm present" and the other "I'm positive or negative", then there is the ack field itself.

If you used 125 last time you sent a request with ack, send 126 this time and you should get 126 back in your reply.

The serial docs are a little out of date, but this thread indicates my intention and what I coded tonight echoes that.

You'll receive a copy in the mail a little later, hopefully that will clear it up. I'll update the docs on the train tomorrow.

Fred.
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
sry_not4sale
LQFP144 - On Top Of The Game
Posts: 568
Joined: Mon Mar 31, 2008 12:47 am
Location: New Zealand, land of the long white burnout
Contact:

Re: Serial Communication Take 2

Post by sry_not4sale »

Cool, I figured that - the doc just seemed confusing
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Serial Communication Take 2

Post by Fred »

If you can reword it, go ahead :-)
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
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Serial Communication Take 2

Post by Fred »

She Lives! :

Sent :

Code: Select all

0xAA, 0x01, 0x00, 0x00, 0x01, 0xCC
translation :

Code: Select all

start, flags(is protocol packet), payload ID = 0x0000 (0), checksum, stop
Received :

Code: Select all

\0xaa\0x11\0x00\0x01\0x00\0x14\0x00\0x00\0x11IFreeEMS Vanilla\0x00\0xce\0xcc
translation :

Code: Select all

start, flags (is protocol packet, has length field), payload ID = 0x0001 (1), length = 0x0014 (20), payload = 0.0.17 "IFreeEMS Vanilla" null byte, checksum, stop
Sweet :-)

Fred.
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
BenFenner
LQFP144 - On Top Of The Game
Posts: 360
Joined: Wed Jul 09, 2008 3:15 pm

Re: Serial Communication Take 2

Post by BenFenner »

And there was much rejoicing.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Serial Communication Take 2

Post by Fred »

LOL, wel, lets be honest, there wasn't much at all really ;-)

It does much more than just that now, but even though I didn't experience any, I know it's buggy... I've got a bit of work to do before I call it done but its pretty close ;-)
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
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Serial Communication Take 2

Post by Fred »

Obligatory screen shot :

Image

Re worked and highly changed serial code finally works and works well.

It needs some polishing and it needs much testing (that's where you lot come in) but it's pretty much there!

Fred.
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
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Serial Communication Take 2

Post by Fred »

https://sourceforge.net/project/showfil ... _id=639615

Core docs are here ^

Version specific are now with the firmware only.

Fred.
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
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Serial Communication Take 2

Post by Fred »

I need to re-read this and update it, for now, bumping as a reminder. Many serial changes have been made, all good. There is still multip interface stuff to do, but it's unimportant right now. Most of the functionality we have now will remain as it is. The documents are up to date, see docs/ and docs/interface for more info on what is currently implemented. If you find some behaviour that isn't documented then please file a bug report, either the docs or code will be fixed, or you will be proved wrong.

EDIT: Wow, it was old...

Fred.
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
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Serial Communication Take 2

Post by Fred »

Some more proposed changes to the protocol and discussion around that are available here: http://issues.freeems.org/view.php?id=355
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