CAN/en: различия между версиями

Новая страница: «* Show incoming packets: *:<syntaxhighlight lang="bash"> candump can0 </syntaxhighlight>»
(Новая страница: «==== Using standard linux tools (manually) ====»)
(Новая страница: «* Show incoming packets: *:<syntaxhighlight lang="bash"> candump can0 </syntaxhighlight>»)
Строка 34: Строка 34:
</syntaxhighlight>
</syntaxhighlight>


== Работа с CAN ==
== Working with CAN ==


Утилиты <code>cansend</code> и <code>candump</code> есть в стандартном наборе ПО контроллера. Если по каким-то причинам их нет, можно поставить пакет <code>can-utils</code>:
The <code>cansend</code> and <code>candump</code> utilities are included in the controller's standard software package. If for some reason they are not there, you can install the <code>can-utils</code> package:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
apt update && apt install can-utils
apt update && apt install can-utils
</syntaxhighlight>
</syntaxhighlight>


Примеры команд:
Command examples:
* Отправка четырех байт c адресом 123:
* Sending four bytes with address 123:
*:<syntaxhighlight lang="bash">
*:<syntaxhighlight lang="bash">
cansend can0 123#DEADBEEF
cansend can0 123#DEADBEEF
</syntaxhighlight>
</syntaxhighlight>


* Показывать входящие пакеты:
* Show incoming packets:
*:<syntaxhighlight lang="bash">
*:<syntaxhighlight lang="bash">
candump can0
candump can0
translator, wb_editors
4285

правок