-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
J1939 Support #54
Comments
I've been looking into making some changes so I could test things. |
Awesome!
OpenJDK 8 for aarch64: https://adoptium.net/temurin/releases/?os=linux&arch=aarch64&package=jdk&version=8
Compilation will most certainly not work in anything >8 because they changed some paths around and I don't think the current build scripts support the newer layout. JavaCAN can run on any JRE >=8 though, it's compiled with jdk 8 to ensure that. The build infrastructure is centered around cross-building other architectures from x86_64 using dockcross, currently there isn't any way to build JavaCAN with the "host architecture". Dockcross is also only available for x86_64 if I'm not mistaken. So my recommendation is: Build JavaCAN on an x86_64 machine and transfer the jar over to your raspberry pi. Is that viable for you? |
Ok, I finally got a x64 linux box up and running. Everything is installed. [INFO] Running tel.schich.javacan.test.util.IsotpListenerTest |
Seems like something is off about the ISOTP socket Can you confirm that this works:
Also please share the output of |
Shell 1 echoed just fine. john@Linux-HP: |
I just re-read your README.md - and realized I have no idea what to do for this line of instruction: •The can-isotp kernel module loaded (Kernel 5.10 with CONFIG_CAN_ISOTP enabled or the out-of-tree module) |
you have the can_isotp module loaded as shown by your lsmod output, that's why I asked for it. Which kernel version are you running? ( Also: can you try running the test with the following added after line 69 in file a.configureBlocking(true);
b.configureBlocking(true); |
[INFO] Running tel.schich.javacan.test.util.IsotpListenerTest |
Ok, do other tests work? E.g. Just delete this one and run the build again |
Deleted isotplistenertest.java - and the build ran with no errors. |
Now I get to start writing tests to see if my new code works at all.... |
Question: I just noticed that the Pi 4 uses "Broadcom BCM2711, Quad core Cortex-A72 (ARM v8) 64-bit SoC @ 1.8GHz" |
Isn't still just aarch64? I'd assume the aarch64 build should just work, but I have no hardware to actually test it. Is this just a question or did you actually observe an issue? Architecture auto-detection in Java is difficult on all the different arm variants, so if you use that it might have picked the wrong library. |
Just a question, since I saw that ArmV6 and V7 were explicit native code supported. |
And I just tried building the "all-architectures". It got up to: I have plenty of disk space. |
are you using podman? it's default storage configuration might be "sub optimal" on some distros. The script prioritizes podman if available, but you can force it to use docker using the ENV var I just added on master: |
ok, I see that github actions are also failing with that error using podman, maybe there is something up with the dockcross images or a new podman version... |
Ahh, ok. I'll ignore it for now, and update/test later. I'm still working on adding J1939 changes. (yeah, I'm slow since I am NOT familiar with CAN, J1939, or Linux much.) |
If you are comfortable sharing your draft state early I might be able to help, but no pressure :) Either way I'm happy to help/assist. |
Ok CI works again with the latest dockcross version, it also builds locally with podman. Not sure what exactly broke there... |
I need to first get the general structure done. I've been mostly busy with other things the past few weeks. (WAY too much to do...) And frankly, I'm not sure HOW share a draft. I've never needed to work with Github before. |
Okay, I've got all the basics done, just haven't gotten any tests that actually USE the can channel to work. [ERROR] tel.schich.javacan.test.J1939CanSocketTest.testLoopback -- Time elapsed: 0.009 s <<< ERROR! time to have dinner... |
those are not protocol options, those are just kernel module names. So adding
interesting, so you are apparently allowed to create the socket, but not allowed to write to it. that seems odd, it would be great to be able to test/debug this locally. |
I'll see if I can do the github process. |
Well... I MAY have done it? Not sure about dealing with the Pull Request on github, as their instructions don't match the screens I have. |
yes, looks good. thanks, I'll give that a try |
I consider this done. If you encounter missing functionality or problems please report dedicated issues. |
While software simulator is hard to find I began looking for FD enabled DIO and found this: https://www.microcontrol.net/en/portfolio/i-o-modules/snap/mcan-8-dio-snap/, turns out it can also work in J1939 mode. |
Anyone have documentation on the Canoe "CAN bus log file in asc or blf format"? |
Maybe you could look at Kayak, its archived but it contains support for some of common CAN log formats. |
The CANoe stuff seems very proprietary. Unless there is some open spec or a trail version of the software, I don't see how we'll be able to implement this. |
Someone on another list just pointed me to https://savvycan.com/ which might have a file format conversion for it. |
As "requested" by @JohnLussmyer one of the missing J1939 protocol should be added. I have little to no knowledge about the protocol, so any reference code would be helpful to implement it. I assume it would be similar to the RAW channel.
The text was updated successfully, but these errors were encountered: