The Subaru SVX World Network   SVX Network Forums
Live Chat!
SVX or Subaru Links
Old Lockers
Photo Post
How-To Documents
Message Archive
SVX Shop Search
IRC users:

Go Back   The Subaru SVX World Network > SVX Main Forums > Technical Q & A
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #271  
Old 09-20-2007, 01:50 AM
Nomake Wan's Avatar
Nomake Wan Nomake Wan is offline
Retired
 
Join Date: Jan 2007
Location: Orange, CA
Posts: 1,031
Send a message via AIM to Nomake Wan Send a message via MSN to Nomake Wan Send a message via Yahoo to Nomake Wan Send a message via Skype™ to Nomake Wan
Good thing I'm subscribed to this thread! Instant notification!

Here's the message reported:

usbserial.c: FTDI FT232BM Combatible Converter now attatched to ttyUSB0 (or usb/tts/0 for devfs)

Hopefully this helps?
Reply With Quote
  #272  
Old 09-20-2007, 02:08 AM
Nomake Wan's Avatar
Nomake Wan Nomake Wan is offline
Retired
 
Join Date: Jan 2007
Location: Orange, CA
Posts: 1,031
Send a message via AIM to Nomake Wan Send a message via MSN to Nomake Wan Send a message via Yahoo to Nomake Wan Send a message via Skype™ to Nomake Wan
Oh whoops, didn't see your edit. Will change it to ttyUSB0 and tell you what happens.
Reply With Quote
  #273  
Old 09-20-2007, 02:15 AM
b3lha's Avatar
b3lha b3lha is offline
Phil & Belha
 
Join Date: Aug 2001
Location: Alcyone Limited, Buckinghamshire UK
Posts: 2,671
Looks promising.

I'm sure you're smart enough to have figured this out already, but the command line you want is:

./ecudump -d /dev/ttyUSB0 -s 8000 -e FFFF -f ecu.dat

Isn't it rather late at night where you are?
__________________
Subaru ECU and TCU Website
1992 Alcyone SVX Version L
1992 Alcyone SVX Version L
1994 Alcyone SVX S40-II
2004 Subaru Legacy 2.5 SE Sports Tourer
1996 Subaru Legacy 2.2 GX Wagon
1988 Subaru Justy J12 SL-II
Reply With Quote
  #274  
Old 09-20-2007, 02:42 AM
Nomake Wan's Avatar
Nomake Wan Nomake Wan is offline
Retired
 
Join Date: Jan 2007
Location: Orange, CA
Posts: 1,031
Send a message via AIM to Nomake Wan Send a message via MSN to Nomake Wan Send a message via Yahoo to Nomake Wan Send a message via Skype™ to Nomake Wan
Late? So what!?

Oops, I changed the ecudump.c file by hand and remade it, and it failed at ssm_open returning -3... should've waited for your post. Hahaha.

*goes to try again*
Reply With Quote
  #275  
Old 09-20-2007, 02:47 AM
Nomake Wan's Avatar
Nomake Wan Nomake Wan is offline
Retired
 
Join Date: Jan 2007
Location: Orange, CA
Posts: 1,031
Send a message via AIM to Nomake Wan Send a message via MSN to Nomake Wan Send a message via Yahoo to Nomake Wan Send a message via Skype™ to Nomake Wan
Nope, same thing happened using the command-line change as what happened when I changed the line in the program itself. ssm_open fails returning -3.
Reply With Quote
  #276  
Old 09-20-2007, 03:05 AM
b3lha's Avatar
b3lha b3lha is offline
Phil & Belha
 
Join Date: Aug 2001
Location: Alcyone Limited, Buckinghamshire UK
Posts: 2,671
Quote:
Originally Posted by Nomake Wan View Post
Nope, same thing happened using the command-line change as what happened when I changed the line in the program itself. ssm_open fails returning -3.
Hmm. The -3 means that the call to set the custom baud rate failed. Perhaps the USB device has a different way of setting it. I'll do some research and get back to you.

Thanks for your persistance.
__________________
Subaru ECU and TCU Website
1992 Alcyone SVX Version L
1992 Alcyone SVX Version L
1994 Alcyone SVX S40-II
2004 Subaru Legacy 2.5 SE Sports Tourer
1996 Subaru Legacy 2.2 GX Wagon
1988 Subaru Justy J12 SL-II
Reply With Quote
  #277  
Old 09-20-2007, 03:08 AM
Nomake Wan's Avatar
Nomake Wan Nomake Wan is offline
Retired
 
Join Date: Jan 2007
Location: Orange, CA
Posts: 1,031
Send a message via AIM to Nomake Wan Send a message via MSN to Nomake Wan Send a message via Yahoo to Nomake Wan Send a message via Skype™ to Nomake Wan
No problem. And don't worry about me staying up late, Thursday is my "throw-away day" before Friday. I'm supposed to be up in LA Friday night, and was hoping to have the Stage 1 installed prior to that. We'll see though. I'll do some research too so nobody's sitting on their laurels.
Reply With Quote
  #278  
Old 09-20-2007, 03:23 AM
Nomake Wan's Avatar
Nomake Wan Nomake Wan is offline
Retired
 
Join Date: Jan 2007
Location: Orange, CA
Posts: 1,031
Send a message via AIM to Nomake Wan Send a message via MSN to Nomake Wan Send a message via Yahoo to Nomake Wan Send a message via Skype™ to Nomake Wan
Just a guess at this point, it's been a very long time since I've done any programming...

...is it because we haven't included the USB-Serial driver library in the program's loader?
Reply With Quote
  #279  
Old 09-20-2007, 03:41 AM
b3lha's Avatar
b3lha b3lha is offline
Phil & Belha
 
Join Date: Aug 2001
Location: Alcyone Limited, Buckinghamshire UK
Posts: 2,671
Quote:
Originally Posted by Nomake Wan View Post
Just a guess at this point, it's been a very long time since I've done any programming...

...is it because we haven't included the USB-Serial driver library in the program's loader?
It doesn't really work like that. All devices in unix are treated as files, the program uses standard file handling API and the driver should translate that into the specific API for the device.

I've been looking at the source code for the USB serial driver (isn't it great to have an open-source OS?) and it does seem to use the same standard API as the normal serial driver. So in theory it should work fine. Could you make a small modification to the ecudump.c program so I can see what error the driver is returing?

In ecudump.c, following the call to ssm_open(comport), immediately after the line
printf("ssm_open() returned %d\n",rc);
insert a new line
perror("Error Details");
Then "make" the program and try again. Obviously at this point, you can test it without going outside and attaching the device to the car.
__________________
Subaru ECU and TCU Website
1992 Alcyone SVX Version L
1992 Alcyone SVX Version L
1994 Alcyone SVX S40-II
2004 Subaru Legacy 2.5 SE Sports Tourer
1996 Subaru Legacy 2.2 GX Wagon
1988 Subaru Justy J12 SL-II
Reply With Quote
  #280  
Old 09-20-2007, 03:49 AM
Nomake Wan's Avatar
Nomake Wan Nomake Wan is offline
Retired
 
Join Date: Jan 2007
Location: Orange, CA
Posts: 1,031
Send a message via AIM to Nomake Wan Send a message via MSN to Nomake Wan Send a message via Yahoo to Nomake Wan Send a message via Skype™ to Nomake Wan
Error Details: Invalid Argument
Reply With Quote
  #281  
Old 09-20-2007, 04:24 AM
Nomake Wan's Avatar
Nomake Wan Nomake Wan is offline
Retired
 
Join Date: Jan 2007
Location: Orange, CA
Posts: 1,031
Send a message via AIM to Nomake Wan Send a message via MSN to Nomake Wan Send a message via Yahoo to Nomake Wan Send a message via Skype™ to Nomake Wan
Just for kicks I plugged in the Belkin adapter instead and restarted. Mistake, hahaha. It loaded a generic driver instead and the ssm_open only got to -2. Hahahaha. Oh well...

I'm gonna fall asleep on the keyboard if I don't get some rest, so I'll go do that. Here's hoping you can figure out a way to get this adapter to play nice with the penguins!

Last edited by Nomake Wan; 09-20-2007 at 04:28 AM.
Reply With Quote
  #282  
Old 09-20-2007, 04:37 AM
b3lha's Avatar
b3lha b3lha is offline
Phil & Belha
 
Join Date: Aug 2001
Location: Alcyone Limited, Buckinghamshire UK
Posts: 2,671
Quote:
Originally Posted by Nomake Wan View Post
Error Details: Invalid Argument
I think I see the problem. I'll have to make some changes to the code and get back to you.
__________________
Subaru ECU and TCU Website
1992 Alcyone SVX Version L
1992 Alcyone SVX Version L
1994 Alcyone SVX S40-II
2004 Subaru Legacy 2.5 SE Sports Tourer
1996 Subaru Legacy 2.2 GX Wagon
1988 Subaru Justy J12 SL-II
Reply With Quote
  #283  
Old 09-20-2007, 09:39 AM
b3lha's Avatar
b3lha b3lha is offline
Phil & Belha
 
Join Date: Aug 2001
Location: Alcyone Limited, Buckinghamshire UK
Posts: 2,671
Quote:
Originally Posted by b3lha View Post
I think I see the problem. I'll have to make some changes to the code and get back to you.
Remember I was saying that the serial port selects baud rate using a base and a divisor?

For a standard serial port, you set the base to 115200 and the divisor to 59. (115200/59=1952.5 baud)

It looks like the USB serial port driver (ftdi_sio.c) doesn't allow you to change the base value, only the divisor.

I've modified my program to look up the base value and calculate an appropriate divisor from it. In the case of your device, I think the base is 40000000 and the divisor should be something like 20481. (40000000/20481=1953.0 baud)

The updated software is attached. Let me know how you get on.
Attached Files
File Type: zip ecudump.zip (22.2 KB, 303 views)
__________________
Subaru ECU and TCU Website
1992 Alcyone SVX Version L
1992 Alcyone SVX Version L
1994 Alcyone SVX S40-II
2004 Subaru Legacy 2.5 SE Sports Tourer
1996 Subaru Legacy 2.2 GX Wagon
1988 Subaru Justy J12 SL-II
Reply With Quote
  #284  
Old 09-20-2007, 01:01 PM
Nomake Wan's Avatar
Nomake Wan Nomake Wan is offline
Retired
 
Join Date: Jan 2007
Location: Orange, CA
Posts: 1,031
Send a message via AIM to Nomake Wan Send a message via MSN to Nomake Wan Send a message via Yahoo to Nomake Wan Send a message via Skype™ to Nomake Wan
IT WORKS! You're a genious, Phil!! Now to go about making an if,then bit to detect whether the user of your program is using "real" serial or usb and then use the proper version of the baud code accordingly.

I'll go plug it in now! Good-bye, three hours of my life!

Yep, it's dumping smoothly. Just a waiting game at this point. Here's hoping my battery holds up!

Last edited by Nomake Wan; 09-20-2007 at 01:20 PM.
Reply With Quote
  #285  
Old 09-20-2007, 03:59 PM
Nomake Wan's Avatar
Nomake Wan Nomake Wan is offline
Retired
 
Join Date: Jan 2007
Location: Orange, CA
Posts: 1,031
Send a message via AIM to Nomake Wan Send a message via MSN to Nomake Wan Send a message via Yahoo to Nomake Wan Send a message via Skype™ to Nomake Wan
Sorry it took so long, the dump was finished like two hours ago, but I spent the last two hours trying to figure out how to get it off of the laptop. Had a little problem with all the drives I own being NTFS and the only FAT partition being the boot drive. But then I remembered I had an SD card reader, so thanks to that I have the dump! Here you go!!!

EDIT: Oh yeah, do you by chance know what command forces the ECU to forget all of its saved values? I know the select monitor can reset the ECU completely but I see no reason why we can't do it with our laptops.
Attached Files
File Type: zip ecu.zip (20.9 KB, 302 views)

Last edited by Nomake Wan; 09-20-2007 at 07:26 PM.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 08:30 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
© 2001-2015 SVX World Network
(208)-906-1122