Unable to transfer from a physical CAN bus to another physical CAN bus
I tried to send a CAN message from a RPi with RS485/CAN Hat to another RPi withRS485/CAN Hat. I don't know why the RPi on the receiver side is unable to receive the messages. Though if i create a virtual CAN interface on the receiving RPi, it does work. Could anybody help me out with this? I'm a noob to this whole CAN/networking thing. Any advice is hugely appreciated
Hi @yazyr,
- can you send with
cangenon the physical CAN interface with the same user on the receiving Pi? - how are you determining that the Pi is not receiving anything?
Hi @mguentner
-
I tried sending a message with 'cangen' on the receiving RPi. I noticed I'm not able to receive the messages when i use 'candump'. I am unable to receive the CAN messages if I use 'cansend can0 05A#1122334455D6677' as well. I am able to receive CAN messages using 'candump' only when I connect the CANH and CANL pins from the CAN Bus with the CAN Hat. For the CAN Bus, I am using a MCP2515 module interfaced with an Arduino, running a CAN transmission code
-
Device IP - 192.168.0.2 (connected to physical CAN bus): cannelloni -I can0 -R 192.168.0.3 -r 20000 -l 20000 Device IP - 192.168.0.3 (vcan0) cannelloni -I vcan0 -R 192.168.0.2 -r 20000 -l 20000 In the above tunnel, when I use 'candump vcan0', I am able to see the CAN messages from the physical bus. But if I use 'cangen vcan0' and 'candump can0', I could not see any messages.
Thanks a lot for responding. I'm doing this for a remote vehicle diagnostics project and would love to see this work. I'm pretty sure the mistake is somewhere on my side, but I'm unable to figure out where
Regarding 1: You will only see frames on the physical canbus if your CAN bus is working correctly, i.e. CANH and CANL are connected and your transceiver is able to arbitrate on the bus.
If it cannot do that, it cannot send and you will not be able to see the frames on the interface using candump.
You will however be able on a vcan as the arbitration there virtually always succeeds.
Regarding 2: Do you have other means of capturing the bus, maybe with another CAN module? Maybe you are sending but your CAN driver somehow does not do local loopback
Can you please redo the test in 2. but with -d cubt (debugging enabled)