I'm using a Beaglebone Black with two CAN interfaces as SocketCAN. How can I link i.e the interface can0 to my hardware DCAN0? I need to use both sockets parallel but didn't find to configure the interfaces.
Asked
Active
Viewed 1,077 times
0
-
Could you add `ip addr` output to your question? I.e. can you see both `can0` and `can1` interfaces? – yegorich Nov 16 '17 at 11:05
-
Yes, I can see both interfaces and can receive packets on both, but can only transmit on can0. Now I have DCAN0 on can0 and DCAN1 on can1, because I enabled the interfaces in this order. My question is now, where the interfaces know, on which can (DCAN0 or DCAN1) they have to send. – Alex Rabenstein Nov 16 '17 at 13:39
-
I think this depends on your Device Tree source file. If you have only one CAN interface either DCAN0 or DCAN1 you'll get `can0`. If you have both, then you'll get DCAN0 assigned to `can0` and DCAN1 assigned to `can1` automatically. So sending on `can1` would send the packets to DCAN1. – yegorich Nov 16 '17 at 14:02
1 Answers
0
You can check the mapping of interfaces to devices via
ls -la /sys/class/*
while using the corresponding subdirectory for your CAN device.
Ethernet devices for example are listed in /sys/class/net/
, terminal emulators/devices in /sys/class/tty/
, etc.

JHeim
- 1