I got a PICAN-M hat for a Pi 4 running BlueOS v1.3.1 for connecting NMEA 2k & 0183 sensors.
Following the setup manual, I’ve run into a couple issues:
- The PICAN-M requires can-utils to be installed on the Pi. Using
sudo apt-get install can-utils
gives an error
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
can-utils
0 upgraded, 1 newly installed, 0 to remove and 171 not upgraded.
Need to get 118 kB of archives.
After this operation, 492 kB of additional disk space will be used.
Get:1 http://raspbian.freemirror.org/raspbian bullseye/main armhf can-utils armhf 2020.11.0-1 [118 kB]
Err:1 http://raspbian.freemirror.org/raspbian bullseye/main armhf can-utils armhf 2020.11.0-1
File has unexpected size (1154 != 118016). Mirror sync in progress? [IP: 199.59.243.227 80]
Hashes of expected file:
- SHA256:29976f1d9f355665534c1105934e938d3c5e574ab05ed060302d5d304abcc8c6
- SHA1:1fe710a1783cc866d6d80409c99ebb32118d832d [weak]
- MD5Sum:7329bebf82eed3d599595b617a132c26 [weak]
- Filesize:118016 [weak]
E: Failed to fetch http://raspbian.freemirror.org/raspbian/pool/main/c/can-utils/can-utils_2020.11.0-1_armhf.deb File has unexpected size (1154 != 118016). Mirror sync in progress? [IP: 199.59.243.227 80]
Hashes of expected file:
- SHA256:29976f1d9f355665534c1105934e938d3c5e574ab05ed060302d5d304abcc8c6
- SHA1:1fe710a1783cc866d6d80409c99ebb32118d832d [weak]
- MD5Sum:7329bebf82eed3d599595b617a132c26 [weak]
- Filesize:118016 [weak]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
- After adding the required lines to the /boot/config.txt file, the can0 interface doesn’t appear in ifconfig. It seems likely that the BlueOS configurations would interfere with the changes, but I’m not familiar with the boot config.
Lines added to the end of the boot config:
enable_uart=1
dtparam=i2c_arm=on
dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25
I’m troubleshooting the can0 interface first.
Any help is appreciated!