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

java.lang.IllegalArgumentException: illegal AF_CAN address #19

@freggala

Description

@freggala

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions