RomRaider Logo

RomRaider

Open Source ECU Tools
 FAQ •  Register •  Login 

RomRaider

Documentation

Community

Developers

It is currently Sat Feb 21, 2026 9:59 am

All times are UTC





Post new topic Reply to topic  [ 46 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: OpenPort 2.0 Linux j2534 driver?
PostPosted: Sat Sep 01, 2018 5:25 pm 
Offline
Experienced
User avatar

Joined: Thu Mar 02, 2006 2:51 am
Posts: 345
Following the other Raspberry Pi thread I got RomRaider installed on a Raspberry Pi 3B+. Unfortunately I sold my 1.2 cable a long time ago and just have an Openport 2.0.

It looks like dschultz has been working on a J2534 driver but do I have to compile it?
https://github.com/dschultzca/j2534

Or should I just go with a VAGCOM or older Tactrix cable?

Just trying to get this working for a logging / gauges setup. Any advice on installation or optimization for the Pi would be great. I've got a Lilliput touchscreen in the car already and would like to put it to some real use.

_________________
- Justin
download my ROM


Top
 Profile  
 
 Post subject: Re: OpenPort 2.0 Linux j2534 driver?
PostPosted: Sun Sep 02, 2018 7:51 pm 
Offline
RomRaider Developer

Joined: Thu May 21, 2009 1:49 am
Posts: 7323
Location: Canada eh!
Yes you would need to compile it for your installation.

If you go with a VAGCOM you'll need the RXTX serial driver compiled for Raspberry PI. I think might be it: viewtopic.php?p=110162#p110162


Top
 Profile  
 
 Post subject: Re: OpenPort 2.0 Linux j2534 driver?
PostPosted: Sun Jan 27, 2019 8:52 pm 
Offline
Experienced
User avatar

Joined: Thu Mar 02, 2006 2:51 am
Posts: 345
I'd like to use the OP2.

I downloaded the .zip from github and extracted it. Ran "make" and it gave me an error about missing libusb:

gcc -g -fPIC -c j2534.c `pkg-config --cflags --libs libusb-1.0`
Package libusb-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libusb-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libusb-1.0' found
j2534.c:14:20: fatal error: libusb.h: No such file or directory
#include <libusb.h>
^
compilation terminated.
makefile:9: recipe for target 'j2534.o' failed
make: *** [j2534.o] Error 1


Looks like I have libusb 1.0-0-2:1.0.21-1 installed. Do I need the development files too?

Also will I see something in the COM port drop down once I get this working and connect the OP2? Or how do I know it's communicating?

_________________
- Justin
download my ROM


Top
 Profile  
 
 Post subject: Re: OpenPort 2.0 Linux j2534 driver?
PostPosted: Mon Jan 28, 2019 3:56 am 
Offline
RomRaider Developer

Joined: Thu May 21, 2009 1:49 am
Posts: 7323
Location: Canada eh!
Yes you will need the libusb-dev installed.

You can look in the rr_system.log to see what connection is used. The OP2 is preferred over COM ports.


Top
 Profile  
 
 Post subject: Re: OpenPort 2.0 Linux j2534 driver?
PostPosted: Fri Feb 01, 2019 11:54 pm 
Offline
Experienced
User avatar

Joined: Thu Mar 02, 2006 2:51 am
Posts: 345
I got the dev stuff installed and thought it compiled successfully, but it is still not happy.

Here are the bits from the log that jumped out at me. I can post the whole file or increase the logging level if necessary.

Saw this first:
5460 ERROR [main] - Error loading external datasource: com.romraider.logger.external.phidget.interfacekit.plugin.IntfKitDataSource, specified in: /home/pi/RomRaider/./plugins/phidget_ik.plugin
java.lang.ExceptionInInitializerError: /home/pi/RomRaider/lib/linux/libphidget21.so: /home/pi/RomRaider/lib/linux/libphidget21.so: cannot open shared object file: No such file or directory (Possible cause: can't load IA 32-bit .so on a ARM-bit platform)
Could not locate the Phidget C library (libphidget21.so).
Make sure it is installed, and add it's path to LD_LIBRARY_PATH.
at com.phidgets.Manager.<clinit>(Manager.java:39)
at com.romraider.logger.external.phidget.interfacekit.io.IntfKitManager.findIntfkits(IntfKitManager.java:59)
at com.romraider.logger.external.phidget.interfacekit.plugin.IntfKitDataSource.<init>(IntfKitDataSource.java:56)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at java.lang.Class.newInstance(Class.java:442)
at com.romraider.logger.external.core.ExternalDataSourceLoaderImpl.dataSource(ExternalDataSourceLoaderImpl.java:77)
at com.romraider.logger.external.core.ExternalDataSourceLoaderImpl.loadExternalDataSources(ExternalDataSourceLoaderImpl.java:52)
at com.romraider.logger.ecu.EcuLogger.loadLoggerPlugins(EcuLogger.java:610)
at com.romraider.logger.ecu.EcuLogger.construct(EcuLogger.java:333)
at com.romraider.logger.ecu.EcuLogger.<init>(EcuLogger.java:294)
at com.romraider.logger.ecu.EcuLogger.startLogger(EcuLogger.java:1985)
at com.romraider.ECUExec.openLogger(ECUExec.java:119)
at com.romraider.ECUExec.main(ECUExec.java:98)


then saw this over and over
11643 INFO [Thread-2] - J2534 initialization: /tmp/jna/jna4506652207763980838.tmp: /tmp/jna/jna4506652207763980838.tmp: cannot open shared object file: No such file or directory, trying serial connection...
11651 INFO [Thread-2] - Error sending init: Parameter portName must not be null or empty
12653 INFO [Thread-2] - J2534 initialization: Could not initialize class com.sun.jna.NativeLong, trying serial connection...
12654 INFO [Thread-2] - Error sending init: Parameter portName must not be null or empty
13656 INFO [Thread-2] - J2534 initialization: Could not initialize class com.sun.jna.NativeLong, trying serial connection...
13657 INFO [Thread-2] - Error sending init: Parameter portName must not be null or empty

_________________
- Justin
download my ROM


Top
 Profile  
 
 Post subject: Re: OpenPort 2.0 Linux j2534 driver?
PostPosted: Sun Feb 03, 2019 2:01 pm 
Offline
RomRaider Developer

Joined: Thu May 21, 2009 1:49 am
Posts: 7323
Location: Canada eh!
Unless you are using the Phidgets Interfacekit, you can ignore that.

Maybe it didn't find your library. Try with a higher logging level.


Top
 Profile  
 
 Post subject: Re: OpenPort 2.0 Linux j2534 driver?
PostPosted: Sat Feb 09, 2019 5:08 pm 
Offline
Experienced
User avatar

Joined: Thu Mar 02, 2006 2:51 am
Posts: 345
I set the log level to debug. I'm attaching the whole file but here is that second bit with more detail:

12418 WARN [main] - Timeout while waiting for serial port refresher - continuing anyway...
12420 DEBUG [Thread-2] - QueryManager started.
12598 INFO [Thread-2] - J2534 initialization: /tmp/jna/jna8590633300250019377.tmp: /tmp/jna/jna8590633300250019377.tmp: cannot open shared object file: No such file or directory, trying serial connection...
12608 DEBUG [Thread-2] - Error sending init
java.lang.IllegalArgumentException: Parameter portName must not be null or empty
at com.romraider.util.ParamChecker.checkNotNullOrEmpty(ParamChecker.java:44)
at com.romraider.io.serial.connection.SerialConnectionManager.<init>(SerialConnectionManager.java:46)
at com.romraider.io.connection.ConnectionManagerFactory.manager(ConnectionManagerFactory.java:140)
at com.romraider.io.connection.ConnectionManagerFactory.getManager(ConnectionManagerFactory.java:51)
at com.romraider.logger.ecu.comms.io.connection.LoggerConnectionFactory.getConnection(LoggerConnectionFactory.java:35)
at com.romraider.logger.ecu.comms.manager.QueryManagerImpl.doEcuInit(QueryManagerImpl.java:172)
at com.romraider.logger.ecu.comms.manager.QueryManagerImpl.run(QueryManagerImpl.java:149)
at java.lang.Thread.run(Thread.java:745)
13612 INFO [Thread-2] - J2534 initialization: Could not initialize class com.sun.jna.NativeLong, trying serial connection...
13613 DEBUG [Thread-2] - Error sending init
java.lang.IllegalArgumentException: Parameter portName must not be null or empty
at com.romraider.util.ParamChecker.checkNotNullOrEmpty(ParamChecker.java:44)
at com.romraider.io.serial.connection.SerialConnectionManager.<init>(SerialConnectionManager.java:46)
at com.romraider.io.connection.ConnectionManagerFactory.manager(ConnectionManagerFactory.java:140)
at com.romraider.io.connection.ConnectionManagerFactory.getManager(ConnectionManagerFactory.java:51)
at com.romraider.logger.ecu.comms.io.connection.LoggerConnectionFactory.getConnection(LoggerConnectionFactory.java:35)
at com.romraider.logger.ecu.comms.manager.QueryManagerImpl.doEcuInit(QueryManagerImpl.java:172)
at com.romraider.logger.ecu.comms.manager.QueryManagerImpl.run(QueryManagerImpl.java:149)
at java.lang.Thread.run(Thread.java:745)


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

_________________
- Justin
download my ROM


Top
 Profile  
 
 Post subject: Re: OpenPort 2.0 Linux j2534 driver?
PostPosted: Mon Feb 11, 2019 12:35 am 
Offline
RomRaider Developer

Joined: Thu May 21, 2009 1:49 am
Posts: 7323
Location: Canada eh!
Looks like JNA is failing. Most likely because it doesn't contain the library it needs for the ARM platform. I read something about making sure your system has libjnidispatch.so installed on the system. You may have compile JNA from source on the PI.

PS: the Phidgets error is also due to not having the correct library for the PI.


Top
 Profile  
 
 Post subject: Re: OpenPort 2.0 Linux j2534 driver?
PostPosted: Mon Feb 18, 2019 11:29 am 
Offline
Experienced
User avatar

Joined: Thu Mar 02, 2006 2:51 am
Posts: 345
With apt I was able to install libjna-java, libjna-jni, and libjna-platform-java. But no help.

This JNA from source?
https://github.com/java-native-access/jna

_________________
- Justin
download my ROM


Top
 Profile  
 
 Post subject: Re: OpenPort 2.0 Linux j2534 driver?
PostPosted: Mon Feb 18, 2019 6:52 pm 
Offline
RomRaider Developer

Joined: Thu May 21, 2009 1:49 am
Posts: 7323
Location: Canada eh!
Yes.

I've got a PI somewhere, but I have never set it up to run RomRaider.


Top
 Profile  
 
 Post subject: Re: OpenPort 2.0 Linux j2534 driver?
PostPosted: Sun Mar 17, 2019 3:00 pm 
Offline
Experienced
User avatar

Joined: Thu Mar 02, 2006 2:51 am
Posts: 345
dschultz wrote:
Yes.

I've got a PI somewhere, but I have never set it up to run RomRaider.


Well, what are you waiting for? This would go much quicker if you figured it all out for me. :P

I got JNA downloaded and then had to install ant. Things looked to be going well with ant crunching on the build.xml file, until:

[junit]
[junit] Testsuite: com.sun.jna.JNALoadTest
[junit] Tests run: 5, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 55.26 sec
[junit]
[junit] Testcase: testLoadAndUnloadFromJar(com.sun.jna.JNALoadTest): FAILED
[junit] System property jna.loaded not cleared
[junit] junit.framework.AssertionFailedError: System property jna.loaded not cleared
[junit] at com.sun.jna.JNALoadTest.testLoadAndUnloadFromJar(JNALoadTest.java:152)
[junit]
[junit]
[junit] Testcase: testLoadAndUnloadFromResourcePath(com.sun.jna.JNALoadTest): FAILED
[junit] System property jna.loaded not cleared
[junit] junit.framework.AssertionFailedError: System property jna.loaded not cleared
[junit] at com.sun.jna.JNALoadTest.testLoadAndUnloadFromResourcePath(JNALoadTest.java:191)
[junit]
[junit]
[junit] Test com.sun.jna.JNALoadTest FAILED


That was only two failures out of what seemed like hundreds of tests, so I was still hopeful this would do the trick, but no dice. Same issue in the RomRaider log:

12755 WARN [main] - Timeout while waiting for serial port refresher - continuing anyway...
12757 DEBUG [Thread-2] - QueryManager started.
12987 INFO [Thread-2] - J2534 initialization: /tmp/jna/jna2490596238246150386.tmp: /tmp/jna/jna2490596238246150386.tmp: cannot open shared object file: No such file or directory, trying serial connection...
12999 DEBUG [Thread-2] - Error sending init
java.lang.IllegalArgumentException: Parameter portName must not be null or empty
at com.romraider.util.ParamChecker.checkNotNullOrEmpty(ParamChecker.java:44)
at com.romraider.io.serial.connection.SerialConnectionManager.<init>(SerialConnectionManager.java:46)
at com.romraider.io.connection.ConnectionManagerFactory.manager(ConnectionManagerFactory.java:140)
at com.romraider.io.connection.ConnectionManagerFactory.getManager(ConnectionManagerFactory.java:51)
at com.romraider.logger.ecu.comms.io.connection.LoggerConnectionFactory.getConnection(LoggerConnectionFactory.java:35)
at com.romraider.logger.ecu.comms.manager.QueryManagerImpl.doEcuInit(QueryManagerImpl.java:172)
at com.romraider.logger.ecu.comms.manager.QueryManagerImpl.run(QueryManagerImpl.java:149)
at java.lang.Thread.run(Thread.java:745)
14003 INFO [Thread-2] - J2534 initialization: Could not initialize class com.sun.jna.NativeLong, trying serial connection...
14003 DEBUG [Thread-2] - Error sending init
java.lang.IllegalArgumentException: Parameter portName must not be null or empty
at com.romraider.util.ParamChecker.checkNotNullOrEmpty(ParamChecker.java:44)
at com.romraider.io.serial.connection.SerialConnectionManager.<init>(SerialConnectionManager.java:46)
at com.romraider.io.connection.ConnectionManagerFactory.manager(ConnectionManagerFactory.java:140)
at com.romraider.io.connection.ConnectionManagerFactory.getManager(ConnectionManagerFactory.java:51)
at com.romraider.logger.ecu.comms.io.connection.LoggerConnectionFactory.getConnection(LoggerConnectionFactory.java:35)
at com.romraider.logger.ecu.comms.manager.QueryManagerImpl.doEcuInit(QueryManagerImpl.java:172)
at com.romraider.logger.ecu.comms.manager.QueryManagerImpl.run(QueryManagerImpl.java:149)
at java.lang.Thread.run(Thread.java:745)

_________________
- Justin
download my ROM


Top
 Profile  
 
 Post subject: Re: OpenPort 2.0 Linux j2534 driver?
PostPosted: Sun Mar 17, 2019 6:36 pm 
Offline
RomRaider Developer

Joined: Thu May 21, 2009 1:49 am
Posts: 7323
Location: Canada eh!
Justin 05 STi wrote:
dschultz wrote:
Yes.

I've got a PI somewhere, but I have never set it up to run RomRaider.


Well, what are you waiting for? This would go much quicker if you figured it all out for me. :P
I'm not sure it will be faster. I guess those errors really do mean something, but I don't know what as they are in the JNA code.


Top
 Profile  
 
 Post subject: Re: OpenPort 2.0 Linux j2534 driver?
PostPosted: Sat Apr 20, 2019 7:03 pm 
Offline
Newbie

Joined: Tue Nov 21, 2017 11:56 pm
Posts: 82
Guess I will start adding to this topic to offer help.

What I have done:
-Downloaded dshultz's master j2534 folder
-installed libusb-dev stuff
-installed jna
-Compiled j2534, no errors/warnings
-moved the compiled j2534.so to the /usr/local/lib (should maybe modify the folder path so it is already in the spot but meh)

Stuck at the same point where I am getting the same error in RomRaider as above:

31379 INFO [Thread-2] - J2534 initialization: Could not initialize class com.sun.jna.NativeLong, trying serial connection...

I saw that Justin to had to compile JNA... but I'm not really sure how to do that (linux moron here). Any help so I can help this project along?

_________________
98 Impreza RS - V8 STi EJ207 Swapped


Top
 Profile  
 
 Post subject: Re: OpenPort 2.0 Linux j2534 driver?
PostPosted: Sat Apr 20, 2019 10:32 pm 
Offline
Newbie

Joined: Tue Nov 21, 2017 11:56 pm
Posts: 82
Nevermind, I'm just an idiot hah.

So I see that when I compile the j2534.so i get a warning:

j2534.c: In function ‘PassThruOpen’:
j2534.c:313:13: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
pDeviceID = con->dev_handle;
^

Might be something to look at? I'm a bit confused at how the libusb stuff works

_________________
98 Impreza RS - V8 STi EJ207 Swapped


Top
 Profile  
 
 Post subject: Re: OpenPort 2.0 Linux j2534 driver?
PostPosted: Sun Apr 28, 2019 8:03 pm 
Offline
Newbie

Joined: Tue Nov 21, 2017 11:56 pm
Posts: 82
So i have still been trying to get this to work, even without an OP2.0 cable, on an RP3b+ (read: ARM8 Processor) and I notice in the Java log (doesn't show up in the romraider log) this:

Code:
Java HotSpot(TM) Client VM warning: You have loaded library /home/pi/RomRaider/lib/linux/librxtxSerial.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
java.lang.UnsatisfiedLinkError: /home/pi/RomRaider/lib/linux/librxtxSerial.so: /home/pi/RomRaider/lib/linux/librxtxSerial.so: cannot open shared object file: No such file or directory (Possible cause: can't load IA 32-bit .so on a ARM-bit platform) thrown while loading gnu.io.RXTXCommDriver
Exception in thread "Thread-1" java.lang.UnsatisfiedLinkError: /home/pi/RomRaider/lib/linux/librxtxSerial.so: /home/pi/RomRaider/lib/linux/librxtxSerial.so: cannot open shared object file: No such file or directory (Possible cause: can't load IA 32-bit .so on a ARM-bit platform)
   at java.lang.ClassLoader$NativeLibrary.load(Native Method)
   at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1854)
   at java.lang.Runtime.loadLibrary0(Runtime.java:870)
   at java.lang.System.loadLibrary(System.java:1122)
   at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)
   at com.romraider.io.serial.port.SerialPortDiscovererImpl.listPorts(SerialPortDiscovererImpl.java:33)
   at com.romraider.io.serial.port.SerialPortRefresher.listSerialPorts(SerialPortRefresher.java:78)
   at com.romraider.io.serial.port.SerialPortRefresher.refreshPortList(SerialPortRefresher.java:71)
   at com.romraider.io.serial.port.SerialPortRefresher.run(SerialPortRefresher.java:48)
   at java.lang.Thread.run(Thread.java:745)
12725 WARN  [main] - Timeout while waiting for serial port refresher - continuing anyway...
12726 DEBUG [Thread-2] - QueryManager started.


To me this looks like the rxtxSerial shared object is NOT compatible with the ARM8, can anyone confirm/add info? I'm not well versed in Java/Linux so diving into this rabbit hole headfirst has been tough to make progress with.

Would this be stopping an OP2.0 driver from working with romraider? My VAGCOM KKL doesn't seem to work at all either, nor my K+DCAN cable so it seems like any serial interface just isn't going to work unless that library gets loaded up properly.

Also, I've tried to compile the RXTXlib on the Pi, but it's got so many error I haven't figured out where to start on it yet.

I'll keep blasting this thread just so I can document stuff, if anything.

_________________
98 Impreza RS - V8 STi EJ207 Swapped


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 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

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