New serial protocol / MS3 pre1.1 alpha codes 12+

Testing and development of Megasquirt 3

Moderators: jsmcortina, muythaibxr

jsmcortina
Site Admin
Posts: 39569
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: New serial protocol

Post by jsmcortina »

Even more strange. That suggests that something broke during the "new serial" changes, but they were supposed to be serial changes only.

I almost wonder if your settings aren't getting through correctly ?

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
prof315
Super MS/Extra'er
Posts: 3748
Joined: Sun Jan 18, 2009 3:13 am
Location: Melbourne, FL

Re: New serial protocol

Post by prof315 »

jsmcortina wrote:Even more strange. That suggests that something broke during the "new serial" changes, but they were supposed to be serial changes only.

I almost wonder if your settings aren't getting through correctly ?

James
It that is the case it's not showing up in TS. I did a line by line check of my msq while connected to the ECU and everything was as it should be.

Jeff
Linfert Performance/321 Motorsports
SCCA 2019 SM National Champion Crew Chief
SCCA 2023 FP National Champion Tuner/electrical engineer
100s of MS systems built installed and tuned
Support the developers!
UnaClocker
Super MS/Extra'er
Posts: 1933
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA
Contact:

Re: New serial protocol

Post by UnaClocker »

I just got a chance to load up the pre-12 test code you emailed me. I can confirm the findings. Idle stepper is happily ticking away again. TS is back to constantly dropping the connection if the ignition is on without the engine running. I don't think I ran into that problem with the new serial.
As for the idle problem.. I was thinking that it's something about the way the interrupt for the new serial is being called, it's displacing the interrupt for the idle control routine, somehow.. Or maybe you're poking into a memory location that the idle control uses with your new serial routine? Either way, glad we could help narrow this minor glitch down. I look forward to using the new serial routines full time. :)
Brian
'84 Dodge Rampage
LT401Vette
Super MS/Extra'er
Posts: 12684
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: New serial protocol

Post by LT401Vette »

TS is back to constantly dropping the connection if the ignition is on without the engine running. I don't think I ran into that problem with the new serial.
Please elaborate. Going offline with key on ignition off? Is there any reason you know of or is this an issue?
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
UnaClocker
Super MS/Extra'er
Posts: 1933
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA
Contact:

Re: New serial protocol

Post by UnaClocker »

Key on, which makes the ignition on. Engine not running. TS will connect, stay connected for about 10-15 seconds, then drop the connection and go offline for a few seconds, comes back, does it again, two or three times later I get an error message and it stays offline till I close and re-open TS.
Like I said, this car and computer are a great candidate for the new serial code, I've always had issues with it staying connected. I've seen other people report this issue in the past, it's a bug that I've had for a long long time. I could shoot some video of it happening..
Brian
'84 Dodge Rampage
prof315
Super MS/Extra'er
Posts: 3748
Joined: Sun Jan 18, 2009 3:13 am
Location: Melbourne, FL

Re: New serial protocol

Post by prof315 »

UnaClocker wrote:Key on, which makes the ignition on. Engine not running. TS will connect, stay connected for about 10-15 seconds, then drop the connection and go offline for a few seconds, comes back, does it again, two or three times later I get an error message and it stays offline till I close and re-open TS.
Like I said, this car and computer are a great candidate for the new serial code, I've always had issues with it staying connected. I've seen other people report this issue in the past, it's a bug that I've had for a long long time. I could shoot some video of it happening..
I get a good bit of the same at times. It was definately there (and somewhat annoying) while I was (trying) to load my msq after the firmware change. It took like 3 tries for the msq to finally load properly.
Linfert Performance/321 Motorsports
SCCA 2019 SM National Champion Crew Chief
SCCA 2023 FP National Champion Tuner/electrical engineer
100s of MS systems built installed and tuned
Support the developers!
elaw
Super MS/Extra'er
Posts: 2926
Joined: Fri Oct 16, 2009 6:20 am
Location: Wilmington, MA

Re: New serial protocol

Post by elaw »

Guys,

The TS thing I don't think is an alpha firmware issue! I've experienced the same thing.

I've been using the latest beta TS on my laptop doing tuning/testing in the car for several days with no problem. That's with a USB-serial dongle that I think has a Prolific chip in it.

Last night I fired up a bench-test setup I have to troubleshoot SD logging. That setup uses the USB port on the MS3 daughterboard (FTDI chip). I experienced the exact same symptoms that UnaClocker describes. Thinking it was the MS3 firmware, I flashed it to alpha 11 and then to the 1.0.2 release firmware but the issue persisted. I finally installed the release version of TunerStudio (1.004) on the laptop and the problem vanished. I reflashed the MS3 to alpha 11 and still no problem. So I think it's an issue with the 1.074 version of TS.
Eric Law
1990 Audi 80 quattro with AAN turbo engine: happily running on MS3+MS3X
2012 Audi A4 quattro, desperately in need of tweaking

Be alert! America needs more lerts.
LT401Vette
Super MS/Extra'er
Posts: 12684
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: New serial protocol

Post by LT401Vette »

It sounds like what your guys are talking about is different from UnaClocker. His issue is only happening when it the key is on but the engine is off and he is doing nothing else. After about 5 seconds he gets this message:
Warning!!
Communication Established!
However, there is a configuration error with your firmware.


As I understand it, this is happening with either the released TunerStudio or 1.074, but not with the new serial.

Now if you are getting an error message new to 1.074 and against released firmware, please go ahead and open a new report in the TunerStudio forum describing what actions cause it. It is not a known issue.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
prof315
Super MS/Extra'er
Posts: 3748
Joined: Sun Jan 18, 2009 3:13 am
Location: Melbourne, FL

Re: New serial protocol

Post by prof315 »

LT401Vette wrote:It sounds like what your guys are talking about is different from UnaClocker. His issue is only happening when it the key is on but the engine is off and he is doing nothing else. After about 5 seconds he gets this message:
Warning!!
Communication Established!
However, there is a configuration error with your firmware.


As I understand it, this is happening with either the released TunerStudio or 1.074, but not with the new serial.

Now if you are getting an error message new to 1.074 and against released firmware, please go ahead and open a new report in the TunerStudio forum describing what actions cause it. It is not a known issue.
i am getting the same thing that Brian is. It doesn't happen quite as often and never happens with the engine running.
Linfert Performance/321 Motorsports
SCCA 2019 SM National Champion Crew Chief
SCCA 2023 FP National Champion Tuner/electrical engineer
100s of MS systems built installed and tuned
Support the developers!
LT401Vette
Super MS/Extra'er
Posts: 12684
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: New serial protocol

Post by LT401Vette »

If it is that exact error message then it is the same error.
UnaClocker said that went away with the new Serial, but it sounds like elaw is still seeing it?
Would you be able to capture a comm debug log while it is happening? Preferably with the new serial.
Even if you have the log from when it happened, that will have some comm debug info from when the failure occurred.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
elaw
Super MS/Extra'er
Posts: 2926
Joined: Fri Oct 16, 2009 6:20 am
Location: Wilmington, MA

Re: New serial protocol

Post by elaw »

LT401Vette wrote:If it is that exact error message then it is the same error.
UnaClocker said that went away with the new Serial, but it sounds like elaw is still seeing it?
I'm getting exactly what una described: online/offline repeated a few times at intervals of a few seconds then the message about the configuration error with the firmware. My bench-test setup can't simulate an engine, so it's "engine not running" by default :lol:

If nobody else has by then, I'll start a thread in the TS forum this evening after I've had time to test more and try and narrow down when this does and does not occur. I posted here mainly to point out that this doesn't just happen with the "new serial" code on the MS side.
Eric Law
1990 Audi 80 quattro with AAN turbo engine: happily running on MS3+MS3X
2012 Audi A4 quattro, desperately in need of tweaking

Be alert! America needs more lerts.
LT401Vette
Super MS/Extra'er
Posts: 12684
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: New serial protocol

Post by LT401Vette »

If nobody else has by then, I'll start a thread in the TS forum this evening after I've had time to test more and try and narrow down when this does and does not occur. I posted here mainly to point out that this doesn't just happen with the "new serial" code on the MS side.
That is good if it is NOT happening with the new serial.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
LT401Vette
Super MS/Extra'er
Posts: 12684
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: New serial protocol

Post by LT401Vette »

For any of you that are getting that message with the old serial, try editing the mainController.ini file. Find the line (at or about line 157):
interWriteDelay = 1 ; delay between each byte written

Change the 1 to a 0

We were having issues with this a while back with higher interWriteDelay values, but when it was reduced to 1, it seemed to take care of it for all the machines we saw it happen on at the time. I didn't realize some of you are still seeing this and just gotten used to it. :(
What UnaClocker describes is that for him it happens every time his engine is off, for others it sounds more erratic. in the end it means that in some condition TunerStudio is sending data that the firmware does not respond to, likely it didn't receive the full message.

That is one of the points of the new serial, to insure this can not happen without clear knowledge of it and better visibility into what the controller got.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
UnaClocker
Super MS/Extra'er
Posts: 1933
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA
Contact:

Re: New serial protocol

Post by UnaClocker »

Any luck tracking down this problem, James? My commuter car is going to be at the shop getting an alignment on Saturday, and I have to work Saturday, so I'll be driving the Omni to work. It'd be a great time to try out the new serial routines, but I'd rather not give up idle control to do it.
Brian
'84 Dodge Rampage
jsmcortina
Site Admin
Posts: 39569
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: New serial protocol

Post by jsmcortina »

Nope. Aside from the test code I sent the other day I've been busy.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
jsmcortina
Site Admin
Posts: 39569
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: New serial protocol

Post by jsmcortina »

Phil R spotted a bug with knock - you need to define a window output pin to make the analogue input work. Will be fixed for the next alpha.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
jsmcortina
Site Admin
Posts: 39569
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: New serial protocol

Post by jsmcortina »

On the closed-loop idle problem - does it still do that without the laptop (i.e. serial) hooked up ? If the problem goes away with the laptop off that would certainly point to a data-clobbering type issue in the serial.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
jsmcortina
Site Admin
Posts: 39569
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: New serial protocol

Post by jsmcortina »

Pretty sure I've found it (stack overflowing onto variable space.) Will mail test code to Jeff and Brian.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
jsmcortina
Site Admin
Posts: 39569
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: New serial protocol

Post by jsmcortina »

Per feedback from Una, that fixed it...

Alpha 13 now available - please do not use alpha12
http://www.msextra.com/doc/ms3/files/alpha/

Changes
Remove some debug variables to prevent stack overflow corrupting idle control.
Fix MAF stumble during burn.
ini mods for powercycle
Please see the full list above for the changes and warnings since alpha 11

Be sure to use the latest TunerStudio beta version. (Currently 1.078)

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
UnaClocker
Super MS/Extra'er
Posts: 1933
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA
Contact:

Re: New serial protocol

Post by UnaClocker »

TunerStudio 1.078 gave me a warning about "another program" altering my MSQ while it was reloading my MSQ onto the MS after the flash. I wasn't quite sure what to do other than tell it to ignore it. Must be a glitch in the latest TS. Just thought I'd give everyone that tries this a heads up, so they know what they might see. This was on an update from pre-12 to post-12.. :)
Brian
'84 Dodge Rampage
Post Reply