8,367
edits
Changes
→Use the CANalyst-II analyzer to test sending and receiving messages
<p>[[File:media/image322.png|165x134px]]</p></li>
<li><p>CANalyst-II analyzer data download link</p>
<li><p>First install the software USBCANToolSetup</p>
<p>[[File:media/image323.png|553x94px]]</p></li>
<ol style="list-style-type: lower-alpha;">
<li><p>a. First set the baud rate of the CAN bus to '''1000kbps''' in > the Linux system of the development board</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''sudo ip link set can0 down'''</p>
<p>orangepi@orangepi:~$ '''sudo ip link set can0 type can bitrate 1000000'''</p>
<p>orangepi@orangepi:~$ '''sudo ip link set can0 up'''</p>|}</li>
<li><p>Then run the '''candump can0''' command to prepare to receive > messages</p>
{| class="wikitable" style="width:800px;" |-|<p>orangepi@orangepi:~$ '''sudo candump can0'''</p>|}</li>
<li><p>Then send a message to the development board in the USB-CAN > software</p>
<p>[[File:media/image333.png|553x188px]]</p></li>
<li><p>If the message sent by the analyzer can be received in the > development board, it means that the CAN bus can be used > normally</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi5plus:~$ '''sudo candump can0'''</p>
<p>''' can0 001 [8] 01 02 03 04 05 06 07 08'''</p>|}</li></ol>
</li>
<li><p>Development board sends CAN message test</p>
<ol style="list-style-type: lower-alpha;">
<li><p>a. First set the CAN baud rate to '''1000kbps''' in the Linux > system</p>{| class="wikitable" style="width:800px;" |-|
<p>orangepi@orangepi:~$ '''sudo ip link set can0 down'''</p>
<p>orangepi@orangepi:~$ '''sudo ip link set can0 type can bitrate 1000000'''</p>
<p>orangepi@orangepi:~$ '''sudo ip link set can0 up'''</p>|}</li>
<li><p>Execute the '''cansend''' command on the development board and > send a message</p>
{| class="wikitable" style="width:800px;" |-|<p>orangepi@orangepi:~$ '''sudo cansend can0 123#1122334455667788'''</p>|}</li>
<li><p>If the USB-CAN software can receive the message from the > development board, the communication is successful</p>
<div class="figure">
<span id="how-to-install-and-use-wiringop-python"></span>
== How to install and use wiringOP-Python ==