- boot config 편집기 열기
sudo nano /boot/config.txt
- 명령어 추가 (띄어쓰기 조심. 복사해서 할 것)
dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=12000000,interrupt=25,spimaxfrequency=2000000
- 재부팅
sudo reboot
- 설치
sudo apt-get install can-utils
- CAN 장비 연결 확인
sudo ifconfig -a | grep can
- CAN bitrate 설정
sudo ip link set can0 down
sudo ip link set can0 up type can bitrate 500000
- CAN 데이터 확인(test => $ cansend can0 100#1122334455667788)
candump can0