Some background info:
In python we recieve from the serial port as a string.
The protocol module divides it up into a list (array in other languages) of 8bit bytes.
When printing a list, python converts it to a string like so... [byte, byte, byte, byte]
FreeEMS-Tuner Development Diary - Comments
- 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: FreeEMS-Tuner Development Diary - Comments
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
165hp @ 6psi standard - fastest production car in japan Oct 82
Re: FreeEMS-Tuner Development Diary - Comments
I guess the point here is that the protocol module should divide it up into what it is, not a list of bytes :-) But you know that...sry_not4sale wrote:In python we recieve from the serial port as a string.
The protocol module divides it up into a list (array in other languages) of 8bit bytes.
When printing a list, python converts it to a string like so... [byte, byte, byte, byte]
Diary entry time for me :-)
Might merge this thread for Ben tomorrow and maybe look at a hardware how to get it and help thread update too. At least 3 people are waiting on that thread to get up and running...
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!
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!
Re: FreeEMS-Tuner Development Diary - Comments
Aaron, when we spoke the other night, did you tell me that the stuff on acks and errors was wrong in the docs? If so, can you elaborate so I can fix it. I just had a look and the ack bit is not complete, but seems accurate. I've just added the following to the ack section :
1) Just send a stream of requests and as soon as its listening you will have on average 1/2 the time a request takes before oen starts being received by the EMS and max the whole time.'
2) Introduce a delay after sending the packet such that the EMS starts receiving it at just the right time.
I think 1 is the best choice as 2 complicates it for you and the chances of a real benefit from that approach are slim to none given the length of the request packets...
If the issue with the docs I mentioned above wasn't what you said the other night, please fill me in as to what was so I can rectify it.
Cheers,
Fred.
Thinking about the datalogging stuff, There are two strategies :When a packet is sent without the request for an ack reply, and an error occurs, the EMS can still send a response back. If the original packet was addressed, then so will the reply be. If the original packet had no address then the response type will be async error, not the corresponding reply type for the request sent.
1) Just send a stream of requests and as soon as its listening you will have on average 1/2 the time a request takes before oen starts being received by the EMS and max the whole time.'
2) Introduce a delay after sending the packet such that the EMS starts receiving it at just the right time.
I think 1 is the best choice as 2 complicates it for you and the chances of a real benefit from that approach are slim to none given the length of the request packets...
If the issue with the docs I mentioned above wasn't what you said the other night, please fill me in as to what was so I can rectify it.
Cheers,
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!
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!
Re: FreeEMS-Tuner Development Diary - Comments
http://freeems.aaronb.info/tracker/view.php?id=60
:-(
Not a big deal at the moment, but something is funny with the way it can parallel connect to the port with other apps. I wonder if the same thing is related to not being able to use interceptty? One must wonder why it froze. Is there a debugger I can attach and help diagnose the issue with?
Fred.
:-(
Not a big deal at the moment, but something is funny with the way it can parallel connect to the port with other apps. I wonder if the same thing is related to not being able to use interceptty? One must wonder why it froze. Is there a debugger I can attach and help diagnose the issue with?
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!
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!
- 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: FreeEMS-Tuner Development Diary - Comments
Updated the trackerFred wrote:http://freeems.aaronb.info/tracker/view.php?id=60
Not a big deal at the moment, but something is funny with the way it can parallel connect to the port with other apps. I wonder if the same thing is related to not being able to use interceptty? One must wonder why it froze. Is there a debugger I can attach and help diagnose the issue with?
Fred.


Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
165hp @ 6psi standard - fastest production car in japan Oct 82
- 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: FreeEMS-Tuner Development Diary - Comments
The ack questions were more me checking that if I wanted to confirm the ECU had received a packet - I was gonna have to ask and check for a response.Fred wrote:Aaron, when we spoke the other night, did you tell me that the stuff on acks and errors was wrong in the docs? If so, can you elaborate so I can fix it. I just had a look and the ack bit is not complete, but seems accurate. I've just added the following to the ack section :
When a packet is sent without the request for an ack reply, and an error occurs, the EMS can still send a response back. If the original packet was addressed, then so will the reply be. If the original packet had no address then the response type will be async error, not the corresponding reply type for the request sent.
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
165hp @ 6psi standard - fastest production car in japan Oct 82
Re: FreeEMS-Tuner Development Diary - Comments
it wasn't ack, it was something else...ummm ?? hold on...
the debugs :
the debugs :
Code: Select all
2008-11-17 10:20:08,268 INFO comms.Serial - Serial connection established to /dev/ttyUSB0
2008-11-17 10:27:21,867 INFO comms.Serial - Serial connection to /dev/ttyUSB0 closed
2008-11-17 10:27:23,901 INFO comms.Serial - Serial connection established to /dev/ttyUSB0
2008-11-17 10:33:43,589 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: E4
2008-11-17 10:33:43,597 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 0
2008-11-17 10:33:43,599 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 9F
2008-11-17 10:33:43,601 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 78
2008-11-17 10:33:43,602 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 40
2008-11-17 10:33:43,604 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: A
2008-11-17 10:33:43,631 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 0
2008-11-17 10:33:43,633 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 3E
2008-11-17 10:33:43,643 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 78
2008-11-17 10:33:43,645 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 40
2008-11-17 10:33:43,649 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: FE
2008-11-17 10:33:43,651 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: E4
2008-11-17 10:33:43,656 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 0
2008-11-17 10:33:43,669 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 9F
2008-11-17 10:33:43,675 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 78
2008-11-17 10:33:43,677 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 40
2008-11-17 10:33:43,679 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: A
2008-11-17 10:33:43,681 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 0
2008-11-17 10:33:43,697 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: BE
2008-11-17 10:33:43,699 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 78
2008-11-17 10:33:43,705 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 0
2008-11-17 10:33:43,707 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: FE
2008-11-17 10:33:43,709 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: E4
2008-11-17 10:33:43,711 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 0
2008-11-17 10:33:43,717 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 9F
2008-11-17 10:33:43,719 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 78
2008-11-17 10:33:43,729 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 40
2008-11-17 10:33:43,736 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: A
2008-11-17 10:33:43,739 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 0
2008-11-17 10:33:43,753 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 3E
2008-11-17 10:33:43,755 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 78
2008-11-17 10:33:43,758 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 40
2008-11-17 10:33:43,764 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: FE
2008-11-17 10:33:43,766 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 0
2008-11-17 10:33:43,769 DEBUG comms.Serial - Packet received by Serial connection: [170, 17, 0, 1, 0, 20, 0, 0, 2, 73, 70, 114, 101, 101, 69, 77, 83, 32, 86, 97, 110, 105, 108, 108, 97, 0, 191, 204]
2008-11-17 10:33:52,995 DEBUG comms.Serial - Packet received by Serial connection: [170, 17, 0, 1, 0, 20, 0, 0, 2, 73, 70, 114, 101, 101, 69, 77, 83, 32, 86, 97, 110, 105, 108, 108, 97, 0, 191, 204]
2008-11-17 10:35:01,346 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 0
2008-11-17 10:35:01,349 DEBUG comms.Serial - Packet received by Serial connection: [170, 17, 0, 1, 0, 20, 0, 0, 2, 73, 70, 114, 101, 101, 69, 77, 83, 32, 86, 97, 110, 105, 108, 108, 97, 0, 191, 204]
2008-11-17 10:35:07,299 DEBUG comms.Serial - Packet received by Serial connection: [170, 17, 0, 1, 0, 20, 0, 0, 2, 73, 70, 114, 101, 101, 69, 77, 83, 32, 86, 97, 110, 105, 108, 108, 97, 0, 191, 204]
2008-11-17 10:35:09,705 DEBUG comms.Serial - Packet received by Serial connection: [170, 17, 0, 1, 0, 20, 0, 0, 2, 73, 70, 114, 101, 101, 69, 77, 83, 32, 86, 97, 110, 105, 108, 108, 97, 0, 191, 204]
2008-11-17 10:35:13,508 DEBUG comms.Serial - Packet received by Serial connection: [170, 1, 0, 5, 8, 16, 30, 204]
2008-11-17 10:38:03,620 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 0
2008-11-17 10:38:03,624 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 0
2008-11-17 10:38:03,626 ERROR serial.FreeEMS_Vanilla - Bad/incomplete data found in buffer before start byte: 0
2008-11-17 10:38:03,629 DEBUG comms.Serial - Packet received by Serial connection: [170, 1, 0, 5, 8, 16, 30, 204]
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!
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!
- 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: FreeEMS-Tuner Development Diary - Comments
I'll give that code a check over... I need to in relation to the hanging bug anyway
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
165hp @ 6psi standard - fastest production car in japan Oct 82
Re: FreeEMS-Tuner Development Diary - Comments
I ran the app on a win xp box earlier with the following three installers and zero hassle :
python-2.6.msi
pywin32-212.win32-py2.6.exe
wxPython2.8-win32-unicode-2.8.9.1-py26.exe
This code :
srynot4sale-freeems-tuner-0dc626c05aff767a7a97e1d76465b85893a58109
Aaron, are you familiar with the bundling program? You can wrap up all the code and interpretter etc in a single ball of runable app installable by another thingy. Karsten knows how to do it, if you don't, contact him :-)
Fred.
python-2.6.msi
pywin32-212.win32-py2.6.exe
wxPython2.8-win32-unicode-2.8.9.1-py26.exe
This code :
srynot4sale-freeems-tuner-0dc626c05aff767a7a97e1d76465b85893a58109
Aaron, are you familiar with the bundling program? You can wrap up all the code and interpretter etc in a single ball of runable app installable by another thingy. Karsten knows how to do it, if you don't, contact him :-)
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!
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!
Re: FreeEMS-Tuner Development Diary - Comments
Hell yah.sry_not4sale wrote:can haz first successfully recieve packet parsing -> object this morning w000