Skip to content

Instantly share code, notes, and snippets.

@bistory
Last active May 23, 2023 18:07
Show Gist options
  • Save bistory/7fc7ddc961eb776e12c83bde8f951830 to your computer and use it in GitHub Desktop.
Save bistory/7fc7ddc961eb776e12c83bde8f951830 to your computer and use it in GitHub Desktop.
  1. Système à jour, Klipper à jour et dfu-util installé ( sudo apt-get install dfu-util )

  2. Installation de CanBoot

git clone https://github.com/Arksine/CanBoot
cd CanBoot
make menuconfig
make
  1. Passer en DFU-mode (JUMPER; Reset + Boot; Relâcher Reset; Relâcher Boot)
  2. lsusb pour récupérer id de la carte
  3. dfu-util --list pour vérifier que l'appareil est accessible
  4. sudo dfu-util -a 0 -d 0483:df11 --dfuse-address 0x08000000:force:mass-erase -D ~/CanBoot/out/canboot.bin
  5. 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
  1. Reboot

  2. Placer jumpers 120R sur la board

  3. Config Klipper pour canboard

  4. make clean && make

  5. sudo service klipper stop

  6. ~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0

  7. ~/klippy-env/bin/python ~/klipper/lib/canboot/flash_can.py -i can0 -f ~/klipper/out/klipper.bin -u 5b06f23bc9ca

  8. sudo service klipper start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment