RomRaider Logo

RomRaider

Open Source ECU Tools
 FAQ •  Register •  Login 

RomRaider

Documentation

Community

Developers

It is currently Thu Feb 22, 2018 2:55 am

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: Linux J2534 Support
PostPosted: Sat Mar 07, 2015 7:40 pm 
Offline
Experienced

Joined: Wed Aug 29, 2012 1:52 pm
Posts: 110
Location: MA
impulse wrote:
Leafy wrote:
I'm hoping to not have to do that since I'll have to figure out how to patch the windows version. I couldnt get the linux version to install but the rest of the tuning software I use (hp tuners, aem tuner, etc) only have windows versions but their interfaces have functional linux drivers because they use standard serial to usb chips so they pass right through into my VM without me having to do any real thinking. And I hope to be able to say the same for ECU Flash since thats what really really needs to be able to talk to the tactrix cable for me on my laptop. Stuff like learning view working would also be a nice bonus.


Why can't you just install the windows tactrix drivers inside your VM and then pass USB through? That's what I've been doing with VirtualBox.


Wait that works? I was under the impression that the device had to work on the linux side to pass through, maybe I'm looking in the wrong spot but I dont get the device to show up in linux at all.

I need to figure out how to remove the 64bit version of java and install the 32bit to get rom raider to work and maybe get these drivers to install.


Top
 Profile  
 
 Post subject: Re: Linux J2534 Support
PostPosted: Sun Mar 08, 2015 2:32 am 
Offline
Newbie

Joined: Wed Mar 26, 2014 6:24 pm
Posts: 12
dschultz wrote:
impulse wrote:
Try changing
Code:
#define LOGFILE "~/op.log"
in j2534.c to a file you can write to. I guess ~ doesn't expand in C. I had that hardcoded to my home directory and I changed it to ~ for release.

That helped a bit but it's still not working...

Code:
ldd j2534.so
?


Top
 Profile  
 
 Post subject: Re: Linux J2534 Support
PostPosted: Sun Mar 08, 2015 9:31 am 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 5730
Location: Canada eh!
impulse wrote:
Code:
ldd j2534.so
?

Code:
        linux-gate.so.1 =>  (0xb7701000)
        libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7539000)
        /lib/ld-linux.so.2 (0xb7702000)
Not good :-(

But if I change the make file first line to read:
Code:
CFLAGS=`pkg-config --cflags --libs libusb-1.0`
I get this result instead:
Code:
        linux-gate.so.1 =>  (0xb77a5000)
        libusb-1.0.so.0 => /lib/i386-linux-gnu/libusb-1.0.so.0 (0xb7774000)
        libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb75c6000)
        libudev.so.1 => /lib/i386-linux-gnu/libudev.so.1 (0xb75b2000)
        libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb7596000)
        /lib/ld-linux.so.2 (0xb77a6000)
        libcgmanager.so.0 => /lib/i386-linux-gnu/libcgmanager.so.0 (0xb7578000)
        libnih.so.1 => /lib/i386-linux-gnu/libnih.so.1 (0xb755f000)
        libnih-dbus.so.1 => /lib/i386-linux-gnu/libnih-dbus.so.1 (0xb7555000)
        libdbus-1.so.3 => /lib/i386-linux-gnu/libdbus-1.so.3 (0xb7509000)
        librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb7500000)
http://packages.ubuntu.com/trusty/libs/libusb-1.0-0

Which results in this error upon launch:
Code:
libusbx: error [_get_usbfs_fd] libusbx couldn't open USB device /dev/bus/usb/004/009: Permission denied
libusbx: error [_get_usbfs_fd] libusbx requires write access to USB device nodes.
But I have rw to the assigned port and am a member of the dialout group:
Code:
crw-rw---- 1 root dialout 166, 0 Mar  7 17:44 /dev/ttyACM0
I then added a new udev rule for my OP2:
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTR{idProduct}=="cc4d",GROUP="dialout",MODE="0666"
This allowed the Logger to stay open a bit longer. Here's the logs with the OP2 connected to the computer but not to the ECU.
Attachment:
noConnect.tar.gz
And here's the crash logs with the OP2 connected to the ECU:
Attachment:
connectCrash.tar.gz


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
 Post subject: Re: Linux J2534 Support
PostPosted: Mon Mar 09, 2015 8:09 am 
Offline
Newbie

Joined: Wed Mar 26, 2014 6:24 pm
Posts: 12
dschultz wrote:
Code:
        linux-gate.so.1 =>  (0xb77a5000)
        libusb-1.0.so.0 => /lib/i386-linux-gnu/libusb-1.0.so.0 (0xb7774000)
        libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb75c6000)
        libudev.so.1 => /lib/i386-linux-gnu/libudev.so.1 (0xb75b2000)
        libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb7596000)
        /lib/ld-linux.so.2 (0xb77a6000)
          libcgmanager.so.0 => /lib/i386-linux-gnu/libcgmanager.so.0 (0xb7578000)
          libnih.so.1 => /lib/i386-linux-gnu/libnih.so.1 (0xb755f000)
          libnih-dbus.so.1 => /lib/i386-linux-gnu/libnih-dbus.so.1 (0xb7555000)
          libdbus-1.so.3 => /lib/i386-linux-gnu/libdbus-1.so.3 (0xb7509000)
        librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb7500000)


I don't have any of those indented libraries (the dbus crap). I guess you have udev compiled with dbus support?
dschultz wrote:
This allowed the Logger to stay open a bit longer. Here's the logs with the OP2 connected to the computer but not to the ECU.
Does this mean RomRaider was trying to connect to the ecu and failing?

dschultz wrote:
And here's the crash logs with the OP2 connected to the ECU:
Does this mean you were logging parameters and it eventually crashed?

I think this error "submiturb failed error -1 errno=16" means the device is busy.


Top
 Profile  
 
 Post subject: Re: Linux J2534 Support
PostPosted: Mon Mar 09, 2015 10:20 am 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 5730
Location: Canada eh!
impulse wrote:
dschultz wrote:
Code:
        linux-gate.so.1 =>  (0xb77a5000)
        libusb-1.0.so.0 => /lib/i386-linux-gnu/libusb-1.0.so.0 (0xb7774000)
        libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb75c6000)
        libudev.so.1 => /lib/i386-linux-gnu/libudev.so.1 (0xb75b2000)
        libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb7596000)
        /lib/ld-linux.so.2 (0xb77a6000)
          libcgmanager.so.0 => /lib/i386-linux-gnu/libcgmanager.so.0 (0xb7578000)
          libnih.so.1 => /lib/i386-linux-gnu/libnih.so.1 (0xb755f000)
          libnih-dbus.so.1 => /lib/i386-linux-gnu/libnih-dbus.so.1 (0xb7555000)
          libdbus-1.so.3 => /lib/i386-linux-gnu/libdbus-1.so.3 (0xb7509000)
        librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb7500000)


I don't have any of those indented libraries (the dbus crap). I guess you have udev compiled with dbus support?
I have no idea. What ever comes with Ubuntu 14.04LTS, http://packages.ubuntu.com/trusty/

impulse wrote:
dschultz wrote:
This allowed the Logger to stay open a bit longer. Here's the logs with the OP2 connected to the computer but not to the ECU.
Does this mean RomRaider was trying to connect to the ecu and failing?
Yes trying for a moment and then failed then terminated (no crash report) since the OBD-II cable was not plugged in.

impulse wrote:
dschultz wrote:
And here's the crash logs with the OP2 connected to the ECU:
Does this mean you were logging parameters and it eventually crashed?
No logging since there's not even a hint that the ECU init has completed.

impulse wrote:
I think this error "submiturb failed error -1 errno=16" means the device is busy.
If the device is busy then it should not crash, it should just return NULL to the Logger and it will go on to try Serial.
What would cause it to be busy?
I know when I plug in a FTDI cable there's two modules that load: usbserial & libftdi_sio and if I wish to talk to the FTDI cable directly I have to unload the libftdi_sio module first or I get an "in use" flag back. Could something similar happen here, I didn't check for that as I just thought of it now?


Top
 Profile  
 
 Post subject: Re: Linux J2534 Support
PostPosted: Mon Mar 09, 2015 6:14 pm 
Offline
Experienced

Joined: Wed Aug 29, 2012 1:52 pm
Posts: 110
Location: MA
After f*** around with 4 different types of java to get rom raider to work I tried patching it.

Code:
patching file src/main/java/com/romraider/io/connection/ConnectionManagerFactory.java
Hunk #2 FAILED at 72.
1 out of 2 hunks FAILED -- saving rejects to file src/main/java/com/romraider/io/connection/ConnectionManagerFactory.java.rej


Top
 Profile  
 
 Post subject: Re: Linux J2534 Support
PostPosted: Mon Mar 09, 2015 8:49 pm 
Offline
Newbie

Joined: Wed Mar 26, 2014 6:24 pm
Posts: 12
Leafy wrote:
After f*** around with 4 different types of java to get rom raider to work I tried patching it.

Code:
patching file src/main/java/com/romraider/io/connection/ConnectionManagerFactory.java
Hunk #2 FAILED at 72.
1 out of 2 hunks FAILED -- saving rejects to file src/main/java/com/romraider/io/connection/ConnectionManagerFactory.java.rej


Passing USB through to your VM didn't work?


Top
 Profile  
 
 Post subject: Re: Linux J2534 Support
PostPosted: Mon Mar 09, 2015 8:58 pm 
Offline
Newbie

Joined: Wed Mar 26, 2014 6:24 pm
Posts: 12
dschultz wrote:
Could something similar happen here, I didn't check for that as I just thought of it now?
Possibly. I would also suggest disabling DBUS.

Can you delete op.log and try connecting to your ECU again (with the cable plugged in).


Top
 Profile  
 
 Post subject: Re: Linux J2534 Support
PostPosted: Mon Mar 09, 2015 9:30 pm 
Offline
Experienced

Joined: Wed Aug 29, 2012 1:52 pm
Posts: 110
Location: MA
impulse wrote:
Leafy wrote:
After f*** around with 4 different types of java to get rom raider to work I tried patching it.

Code:
patching file src/main/java/com/romraider/io/connection/ConnectionManagerFactory.java
Hunk #2 FAILED at 72.
1 out of 2 hunks FAILED -- saving rejects to file src/main/java/com/romraider/io/connection/ConnectionManagerFactory.java.rej


Passing USB through to your VM didn't work?


No, linux doesnt recognize the cable at all. Its like I'm not plugging anything in.


Top
 Profile  
 
 Post subject: Re: Linux J2534 Support
PostPosted: Mon Mar 09, 2015 10:26 pm 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 5730
Location: Canada eh!
Leafy wrote:
No, linux doesnt recognize the cable at all. Its like I'm not plugging anything in.

What does dmesg say after you plug it in?
It sees it on my system.


Top
 Profile  
 
 Post subject: Re: Linux J2534 Support
PostPosted: Mon Mar 09, 2015 10:42 pm 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 5730
Location: Canada eh!
impulse wrote:
dschultz wrote:
Could something similar happen here, I didn't check for that as I just thought of it now?
Possibly. I would also suggest disabling DBUS.

Can you delete op.log and try connecting to your ECU again (with the cable plugged in).

I did a 'service dbus stop', which really messes my system up.
Anyway, the Logger opened, reported trying to connect and then crashed, same a before.


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
 Post subject: Re: Linux J2534 Support
PostPosted: Mon Mar 09, 2015 10:58 pm 
Offline
Experienced

Joined: Wed Aug 29, 2012 1:52 pm
Posts: 110
Location: MA
dschultz wrote:
Leafy wrote:
No, linux doesnt recognize the cable at all. Its like I'm not plugging anything in.

What does dmesg say after you plug it in?
It sees it on my system.


Well now it sees it an passes though. And seems to work.


Top
 Profile  
 
 Post subject: Re: Linux J2534 Support
PostPosted: Tue Mar 10, 2015 7:10 pm 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 5730
Location: Canada eh!
impulse wrote:
dschultz wrote:
Could something similar happen here, I didn't check for that as I just thought of it now?
Possibly. I would also suggest disabling DBUS.

Baby steps...

Following up on the idea that something else is attached to the OP2 once plugged in I went looking for a way to determine that. In the second code example here (Bulk Transfer) I got it to report that the kernel was somehow attached to the OP2 and in running the code it was released.

I then went back top RR Logger and started it up. This time NO CRASHES !!!
But sadly no connection either.
For your review here are some logs I took attempting to communicate via CAN bus and K-line and finally back to serial so you can see what K-kine on serial for this ECU looks like.
Attachment:
canTest.tar.gz
Attachment:
k-lineTest.tar.gz
Attachment:
serial.tar.gz


Some things to note:
1 - The library will need a way to detect and detach any other connection to the OP2
2 - The driver will cause RR Logger to crash if the OP2 is not plugged into the computer. I had to delete the j2534.so file to get the Logger to open and use the serial connection again.
These items will need to be fixed or users will be utterly lost trying to figure this out.


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
 Post subject: Re: Linux J2534 Support
PostPosted: Sun Aug 21, 2016 10:01 am 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 5730
Location: Canada eh!
dschultz wrote:
Some things to note:
1 - The library will need a way to detect and detach any other connection to the OP2
2 - The driver will cause RR Logger to crash if the OP2 is not plugged into the computer. I had to delete the j2534.so file to get the Logger to open and use the serial connection again.
These items will need to be fixed or users will be utterly lost trying to figure this out.

I added some code to my GitHub repo address these two items.


Top
 Profile  
 
 Post subject: Re: Linux J2534 Support
PostPosted: Wed Nov 01, 2017 3:05 pm 
Offline
Newbie

Joined: Sat Oct 31, 2015 2:21 pm
Posts: 5
has there been any progress and does logging now work in Linux?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subsilver by phpBBservice.nl