Skip to content

ISO-TP not working on a Raspberry Pi 4 Model B #40

@andrej-hrast

Description

@andrej-hrast

Hi,
I'm experiencing an issue that I think could be related to a kernel configuration, but I would like to hear your comment about it.

I'm working on a Java project, built using Maven, that depends on your libraries javacan-core and javacan-core-armv7 (3.2.0).

The application behaves as follows:

  • RawCanChannel communication works fine between Raspberry and development board with microcontroller and vice-versa
  • IsotpCanChannel doesn't work, in particular:
    • when I invoke the method IsotpChannel.write(ByteBuffer buf) with short message (e.g. 4 bytes) the microcontroller receives the correct message
    • when I invoke the method IsotpChannel.write(ByteBuffer buf) with longer message (e.g. 11 bytes) the microcontroller receives only the first frame of message. I checked this with candump on Raspberry:
     (129.182176)  can0       1FF   [8]  10 0B 00 11 22 33 44 55
     (129.184039)  can0  0000017F   [8]  30 08 00 00 00 00 00 00
    
    after the microcontroller's response the Raspberry doesn't send next frame.
    • when I invoke the method IsotpChannel.read(ByteBuffer buf), it remains in infinite waiting. If microcontroller sends first frame of ISO-TP message Raspberry doesn't send anything back and microcontroller goes in timeout.

I think kernel modules are correctly loaded:

root@raspberrypi:~# lsmod | grep "can"
can_isotp              24576  0
can_raw                20480  0
can                    28672  2 can_isotp,can_raw
can_dev                32768  1 mcp251x

and I think the network interface is correctly configured:

root@raspberrypi:~# ip addr | grep can0
4: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP group default qlen 10

Could this be caused by some missing configuration in Java code or in O.S. configuration? Any advice is very appreciated! Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions