P1 CAN Loopback

Send a CAN frame on CAN0 and receive it on CAN1, and vice versa, but this time with P1!

Items Used

OBD3way Setup

CAN0H to CAN1H and CAN0L to CAN1L and place a termination resistor across these connections; see photos below for setup.

Test

Once everything is hooked up, we power up P1, and SSH into P1 in two windows at: 192.168.7.2 to control each CAN channel at the same time.

Below you can see each session. Note that you'll want to send the "candump ..." command before sending the "cansend ..." command in the other window.

CAN0 Terminal
CAN1 Terminal
CAN0 Terminal
login as: debian
Pre-authentication banner message from server:
| Debian GNU/Linux 9
|
| BeagleBoard.org Debian Image 2019-08-03
|
| Support/FAQ: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian
|
| default username:password is [debian:temppwd]
|
End of banner message from server
[email protected]'s password:
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
[email protected]:~$ sudo ip link set can0 type can bitrate 250000
[sudo] password for debian:
[email protected]:~$ sudo ifconfig can0 up
[email protected]:~$ candump can0
can0 01A [8] 11 22 33 44 AA BB CC DD
can0 01A [8] 11 22 33 44 AA BB CC DD
can0 01A [8] 11 22 33 44 AA BB CC DD
can0 01A [8] 11 22 33 44 AA BB CC DD
can0 01A [8] 11 22 33 44 AA BB CC DD
can0 01A [8] 11 22 33 44 AA BB CC DD
can0 01A [8] 11 22 33 44 AA BB CC DD
can0 01A [8] 11 22 33 44 AA BB CC DD
can0 01A [8] 11 22 33 44 AA BB CC DD
can0 01A [8] 11 22 33 44 AA BB CC DD
can0 01A [8] 11 22 33 44 AA BB CC DD
can0 01A [8] 11 22 33 44 AA BB CC DD
^[email protected]:~cansend can0 01a#11223344AABBCCDD
[email protected]:~$ cansend can0 01a#11223344AABBCCDD
[email protected]:~$ cansend can0 01a#11223344AABBCCDD
[email protected]:~$ cansend can0 01a#11223344AABBCCDD
[email protected]:~$ cansend can0 01a#11223344AABBCCDD
[email protected]:~$ cansend can0 01a#11223344AABBCCDD
[email protected]:~$ cansend can0 01a#11223344AABBCCDD
[email protected]:~$ cansend can0 01a#11223344AABBCCDD
[email protected]:~$ cansend can0 01a#11223344AABBCCDD
[email protected]:~$ cansend can0 01a#11223344AABBCCDD
CAN1 Terminal
login as: debian
Pre-authentication banner message from server:
| Debian GNU/Linux 9
|
| BeagleBoard.org Debian Image 2019-08-03
|
| Support/FAQ: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian
|
| default username:password is [debian:temppwd]
|
End of banner message from server
[email protected]'s password:
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
[email protected]:~$ sudo ip link set can1 type can bitrate 250000
[sudo] password for debian:
[email protected]:~$ sudo ifconfig can1 up
[email protected]:~$ cansend can1 01a#11223344AABBCCDD
[email protected]:~$ cansend can1 01a#11223344AABBCCDD
[email protected]:~$ cansend can1 01a#11223344AABBCCDD
[email protected]:~$ cansend can1 01a#11223344AABBCCDD
[email protected]:~$ cansend can1 01a#11223344AABBCCDD
[email protected]:~$ cansend can1 01a#11223344AABBCCDD
[email protected]:~$ cansend can1 01a#11223344AABBCCDD
[email protected]:~$ cansend can1 01a#11223344AABBCCDD
[email protected]:~$ cansend can1 01a#11223344AABBCCDD
[email protected]:~$ cansend can1 01a#11223344AABBCCDD
[email protected]:~$ cansend can1 01a#11223344AABBCCDD
[email protected]:~$ cansend can1 01a#11223344AABBCCDD
[email protected]:~$ candump can1
can1 01A [8] 11 22 33 44 AA BB CC DD
can1 01A [8] 11 22 33 44 AA BB CC DD
can1 01A [8] 11 22 33 44 AA BB CC DD
can1 01A [8] 11 22 33 44 AA BB CC DD
can1 01A [8] 11 22 33 44 AA BB CC DD
can1 01A [8] 11 22 33 44 AA BB CC DD
can1 01A [8] 11 22 33 44 AA BB CC DD
can1 01A [8] 11 22 33 44 AA BB CC DD
can1 01A [8] 11 22 33 44 AA BB CC DD
can1 01A [8] 11 22 33 44 AA BB CC DD
Edit on GitHub