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]] [[Category:DART-MX8M]] [[Category:DART-MX8M-MINI]] [[Category:VAR-SOM-MX8X]] [[Category:VAR-SOM-MX8]] | {{DocImage|category1=Yocto|category2=VAR-SOM-MX6}}[[Category:DART-6UL]] [[Category:VAR-SOM-MX7]] [[Category:DART-MX8M]] [[Category:DART-MX8M-MINI]] [[Category:VAR-SOM-MX8X]] [[Category:VAR-SOM-MX8]] | ||
Connect | Connect two boards like the following:<br> | ||
<u>Board A</u> <u>Board B</u> | |||
CAN_H --- CAN_H | |||
CAN_L --- CAN_L | |||
GND ----- GND | |||
Set up the boards by running the following on each of them:<br> | Set up the boards by running the following on each of them:<br> | ||
# ip link set can0 up type can bitrate 125000 | |||
Then:<br> | Then:<br> | ||
On board | On board A:<br> | ||
# candump can0 | |||
On board | On board B:<br> | ||
# cansend can0 500#1E.10.10 | |||
Revision as of 12:52, 29 December 2019
CAN bus
Connect two boards like the following:
Board A Board B CAN_H --- CAN_H CAN_L --- CAN_L GND ----- GND
Set up the boards by running the following on each of them:
# ip link set can0 up type can bitrate 125000
Then:
On board A:
# candump can0
On board B:
# cansend can0 500#1E.10.10