Linux CAN bus: Difference between revisions

From Variscite Wiki
No edit summary
No edit summary
Line 2: Line 2:
{{DocImage|category1=Yocto|category2=VAR-SOM-MX6}}[[Category:DART-6UL]] [[Category:VAR-SOM-MX7]]
{{DocImage|category1=Yocto|category2=VAR-SOM-MX6}}[[Category:DART-6UL]] [[Category:VAR-SOM-MX7]]


Connect 2 boards with the right cable.<br>
Connect 2 boards with the appropriate cable.<br>


Set up the 2 boards by running on each of them:<br>  
Set up the boards by running the following on each of them:<br>  
<pre>
<pre>
$ ip link set can0 up type can bitrate 125000
$ ip link set can0 up type can bitrate 125000
</pre>
</pre>


Then:<br>
On board #1:<br>  
On board #1:<br>  
<pre>
<pre>

Revision as of 06:39, 23 January 2018

CAN bus

Connect 2 boards with the appropriate cable.

Set up the boards by running the following on each of them:

$ ip link set can0 up type can bitrate 125000

Then:
On board #1:

$ cansniffer can0

On board #2:

$ cansend can0 500#1E.10.10