I’m trying to run OSMC as Media Center in my car. For a better control I’m using a CAN module (PiCAN2). Only problem is that I’m not able to get the CAN module working on OSMC while its perfectly working on Raspbian.
I already enabled SPI in the settings and added following lines to the boot/config.txt:
Some say you should not use “-overlay” so I also tried without it, but it’s still not working while its perfectly working on Raspbian.
On of the problems is, that /sbin/ip is not available, according to the guide for installing a PiCAN2 on a RPi you need to use the following command to enable the board:
sudo /sbin/ip link set can0 up type can bitrate 100000
Therefore I used "apt-get install iproute2 so I can use /sbin/ip but I guess this is not the right way. When I execute the command I simply get a message, that can0 device can not be found.
Is all of this somehow related to connman? Is there any workaround to enable the can0 interface in OSMC? Would be supercool, as I don’t want to switch back to Raspbian but if it is not possible to get this working I have no other choice
I’ve not used a Pican2 or similar device, but I think the first here is to find if osmc is seeing it; so I can help with this:
Can you please provide debugging logs, details of this can be found here. This will at least show if your changes to config.txt, have been picked up by OSMC.
Also if you do an ifconfig is can0 (or something similar in the list)
glad that you are trying to help me out here. I did a fresh install and what I noticed was, that after I enabled SPI in myOSMC there was already an entry called “dtoverlay=spi-bcm2835-overlay” there in /boot/config.txt, Sadly situation is still the same, as soon as I run sudo /sbin/ip link set can0 up type can bitrate 100000
i get an error "Cannot find device “can0”. ifconfig is therefore not containing a can0 interface and dmesg | grep can doesn’t give me any results either.
I just saw that I was not on the latest version as the installer still ships 2017.3-1 as latest version so I updated to 2017.4-1 manually. Sadly this doesn’t fix the problem, tried all of the above but result is still the same