-
Système à jour, Klipper à jour et dfu-util installé ( sudo apt-get install dfu-util )
-
Installation de CanBoot
git clone https://github.com/Arksine/CanBoot
cd CanBoot
make menuconfig
make
- Passer en DFU-mode (JUMPER; Reset + Boot; Relâcher Reset; Relâcher Boot)
lsusb
pour récupérer id de la cartedfu-util --list
pour vérifier que l'appareil est accessiblesudo dfu-util -a 0 -d 0483:df11 --dfuse-address 0x08000000:force:mass-erase -D ~/CanBoot/out/canboot.bin
- Créer fichier
/etc/network/interfaces.d/can0
avec le contenu suivant :
auto can0
iface can0 can static
bitrate 1000000
up ifconfig $IFACE txqueuelen 1024
sudo wget https://upyun.pan.zxkxz.cn/shell/can-enable -O /usr/bin/can-enable > /dev/null 2>&1 && sudo chmod +x /usr/bin/can-enable || echo "The operation failed"
sudo cat /etc/rc.local | grep "exit 0" > /dev/null || sudo sed -i '$a\exit 0' /etc/rc.local
sudo sed -i '/^exit\ 0$/i \can-enable -d can0 -b 1000000 -t 1024' /etc/rc.local
-
Reboot
-
Placer jumpers 120R sur la board
-
Config Klipper pour canboard
-
make clean && make
-
sudo service klipper stop
-
~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0
-
~/klippy-env/bin/python ~/klipper/lib/canboot/flash_can.py -i can0 -f ~/klipper/out/klipper.bin -u 5b06f23bc9ca
-
sudo service klipper start