Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.

java.lang.IllegalArgumentException: illegal AF_CAN address #19

Open
freggala opened this issue Jul 8, 2020 · 0 comments
Open

java.lang.IllegalArgumentException: illegal AF_CAN address #19

freggala opened this issue Jul 8, 2020 · 0 comments

Comments

@freggala
Copy link

freggala commented Jul 8, 2020

I haven't been working on my libsocket-can-java based project for a while and I had to update my system in the meantime. Even though I'm not sure that the issue is related to the newer kernel / system components, I suppose it's got something to do with libsocket-can-java.
Back then I was using Linux kernel 4.9.0 (Debian Stretch) and now it's kernel 5.6.14 (Debian bullseye) and can-utils 2020.02.04-3.

Whereas candump on slcan0 works fine (after slcan0 was set up using

slcan_attach -f -c -s5 -o /dev/ttyACM1
slcand /dev/ttyACM1 slcan0
ifconfig slcan0 up

)

CanSocket socket = new CanSocket( Mode.RAW );
CanInterface canif = new CanInterface( socket, socket_name );
socket.bind( canif );
CanSocket.CanFrame frame = socket.recv();

(simplified) fails using an IllegalArgumentException:

java.lang.IllegalArgumentException: illegal AF_CAN address
	at de.entropia.can.CanSocket._recvFrame(Native Method)
	at de.entropia.can.CanSocket.recv(CanSocket.java:400)

I'm having a hard time finding out whether this is a bug or mistake on my side. Thus I'm hoping for your help.
Thanks a million!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant