|
RomRaider
Documentation
Community
Developers
|
| Author |
Message |
|
hotspoons
|
Post subject: Logger has flaky connection to ECU under Linux Posted: Thu Jul 19, 2007 9:46 am |
|
 |
| Newbie |
Joined: Mon Jun 18, 2007 7:25 pm Posts: 89
|
|
First I want to say thanks for all your hard work. It doesn't go unappreciated.
When I launch the ECU logger under Linux (Ubuntu 7.04, up-to-date 2.6.20 kernel, and this is with the last official release, and the two test releases with the wideband logging integrated), about 6/7 times I launch the program and point it to the correct serial port (I have /dev/TTYS0 with the LC-1 hooked up, which works great BTW once the logger launches, /dev/TTYUSB0 for the tactrix cable, and /dev/TTYUSB1 is my GPS receiver), it sits there and repeatedly flashes 'connecting to ECU'....'can't send init'...over and over at the bottom. Every once in a while, it will connect on the first try (it seems to only do this if the car is turned on but not running), and every once in a while, it will connect after 20 or 30 attempts to send init to the ECU. It does the same thing on my laptop.
I have a carputer with Linux as the primary OS that I had hoped to use for all my regular tasks (music, GPS, ECU data logging), but to use RomRaider reliably, I have to boot to Windows. Any ideas? I can always 'sudo cat /dev/TTYUSB0 > ecuconnect.bin' to capture the back and forth between the computer and ECU while its trying to connect, but I wouldn't know where to begin with figuring out what is wrong or how to interpret the data. Thanks,
-Rich
|
|
| Top |
|
 |
|
Tgui
|
Post subject: Posted: Thu Jul 19, 2007 10:20 am |
|
 |
| RomRaider Developer |
Joined: Tue Jul 11, 2006 9:25 pm Posts: 1025
|
|
Can you post some of the output as the logger tries to negotiate a connection? Should be going to your terminal.
|
|
| Top |
|
 |
|
hotspoons
|
Post subject: Posted: Thu Jul 19, 2007 11:31 am |
|
 |
| Newbie |
Joined: Mon Jun 18, 2007 7:25 pm Posts: 89
|
|
I'll go and grab the terminal output on my lunch break. Thanks!
|
|
| Top |
|
 |
|
hotspoons
|
Post subject: Posted: Thu Jul 19, 2007 12:16 pm |
|
 |
| Newbie |
Joined: Mon Jun 18, 2007 7:25 pm Posts: 89
|
Please see attached. It basically says this:
Code: Connected to: /dev/ttyUSB0 Ecu Init Request ---> 8010F001BF40 Connection closed. java.lang.IllegalArgumentException: Parameter response must not be null or empty at RomRaider.util.ParamChecker.checkNotNullOrEmpty(ParamChecker.java:76) at RomRaider.io.protocol.SSMResponseProcessor.filterRequestFromResponse(SSMResponseProcessor.java:46) at RomRaider.io.protocol.SSMProtocol.preprocessResponse(SSMProtocol.java:91) at RomRaider.logger.ecu.comms.manager.QueryManagerImpl.doEcuInit(QueryManagerImpl.java:149) at RomRaider.logger.ecu.comms.manager.QueryManagerImpl.run(QueryManagerImpl.java:124) at java.lang.Thread.run(Thread.java:619)
Over and over. And /dev/ttyUSB0 is definitely the tactrix cable. Thanks!
You do not have the required permissions to view the files attached to this post.
|
|
| Top |
|
 |
|
hotspoons
|
Post subject: Posted: Thu Jul 19, 2007 12:44 pm |
|
 |
| Newbie |
Joined: Mon Jun 18, 2007 7:25 pm Posts: 89
|
|
And then when I drove to starbucks for coffee, the logger worked on the first attempt as soon as I pointed it to the correct serial port. Strange, huh?
|
|
| Top |
|
 |
|
kascade
|
Post subject: Posted: Sat Jul 21, 2007 7:53 am |
|
 |
| RomRaider Developer |
 |
Joined: Sun Jul 16, 2006 12:09 am Posts: 644 Location: Brisbane, Australia
|
|
Open up the logger.xml (located in your RomRaider test release directory) in a text editor and replace send_timeout="55" to send_timeout="70". I have a feeling the logger isn't receiving a response from the ecu before the standard timeout is reached. You may need to play with this figure a bit.
_________________ Paul.
------------------------------------
MY04 Forester XT (Aus. spec)
|
|
| Top |
|
 |
|
hotspoons
|
Post subject: Posted: Sat Jul 21, 2007 4:41 pm |
|
 |
| Newbie |
Joined: Mon Jun 18, 2007 7:25 pm Posts: 89
|
kascade wrote: Open up the logger.xml (located in your RomRaider test release directory) in a text editor and replace send_timeout="55" to send_timeout="70". I have a feeling the logger isn't receiving a response from the ecu before the standard timeout is reached. You may need to play with this figure a bit.
I'll play with the timeout settings next time I start/boot the car, and I'll let you know how that turns out, and I'll also try replacing the log4j.properties file with the one you attached so I can get some debug output for the LC-1. Thanks!
|
|
| Top |
|
 |
|
hotspoons
|
Post subject: Posted: Sun Jul 29, 2007 1:49 pm |
|
 |
| Newbie |
Joined: Mon Jun 18, 2007 7:25 pm Posts: 89
|
|
I figured this out. It had something to do with the way RomRaider enumerates com ports. It doesn't like it if you have more than 2 valid com ports on your system (on mine, I have a USB GPS receiver, an actual com port on the motherboard, then the tactrix cable). I have my box dual booted with WinXP, and still have a flaky connection there, but in Linux, I wrote a udev rule for my GPS receiver that names it /dev/GPS instead of /dev/ttyUSBx, and now it doesn't show up under the com port listing in RomRaider, and RomRaider connects every time I fire it up.
|
|
| Top |
|
 |
|
Tgui
|
Post subject: Posted: Sun Aug 05, 2007 10:00 pm |
|
 |
| RomRaider Developer |
Joined: Tue Jul 11, 2006 9:25 pm Posts: 1025
|
hotspoons wrote: I figured this out. It had something to do with the way RomRaider enumerates com ports. It doesn't like it if you have more than 2 valid com ports on your system (on mine, I have a USB GPS receiver, an actual com port on the motherboard, then the tactrix cable). I have my box dual booted with WinXP, and still have a flaky connection there, but in Linux, I wrote a udev rule for my GPS receiver that names it /dev/GPS instead of /dev/ttyUSBx, and now it doesn't show up under the com port listing in RomRaider, and RomRaider connects every time I fire it up.
Kascade, any thoughts on why this might be? I'm having issue with the Mac connecting to the ECU, maybe this is a similar issue?
EDIT: I get a "comm port in use" error, that repeats over and over again.
|
|
| Top |
|
 |
|
sunfreak
|
Post subject: Posted: Mon Oct 29, 2007 4:56 am |
|
 |
| Newbie |
 |
Joined: Fri Sep 21, 2007 10:29 am Posts: 6 Location: Kuerten near Cologne, Germany
|
|
Hi,
I started a try to connect the Logger to my Forester with Linux (SuSE 10.3) on my laptop (Acer Ferrari 5000) and Tactrix cable 2 weeks ago.
I had the same problem as hotspoons, either I first reduced Logger to use only one com port (-Dgnu.io.rxtx.SerialPorts=/dev/tactrix) and have configured a udev rule to symlink /dev/ttyUSB? to /dev/tactrix.
Successful connects were very seldom and not reproducable with any behavior like engine on or off, cable first plug in and after this starting Logger or the other way around.
I didn't gave the send_timeout parameter a try, but is this the only issue with connecting under Linux?
Many thanks for any help.
Regards,
Juergen
|
|
| Top |
|
 |
|
altaic
|
Post subject: Posted: Mon Oct 29, 2007 3:59 pm |
|
 |
| Newbie |
Joined: Tue Oct 23, 2007 4:27 am Posts: 26
|
The same problem occurs on Mac OS X. Both /dev/tty.usbserial-* and /dev/cu.usbserial-* are only able to connect sometimes. I've tried unloading and loading the FTDI kernel extension in various timing combinations with ignition key positions, engine running states, (un)plugging in the tactrix cable, and telling the logger to connect. Once connected, there aren't any issues.
Setting send_timeout to 70 didn't seem to help, although I only tried connecting with that setting a couple times. I haven't yet tested it while there are two or fewer serial devices, due to my laptop having built-in bluetooth (provides two serial ports). I may try unloading the bluetooth kext.
Tgui wrote: I get a "comm port in use" error, that repeats over and over again.
This is likely due to the rxtx lockfile directory location or permissions being incorrect. I posted the correct setup procedure for OSX in this thread.
|
|
| Top |
|
 |
|
sunfreak
|
Post subject: Posted: Tue Oct 30, 2007 7:21 am |
|
 |
| Newbie |
 |
Joined: Fri Sep 21, 2007 10:29 am Posts: 6 Location: Kuerten near Cologne, Germany
|
@kascade
Quote: Open up the logger.xml (located in your RomRaider test release directory) in a text editor and replace send_timeout="55" to send_timeout="70".
There is no "send_timeout" statement in current logger.xml (standard and metric). I didn't find any in the whole dir tree. Shout I add it? And when, where to add it?
_________________ Best Regards,
Juergen
- Forester 2,0 XT AT MY04 - German spec -
|
|
| Top |
|
 |
|
altaic
|
Post subject: Posted: Tue Oct 30, 2007 8:31 am |
|
 |
| Newbie |
Joined: Tue Oct 23, 2007 4:27 am Posts: 26
|
sunfreak wrote: @kascade Quote: Open up the logger.xml (located in your RomRaider test release directory) in a text editor and replace send_timeout="55" to send_timeout="70". There is no "send_timeout" statement in current logger.xml (standard and metric). I didn't find any in the whole dir tree. Shout I add it? And when, where to add it?
It's in the same level as id=SSM, baud=4800, etc.:
logger.xml root -> logger -> protocols -> protocol -> send_timeout
|
|
| Top |
|
 |
|
sunfreak
|
Post subject: Posted: Tue Oct 30, 2007 2:28 pm |
|
 |
| Newbie |
 |
Joined: Fri Sep 21, 2007 10:29 am Posts: 6 Location: Kuerten near Cologne, Germany
|
No success.:
Quote: nb5:~ # cd /opt/RomRaider/ nb5:/opt/RomRaider # ls ecu_defs.xml graphics lib logger.dtd profile.dtd release notes.txt src RomRaider.jar images license.txt logger.xml profile.xml settings.xml Uninstaller nb5:/opt/RomRaider # grep -R send_timeout * nb5:/opt/RomRaider # find . -type f|xargs grep timeout Binary file ./lib/librxtxParallel.so matches Binary file ./lib/libmozembed-linux-gtk1.2.so matches Binary file ./lib/rxtxSerial.dll matches Binary file ./lib/libmozembed-linux-gtk2.so matches Binary file ./lib/librxtxSerial.so matches ./src/RomRaider/logger/comms/io/connection/SSMLoggerConnection.java: int timeout = 1000; ./src/RomRaider/logger/comms/io/connection/SSMLoggerConnection.java: timeout -= 1; ./src/RomRaider/logger/comms/io/connection/SSMLoggerConnection.java: if (timeout <= 0) { ./src/RomRaider/logger/comms/io/connection/SSMLoggerConnection.java: System.out.println("Bad response (read timeout): " + asHex(badBytes));
Do we talk over the same logger.xml file??? 
_________________ Best Regards,
Juergen
- Forester 2,0 XT AT MY04 - German spec -
|
|
| Top |
|
 |
|
altaic
|
Post subject: Posted: Tue Oct 30, 2007 9:36 pm |
|
 |
| Newbie |
Joined: Tue Oct 23, 2007 4:27 am Posts: 26
|
sunfreak wrote: Do we talk over the same logger.xml file??? 
Are you using an older version of Enginiuty? I'm building from SVN.
|
|
| Top |
|
 |
Who is online |
Users browsing this forum: No registered users and 0 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|