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
1
login as: debian
2
Pre-authentication banner message from server:
3
| Debian GNU/Linux 9
4
|
5
| BeagleBoard.org Debian Image 2019-08-03
6
|
7
| Support/FAQ: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian
8
|
9
| default username:password is [debian:temppwd]
10
|
11
End of banner message from server
12
[email protected]'s password:
13
​
14
The programs included with the Debian GNU/Linux system are free software;
15
the exact distribution terms for each program are described in the
16
individual files in /usr/share/doc/*/copyright.
17
​
18
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
19
permitted by applicable law.
20
[email protected]:~$ sudo ip link set can0 type can bitrate 250000
21
[sudo] password for debian:
22
[email protected]:~$ sudo ifconfig can0 up
23
[email protected]:~$ candump can0
24
can0 01A [8] 11 22 33 44 AA BB CC DD
25
can0 01A [8] 11 22 33 44 AA BB CC DD
26
can0 01A [8] 11 22 33 44 AA BB CC DD
27
can0 01A [8] 11 22 33 44 AA BB CC DD
28
can0 01A [8] 11 22 33 44 AA BB CC DD
29
can0 01A [8] 11 22 33 44 AA BB CC DD
30
can0 01A [8] 11 22 33 44 AA BB CC DD
31
can0 01A [8] 11 22 33 44 AA BB CC DD
32
can0 01A [8] 11 22 33 44 AA BB CC DD
33
can0 01A [8] 11 22 33 44 AA BB CC DD
34
can0 01A [8] 11 22 33 44 AA BB CC DD
35
can0 01A [8] 11 22 33 44 AA BB CC DD
36
^[email protected]:~cansend can0 01a#11223344AABBCCDD
37
[email protected]:~$ cansend can0 01a#11223344AABBCCDD
38
[email protected]:~$ cansend can0 01a#11223344AABBCCDD
39
[email protected]:~$ cansend can0 01a#11223344AABBCCDD
40
[email protected]:~$ cansend can0 01a#11223344AABBCCDD
41
[email protected]:~$ cansend can0 01a#11223344AABBCCDD
42
[email protected]:~$ cansend can0 01a#11223344AABBCCDD
43
[email protected]:~$ cansend can0 01a#11223344AABBCCDD
44
[email protected]:~$ cansend can0 01a#11223344AABBCCDD
45
[email protected]:~$ cansend can0 01a#11223344AABBCCDD
Copied!
1
login as: debian
2
Pre-authentication banner message from server:
3
| Debian GNU/Linux 9
4
|
5
| BeagleBoard.org Debian Image 2019-08-03
6
|
7
| Support/FAQ: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian
8
|
9
| default username:password is [debian:temppwd]
10
|
11
End of banner message from server
12
[email protected]'s password:
13
​
14
The programs included with the Debian GNU/Linux system are free software;
15
the exact distribution terms for each program are described in the
16
individual files in /usr/share/doc/*/copyright.
17
​
18
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
19
permitted by applicable law.
20
[email protected]:~$ sudo ip link set can1 type can bitrate 250000
21
[sudo] password for debian:
22
[email protected]:~$ sudo ifconfig can1 up
23
[email protected]:~$ cansend can1 01a#11223344AABBCCDD
24
[email protected]:~$ cansend can1 01a#11223344AABBCCDD
25
[email protected]:~$ cansend can1 01a#11223344AABBCCDD
26
[email protected]:~$ cansend can1 01a#11223344AABBCCDD
27
[email protected]:~$ cansend can1 01a#11223344AABBCCDD
28
[email protected]:~$ cansend can1 01a#11223344AABBCCDD
29
[email protected]:~$ cansend can1 01a#11223344AABBCCDD
30
[email protected]:~$ cansend can1 01a#11223344AABBCCDD
31
[email protected]:~$ cansend can1 01a#11223344AABBCCDD
32
[email protected]:~$ cansend can1 01a#11223344AABBCCDD
33
[email protected]:~$ cansend can1 01a#11223344AABBCCDD
34
[email protected]:~$ cansend can1 01a#11223344AABBCCDD
35
[email protected]:~$ candump can1
36
can1 01A [8] 11 22 33 44 AA BB CC DD
37
can1 01A [8] 11 22 33 44 AA BB CC DD
38
can1 01A [8] 11 22 33 44 AA BB CC DD
39
can1 01A [8] 11 22 33 44 AA BB CC DD
40
can1 01A [8] 11 22 33 44 AA BB CC DD
41
can1 01A [8] 11 22 33 44 AA BB CC DD
42
can1 01A [8] 11 22 33 44 AA BB CC DD
43
can1 01A [8] 11 22 33 44 AA BB CC DD
44
can1 01A [8] 11 22 33 44 AA BB CC DD
45
can1 01A [8] 11 22 33 44 AA BB CC DD
46
​
Copied!
Last modified 1yr ago
Export as PDF
Copy link