Linux CAN bus: Difference between revisions

From Variscite Wiki
(Created page with "{{PageHeader|DART-6UL - Can-bus}} {{DocImage|category1=DART-6UL|category2=Yocto}} __toc__ Starting Release 4 of the Yocto Canbus is integrated into the system. No patch requir...")
 
No edit summary
Line 1: Line 1:
{{PageHeader|DART-6UL - Can-bus}} {{DocImage|category1=DART-6UL|category2=Yocto}} __toc__
{{PageHeader|DART-6UL - CAN bus}} {{DocImage|category1=DART-6UL|category2=Yocto}} __toc__
Starting Release 4 of the Yocto Canbus is integrated into the system. No patch required.
Starting Release 4 of Yocto, CAN bus is integrated into the system. No patch required.


#Connect 2 boards. Each board JP26 connect to the other with the right cable.<br>
#Connect 2 boards. Each board JP26 connect to the other with the right cable.<br>


Set up the 2 boards by running on each of them:<br>  
Set up the 2 boards by running on each of them:<br>  
<pre>$ ip link set can0 up type can bitrate 125000
<pre>
</pre>  
$ ip link set can0 up type can bitrate 125000
</pre>
 
On board #1:<br>  
On board #1:<br>  
<pre>$ cansniffer can0
<pre>
</pre>  
$ cansniffer can0
</pre>
 
On board #2:<br>  
On board #2:<br>  
<pre>$ cansend can0 500#1E.10.10
<pre>
$ cansend can0 500#1E.10.10
</pre>
</pre>

Revision as of 10:08, 4 September 2016

DART-6UL - CAN bus

Starting Release 4 of Yocto, CAN bus is integrated into the system. No patch required.

  1. Connect 2 boards. Each board JP26 connect to the other with the right cable.

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

$ ip link set can0 up type can bitrate 125000

On board #1:

$ cansniffer can0

On board #2:

$ cansend can0 500#1E.10.10