Comms problem

For discussion of Phil Tobin's Tuner Studio software (Only about the tuning software itself, not about how to tune or firmware features)

Moderator: LT401Vette

Post Reply
Luke
MS/Extra Newbie
Posts: 14
Joined: Sat Aug 12, 2006 4:46 am

Comms problem

Post by Luke »

I've recently installed tunerstudio, after hearing great things and it looks wonderful, but I'm unable to communicate with my ECU ( MSII Extra 2.0.1 ). I've been using megatune and it is still able to communicate.

I created a new project, pointed the ECU Definition browse box at the megasquirt-ii.ini from my megatune project folder and use the ECU test button but it fails. I have also tried the test from the communication > settings menu and this too fails.

I am using a USB to COM lead currently and this assigns me COM4 or 5 depending on the USB port I use.

Any help greatfully recieved as I am excited to give this new software a try!

Thanks
Luke
Image
If I had six hours to chop down a tree, I'd spend the first four hours sharpening the axe.
LT401Vette
Super MS/Extra'er
Posts: 12731
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Comms problem

Post by LT401Vette »

Couple questions...
If you just click detect, does it find your controller?
It should be detected as MS2 Extra 2.0.0 as the signature and ini did not change for 2.0.1

Is MegaTune Closed?
If MegaTune is open, it will be holding the Port so TunerStudio won't be able to access it.
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
Luke
MS/Extra Newbie
Posts: 14
Joined: Sat Aug 12, 2006 4:46 am

Re: Comms problem

Post by Luke »

the detect button returns "No device found, check your connections"

Megatune isn't running simultaneously.

Ive tried opening up the mini terminal, not exactly sure what I'm doing with it but I would expect some header information upon connection and recieve nothing, it seems the software just can't get a hold of the com port, but megatune and the portcheck program that comes with the DIYAutotune software pack both detect it fine.
Image
If I had six hours to chop down a tree, I'd spend the first four hours sharpening the axe.
LT401Vette
Super MS/Extra'er
Posts: 12731
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Comms problem

Post by LT401Vette »

I haven't forgotten you... Just trying to think of what is up. I haven't seen this on windows.

I assume you used the installer and are starting it from the icon?
Are you running on a Bench or in a car? I bought a whole pile of USB to serial adapters to use for testing, almost all of them worked fine on the bench. However, I have been finding that several of them get rather troublesome in my car.

Maybe I can find something in the TunerStudioLogFile.txt in the install dir. But I might need to add a comm debug option in the next release to get some additional information.

If you have a different USB to serial adapter, give it a shot. But if you are connecting with MegaTune, i dunno. It usually works the other way around. TunerStudio can typically connect with cables MegaTune can't.
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
Luke
MS/Extra Newbie
Posts: 14
Joined: Sat Aug 12, 2006 4:46 am

Re: Comms problem

Post by Luke »

Yup, used the installer and starting with the icon.

I'm trying it on the bench with power coming from my megastim.

I don't have a different USB => Com but I'll give it a try on my old lappy which has a serial port but I guess that'll just prove it's not the ECU causing the problem. Is there a list of adapters that have tested okay in case I need to buy another?

The USB adapter is a hugepine one like this: http://avr.auctionant.de/img/ark3116_pi ... e_pack.jpg

This is from the log, I presume where it was going through the detect routine as it is in the middle of a list of attempts at different com ports.

12/11/08 08:48:34 :Error: Exception reading port://./COM4, @115200 Baud. Error Message:
No error in nativeDrain
12/11/08 08:48:36 :Debug: 2494ms. - Reset Port
12/11/08 08:48:37 :Error: Exception reading port://./COM4, @9600 Baud. Error Message:
Bad file descriptor in nativeDrain
12/11/08 08:48:39 :Debug: 2463ms. - Reset Port
12/11/08 08:48:39 :Error: Exception reading port://./COM4, @115200 Baud. Error Message:
Bad file descriptor in nativeDrain
12/11/08 08:48:41 :Debug: 2494ms. - Reset Port
12/11/08 08:48:42 :Error: Exception reading port://./COM4, @9600 Baud. Error Message:
Bad file descriptor in nativeDrain
Image
If I had six hours to chop down a tree, I'd spend the first four hours sharpening the axe.
LT401Vette
Super MS/Extra'er
Posts: 12731
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Comms problem

Post by LT401Vette »

Hey I have that cable! It is sitting on my desk, it is the only one I have come up with that doesn't work for me either. But I haven't gotten it to work with MegaTune or a terminal either. I have tried it on linux and windows, but I think on windows I may have a driver conflict. It is showing as a Prolific ... So maybe it is picking up the driver I installed for another cable.

That error "Bad file descriptor in nativeDrain" is interesting.

I think I'll give that cable a shot on another computer that hasn't had 10 other cables plugged into it.
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
goaman
MS/Extra Newbie
Posts: 9
Joined: Fri Nov 14, 2008 1:30 am

Re: Comms problem

Post by goaman »

Hi All,
I have same problem but com port is fisical device COM1, I just dwnload and install TS.
When I click to test comm. it say failed.
I see with com-port monitor that TS sends 'Q' and controller responds whit "signature", but TS do it in a LOOP.
I tryed an mini-term but it doesn't work too, I see with com port monitor that it open an close port but, nothing can't be send over it.
I foun this in log file:
"
08-11-12 21:01:02 :Error: Exception reading port://./COM1, @115200 Baud. Error Message:
Read timeout for send command: 81 (Q)
Expected Unspecified bytes, still no reponse after 200
08-11-12 21:01:02 :Debug: 406ms. - Reset Port
08-11-12 21:01:02 :Debug: 406ms. - ReOpened Port
08-11-12 21:01:09 :Debug: removing COnfiguration: MyCar
TunerStudio shutdown: Wed Nov 12 21:01:09 EET 2008
"
And some question - Is it a way to start MSTS on windows mobile device ?
LT401Vette
Super MS/Extra'er
Posts: 12731
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Comms problem

Post by LT401Vette »

goaman,
This sounds like a very different problem. You are seeing the command sent and a response, but it seems TS has already timed out and declared failure or something like that???

What sort of do loop?

I would like to get a better understanding of this as with a real cable and you actually seeing the response come through, apparently it is working. I need to see why TS is missing it.

What windows are you running on?

No mobile devices yet.. That will take a different version.
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
Luke
MS/Extra Newbie
Posts: 14
Joined: Sat Aug 12, 2006 4:46 am

Re: Comms problem

Post by Luke »

Well today I went out to do some datalogging using megatune and discovered, although I get comms okay with this cable, after a while it goes mad and i get stupid readings all over the guages with the car continuing to run fine (I'm talking 50krpm tacho readings). It seems the long and short of it is the cable's a piece of crap.

I think the best solution is just to get a new com -> usb lead, as you've tested a whole bunch could you recommend one that works well with tuner studio?
Image
If I had six hours to chop down a tree, I'd spend the first four hours sharpening the axe.
LT401Vette
Super MS/Extra'er
Posts: 12731
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Comms problem

Post by LT401Vette »

I would like to do some more research before making any suggestions, because....
The laptop I usually use in my car has a real serial port (Dell D610) and most of my usb to serial testing has been on the bench. Lately I have used another laptop that needed the usb-serial adapter and once I hit the real world.... I am finding what you have, all the noise in the car screws them up. Apparently most of these cheap ones were not really designed for the noisy environment inside a car, especially a concoction car like mine :).
So far I have had issues with drop out on 4 different cheap cables that worked fine on the bench. Also TS 0.984 will often then get stuck and not reconnect, actually it may take task manager to kill it. I have fixed this for the next release.
But still need to look for a good reliable usb cable. Perhaps there is good reason to step beyond the $5 cables :)

diy autotune has one that they recommend. I haven't tried that one yet with TS, but I bet they have and I know they must have used it a lot with MegaTune.
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
Gokart
Master MS/Extra'er
Posts: 667
Joined: Thu Aug 03, 2006 2:38 am
Contact:

Re: Comms problem

Post by Gokart »

Even though serial adapters works for me but it's only good on the bench...
When using it in the car, most of the time it drops out. Unless with my
expensive ATEN cable which is working as expected, using 'Hugepine'
and some other unbranded converter sometimes cease to connect at all.

Now I choose to use expresscard and it's a breeze just like using the real
serial port. No hiccups anymore even though it's prolific too.

I even tried bluetooth with TS, it works fine with both MS1@9600bps or
MS2@115200. Unless if I switched off the MS and get the bluetooth
disconnected, TS will freeze and need a restart. So the trick is to close
TS before switching off MS. I know Phil is being working on this and
hope that he is able to iron out that problem in the next release.
(4G63T - MSIIextra) (4G13 - MS3-beta testing)
LT401Vette
Super MS/Extra'er
Posts: 12731
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Comms problem

Post by LT401Vette »

Gokart, thanks that is good info. And supports what i have been finding too with the cheap ones.... The other day I was out away from home with 2 cheap cables that I have used for bench testing a lot, on the street they were only good for a couple minutes.
Unless if I switched off the MS and get the bluetooth disconnected, TS will freeze and need a restart.
Yep it is fixed, I just need to get the rest of the build done.
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
Luke
MS/Extra Newbie
Posts: 14
Joined: Sat Aug 12, 2006 4:46 am

Re: Comms problem

Post by Luke »

Perhaps I'll go back to my old lappy with serial port for now then :)
Image
If I had six hours to chop down a tree, I'd spend the first four hours sharpening the axe.
Stag76
Helpful MS/Extra'er
Posts: 94
Joined: Tue May 09, 2006 5:56 pm
Location: SE Qld Australia

Re: Comms problem

Post by Stag76 »

I've used a Belkin USB-Serial adaptor with MS and TS without problem. These come with dedicated drivers for different operating systems (Windows and MAC).

I also use a PCMCIA card that never fails.
goaman
MS/Extra Newbie
Posts: 9
Joined: Fri Nov 14, 2008 1:30 am

Re: Comms problem

Post by goaman »

Hi Phill
I've been very busy, but tonight i see that my problem is that time out is 200ms, but on my PC side response from ECU came aftet 203 ms.
Is it any way that time out to be incrased or I need to wait new release?
Another qustion Is it a way to switch between big and little endian ? - Mega tune do it with [endianness = little] is it works on TS ?
And When you planing to release Mobile device port ? :oops:

Thanks in advice.
LT401Vette
Super MS/Extra'er
Posts: 12731
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Comms problem

Post by LT401Vette »

i see that my problem is that time out is 200ms, but on my PC side response from ECU came aftet 203 ms.
Is it any way that time out to be incrased or I need to wait new release?
203 ms... That is interesting. The normal response time is 25-50ms, so 200 normally has a lot of headroom. For connecting, there is no way to change that timing through config. I'll bump it up for the next release.
Another qustion Is it a way to switch between big and little endian ? - Mega tune do it with [endianness = little] is it works on TS ?
TunerStudio does support the same endianness = little, but it has not been tested as all the MegaSquirt firmwares are big. :) What are you trying to do that needs little?
And When you planing to release Mobile device port ? :oops:
It is definitely on the roadmap, there seems to be plenty of demand, but it will be a while still. I need to get this one finished :) and that pesky day job gets in the way.
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
goaman
MS/Extra Newbie
Posts: 9
Joined: Fri Nov 14, 2008 1:30 am

Re: Comms problem

Post by goaman »

I'm runing my own ECU firmware on diffrent microcontroller wich is little endian.
Comunication is same as in MS.
But there are some issues wit Megatune an little endian.
Megatune cant send correct size, 1 byte is send as 100 in llite endian mode but, I fix it for me in my firmware.
And now I have no problems with Megatune, and it's works for me :).

But TS looks more than cool :yeah!: .
Regards
Post Reply