Closed junh-ki closed 3 years ago
RaspPi Setup $ sudo apt-get install can-utils $ git clone https://github.com/seeed-Studio/pi-hats $ cd pi-hats/CAN-HAT $ sudo ./install.sh $ sudo reboot
$ dmesg | grep spi
[ 3.725586] mcp25xxfd spi0.0 can0: MCP2517 successfully initialized. [ 3.757376] mcp25xxfd spi1.0 can1: MCP2517 successfully initialized.
Linux Setup $ sudo apt-get install can-utils
PEAK-USB--------------------120ohm--------------------CAN wire--------------------120ohm--------------------RaspPi
(Linux) $ sudo ip link set can0 up type can bitrate 1000000 restart-ms 1000 fd off
(RaspPi) $ sudo ip link set can0 up type can bitrate 1000000 restart-ms 1000 fd off
(RaspPi) $ candump can0
(Linux) $ cangen can0 -g 500
(Linux) $ sudo ip link set can0 down $ sudo ip link set can0 up type can bitrate 1000000 dbitrate 2000000 restart-ms 1000 fd on
(RaspPi) $ sudo ip link set can0 down $ sudo ip link set can0 up type can bitrate 1000000 dbitrate 2000000 restart-ms 1000 fd on
(Linux) $ cangen can0 -g 500 -f
Setting Up
RaspPi Setup $ sudo apt-get install can-utils $ git clone https://github.com/seeed-Studio/pi-hats $ cd pi-hats/CAN-HAT $ sudo ./install.sh $ sudo reboot
$ dmesg | grep spi
Linux Setup $ sudo apt-get install can-utils
PEAK-USB--------------------120ohm--------------------CAN wire--------------------120ohm--------------------RaspPi
Tutorial A - FD off
(Linux) $ sudo ip link set can0 up type can bitrate 1000000 restart-ms 1000 fd off
(RaspPi) $ sudo ip link set can0 up type can bitrate 1000000 restart-ms 1000 fd off
(RaspPi) $ candump can0
(Linux) $ cangen can0 -g 500
Tutorial B - FD on
(Linux) $ sudo ip link set can0 down $ sudo ip link set can0 up type can bitrate 1000000 dbitrate 2000000 restart-ms 1000 fd on
(RaspPi) $ sudo ip link set can0 down $ sudo ip link set can0 up type can bitrate 1000000 dbitrate 2000000 restart-ms 1000 fd on
(RaspPi) $ candump can0
(Linux) $ cangen can0 -g 500 -f