apt-get install libsocketcan2 apt-get install libsocketcan-doc
sudo vi /etc/modules i2c-bcm2708 i2c-dev
sudo apt-get install python-pip sudo pip install python-can
sudo vi /boot/config.txt dtparam=spi=on dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25,spimaxfrequency=1000000
sudo reboot dmesg | grep -i '\(can\|spi\)'
sudo apt-get install libsdl2-dev sudo apt-get install cmake
Example libraries, headers, and example code are at:
https://github.com/CrossTheRoadElec/Phoenix-Linux-SocketCAN-Example
wget https://github.com/CrossTheRoadElec/Phoenix-Linux-SocketCAN-Example/archive/master.zip unzip -l master.zip cd Phoenix-Linux-SocketCAN-Example-master sudo cp -R include/* /usr/local/include sudo cp lib/raspberry/* /usr/local/lib/ chmod 755 build.sh chmod 755 clean.sh ./build.sh