TunerPro RT and Linux

Discuss anything TunerPro related.

Moderators: Mangus, robertisaar, dex

Post Reply
Phydeaux
Posts: 3
Joined: Thu Aug 19, 2004 10:44 am

TunerPro RT and Linux

Post by Phydeaux » Thu Aug 11, 2005 1:57 pm

I have a feeling there will never be a linux port of tunerpro, and thats understandable, but tunerpro is one of the main reasons that I still boot my laptop into windows these days and I wanted to change that. I set about today setting up my laptop to run tunerpro under linux using the wine windows emulator and to my surprise I had a fairly easy time of getting it all to work. I figured I would make a little how to post incase there are other who wish to follow me down this route.

Hardware:

I'm using a moates autoprom usb. The linux kernel (2.6.12) I'm running already had support for the autoprom's usb-serial converter (ftdi_sio) so this was a plug and play no-brainer. If you don't have it you'll need a FTDI FT232BM compatible driver and usbserial support. My system brought it up as /dev/tts/USB0, I'm running udev, those with devfs will probably see somehting like /dev/ttyUSB0 or you may have to make the node yourself. Check your kernel messages log, it should give you clues as to where the device node is. You'll need to check the permissions on the node to make sure the account you'll run tunerpro from can access it. Thats it on the hardware side.

Wine:

Most distributions have a package available for it, if not you can download it from their home page http://www.winehq.com/. You can also find plenty of documentation on the emulator there. Once you have wine installed you can download and run the tunerpro instalation. Make sure you are logged in as the user you wish to run tunerpro as and run wine SetupTunerProRT_v400.exe. This will create your .wine directory (underwhich all your tunerpro files will be) and install tunerpro. You'll see the same setup wizard you're used to in windows.

Now there's just a bit more setup to do before you can start using tunerpro. First you have to setup a com port for wine so tunerpro can access your hardware. You'll need to create a symlink in your ~/.wine/dosdevices directory called com1 (or com2 or com3, it doesn't really matter) to your device. In my case my device was /dev/tts/USB0 so I would run the command:

Code: Select all

ln -s /dev/tts/USB0 ~/.wine/dosdevices/com1
If you have a serial device, wether it be an autoprom or something else, create the link to /dev/ttyS0 (com1) etc for which ever port your device is attached. If you have another USB device and its just using a usb serial converter then you should be able to set it up like this as well. If your device is strictly usb then you're out of luck as wine does not support usb directly. The only thing left is to copy your xdf, bins, etc into their proper locations. The tunerpro directory is ~/.wine/drive_c/Program Files/TunerPro RT/. You'll find the usuall Bins, Bin Definnitions, DataStreams, etc in here.

Once thats all taken care of you should be able to start tunerpro

Code: Select all

wine ~/.wine/drive_c/Program\ Files/TunerPro\ RT\tunerpro.exe
It should detect your autoprom and you should be on your way to tuning under linux.

So far I have run into two bugs both of which are mildly annoying but not enough to make me stop using tunerpro this way.
First off the emulation status window doesn't always get redrawn. Alot of times when you enable emulation it will still show not emulating even though it is. Doing something to force the window to be redrawn (minimize/restore, resize, etc) will make it change to the correct status.

It is also unable to verify the emulator ram with the current bin. It returns a fail -5 error. Some times it will log this error in the console: fixme:ntdll:FILE_AsyncReadService unexpected status 00000000. I'm assuming that tunerpro is making a call to a windows funciton that the emulator doesn't support.

I haven't tried aldl yet (due to an uncooperative car) but so far so good.

andy

Colin
Posts: 1
Joined: Sun Apr 23, 2006 12:12 pm

Post by Colin » Sun Apr 23, 2006 1:12 pm

Wine is the greatest :)

Will you help me get my system up and running on my notebook? I'm running PCLinuxOS. I believe it's Mandrake-based.

Thanks a lot,
Colin

User avatar
raparici
Posts: 10
Joined: Tue Aug 29, 2006 6:00 am
Location: Barcelona

Post by raparici » Tue Aug 29, 2006 8:46 am

Thanks Andy, very informative, I am exactly in the same situation than you, only booting the windows partition of the laptop for running tunning soft :-D

regards,

Ruben

Goumba Tony
Posts: 5
Joined: Wed Aug 16, 2006 7:25 am

Post by Goumba Tony » Sun Sep 03, 2006 9:25 am

Maybe you can convince Mark to see if he can build against winelib, if he wants to even deal with gcc and Unix tools.

User avatar
Mangus
TunerPro Author
Posts: 1828
Joined: Wed Mar 19, 2003 1:49 pm

Post by Mangus » Thu Sep 07, 2006 8:57 am

Goumba Tony wrote:Maybe you can convince Mark to see if he can build against winelib, if he wants to even deal with gcc and Unix tools.
I won't and I don't. Sorry!
***************************************
TunerPro Author
1989 Trans Am

tomic
Posts: 6
Joined: Fri Oct 17, 2008 8:08 am

Re: TunerPro RT and Linux

Post by tomic » Fri Oct 17, 2008 8:37 am

I'm so far unable to get TunerPro to operate under wine. I'm a pretty experienced linux user. Running ubuntu, Linux zx 2.6.24-21-rt, recent TunerPro with Moates AutoPROM.

System sees the autoprom (/dev/ttyUSB0) and I have permissions on the device right, and it's symlinked to ~/.wine/dosdevices etc

But when tunerpro starts up, it briefly says HARDWARE NOT DETECTED and on the console is:

Code: Select all

tomj@zx:~$ wine .wine/drive_c/Program\ Files/TunerPro\ RT/TunerPro.exe 
fixme:comm:set_queue_size insize 1024 outsize 1024 unimplemented stub
err:comm:get_baud_rate unknown speed 1007
err:comm:get_baud_rate unknown speed 1007
err:comm:get_baud_rate unknown speed 1007
err:comm:get_baud_rate tcgetattr error 'Input/output error'
err:comm:get_baud_rate tcgetattr error 'Input/output error'
err:comm:get_baud_rate tcgetattr error 'Input/output error'
Seems like TunerPro sees the device, is unable to configure it.

Any ideas?

User avatar
Mangus
TunerPro Author
Posts: 1828
Joined: Wed Mar 19, 2003 1:49 pm

Post by Mangus » Fri Oct 17, 2008 9:00 am

Tunerpro tries to use 920 KBaud to communicate w/ the device. This is probably what Whine doesn't like (it probably perfers 115200).

Try unchecking "enable high speed if USB detected" in the TunerPro preferences.
***************************************
TunerPro Author
1989 Trans Am

tomic
Posts: 6
Joined: Fri Oct 17, 2008 8:08 am

Post by tomic » Fri Oct 17, 2008 9:14 am

Mangus wrote:Tunerpro tries to use 920 KBaud to communicate w/ the device. This is probably what Whine doesn't like (it probably perfers 115200). Try unchecking "enable high speed if USB detected" in the TunerPro preferences.
Well that eliminated two of the 'unknown speed' errors, and the 'unimplemented stub' error, but I still get:

Code: Select all

err:comm:get_baud_rate unknown speed 1007
err:comm:get_baud_rate tcgetattr error 'Input/output error'
err:comm:get_baud_rate tcgetattr error 'Input/output error'
err:comm:get_baud_rate tcgetattr error 'Input/output error'
Each time I restart or click initialize attached hardware.

User avatar
daveinet
Posts: 36
Joined: Mon Apr 07, 2008 2:04 pm
Contact:

Post by daveinet » Tue Oct 21, 2008 8:56 am

This is a bit interesting to me. I'm struggling if I should take the plunge to Linux. With the advent of the inexpensive Netbooks, the motivation to move to Linux is quite high - especially with SSD, so that bouncing around in a vehicle doesn't take a chance on damaging it. A nice small package is very desirable, the price is just a bonus. I'm set up with ScannerPro running permanently as my dashboard.
Dave
http://www.geocities.com/revconprince/index.html
502 Edelbrock/Howell MPFI Thorleys and Magnaflows - in a 13Klbs motorhome!

"There are 10 types of people in the world, those who understand binary and those who don't"

tomic
Posts: 6
Joined: Fri Oct 17, 2008 8:08 am

Post by tomic » Fri Oct 24, 2008 1:41 pm

daveinet wrote:This is a bit interesting to me. I'm struggling if I should take the plunge to Linux.
Well I hope this doesn't stop you! The issue really is, trying to run a program written for one OS, on another. Even then it's easy enough, the problem usually rears it's ugly head when it comes to HARDWARE.

Hardware and driver access between the host and guest OS is always tough, so that's why this failed. Others have done it; I'm en experienced user and sysadmin, and I gave up because I wanna tune my car, not my computer!

I scrounged up an old Sony laptop, put WinXP on it, and TunerPro came right up. I dont' even have any windows network drivers for the Sony! But I dont care, it runs TunerPro, and I'll save data to a USB stick... and do all my other work on my ubuntu laptop!

User avatar
Mangus
TunerPro Author
Posts: 1828
Joined: Wed Mar 19, 2003 1:49 pm

Post by Mangus » Fri Oct 24, 2008 1:42 pm

Have ya'all done a search on "wine"? I'm positive others have had success, if at least with older builds.
***************************************
TunerPro Author
1989 Trans Am

tomic
Posts: 6
Joined: Fri Oct 17, 2008 8:08 am

Post by tomic » Fri Oct 24, 2008 11:11 pm

Mangus wrote:Have ya'all done a search on "wine"? I'm positive others have had success, if at least with older builds.
Yeah, I did, but no joy. I couldn't get past the baud rate set errors as mentioned in a previous post, and it (apparently) prevented TunerPro from "discovering" the hardware. I was beginning to suspect the hardware, so I stuck it on a WinXP machine and it worked right off.

Because TunerPro needs to discover the adapter, eg. you don't specify in Preferences "use COMx", it just seemed too difficult to debug.

firehawk256
Posts: 3
Joined: Thu Jan 15, 2009 11:23 am

Post by firehawk256 » Thu Jan 15, 2009 11:43 am

I did it! I made TunerPro work with wine and the Moates Extreme ALDL! Actually, the problem isn't really TunerPro, it's wine. I turned on wine debugging and discovered the problem was that wine was complaining about a setting a non-standerd baud rate, and it seems that wine is actually unable to set a non-standard baud rate.

So here's the deal, I can't seem to figure out how to set the serial port to 8192, but I can set it to 9600, and that seems to work. Like this:

Code: Select all

$ stty -F /dev/ttyUSB0 speed 9600
Depending on your os, you may have to add your user account to the "dialout" or "uucp" group to be able to access the serial port.

You can check the setting later like this:

Code: Select all

$ stty -F /dev/ttyUSB0
Now here's the funny part. After you set the speed to 9600, then TunerPro will be able to communicate with the ecm, but if you check again with the "stty" command, it will report the speed as 0. Also, the packet error rate reported by TunerPro seems kinda high, but I don't know if that's because of the serial port trickery or just beacuse I'm running it on a 300 mhz laptop.

User avatar
nrthrly
Posts: 28
Joined: Mon Mar 03, 2008 6:36 am

Post by nrthrly » Mon Jan 19, 2009 7:51 pm

:o :o :o :o What flavor linux are you running wine on?
94 Chevy Suburban
383 TPI Vortec
Tow/Show

firehawk256
Posts: 3
Joined: Thu Jan 15, 2009 11:23 am

Post by firehawk256 » Thu May 21, 2009 1:29 pm

Sorry for the long reply time, but better late than never right? Maybe I should set my profile to email me on reply.

Anyway, I have successfully done this with Gentoo and Debian. I just wish the baud rate didn't keep getting reset all the time. I'm thinking there is probably a way to edit the wine command so that the baud rate will be set automatically when TunerPro opens but I haven't gotten around to that yet.
Last edited by firehawk256 on Sat May 23, 2009 11:21 pm, edited 1 time in total.

User avatar
nrthrly
Posts: 28
Joined: Mon Mar 03, 2008 6:36 am

Post by nrthrly » Fri May 22, 2009 5:01 am

Excellent! What do you think of the concept of runnig TPRT on wine on embedded linux?
94 Chevy Suburban
383 TPI Vortec
Tow/Show

firehawk256
Posts: 3
Joined: Thu Jan 15, 2009 11:23 am

Post by firehawk256 » Sat May 23, 2009 11:30 pm

What do you mean by embedded? Like an EEEPC or something? I think the biggest problem with that might be that if you have a stripped down kernel the serial adapter driver might have been removed.

I still can't seem to get the Moates Burn2 to work though. Everything seems fine but I get errors every time I try to read a chip. Then I go to a windows machine and things work fine. If anyone has a clue what that's about I would like to know.

On a side note, I recently upgraded to a slightly better laptop and the error rate went down, so I guess that's a processing power thing and not linux.

Post Reply