Repetier Server Kliper Canbus

Hello, i have a Voron with canbus toolboard on Stealthburner. I tried to configure canbus as usual. I created sudo nano /etc/network/interfaces.d/can0 and put dtoverlay=mcp2515-can0,oscillator=12000000,interrupt=25,spimaxfrequency=1000000 in config.txt file. i have: dmesg | grep -i '\(can\|spi\)'                            [    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1  smsc95xx.macaddr=DC:A6:32:A5:7F:FC vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=tty3 root=PARTUUID=0b1d44f4-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles spidev.bufsiz=8192
[    2.810426] usb 1-1.3: Product: FLY-UTOC USB to CAN adapter
[    3.542116] systemd[1]: Created slice system-wpa_supplicant.slice.
[    6.424755] CAN device driver interface
[    9.432218] mcp251x spi0.0: MCP251x didn't enter in conf mode after reset
[    9.435017] mcp251x spi0.0: Probe failed, err=110
[    9.435045] mcp251x: probe of spi0.0 failed with error -110
[  815.524443] can: controller area network core
[  815.524644] NET: Registered PF_CAN protocol family
[  815.537874] can: raw protocol


But not work......

Comments

  • So, tried all kind off setting. Canbus not work. Is normal to take 1 min to boot repetier server? Try different sd and take same time to boot. Previous build more faster......
  • I tested a reboot and it takes 40-50s depends on pi and sd card speed. Newer images use bullseye and depending on hardware connected some detections may take longer, can't say as is might differ. Especially configured hardware failing can extend times.

    With your can driver I have no experience, but from log it seems to be a problem with spi. See in /boot/config.txt there is normally
    dtparam=spi=off

    so that might be an issue.
  • For il boot time solved. For canbus i used UTOC Mellow USB to CAN. Most comand line changed with new path klipper installation. Old comand: ~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0, for testing can bus uuid. New comand? 
  • edited November 2
    Repetier said:
    I tested a reboot and it takes 40-50s depends on pi and sd card speed. Newer images use bullseye and depending on hardware connected some detections may take longer, can't say as is might differ. Especially configured hardware failing can extend times.

    With your can driver I have no experience, but from log it seems to be a problem with spi. See in /boot/config.txt there is normally
    dtparam=spi=off

    so that might be an issue.
    No mater Spi on or off not work. With original Maonsail iso canbus work with SPI off
  • Our Klipper system has Klipper under /opt/klipper/<printer slug> which is the equivalent to ~/klipper on their sample pi installation. Just note that owne ris repetierserver and not pi so we have no issues communicating with klipper.
  • If i do a manual klipper install in home/pi.....which connection must use? Serial? which path or.....
  • In server you always use the klipper socket as serial. The real serial is used by klippe rinternally and defined in your printer config. Just make sure that it is readable/writeable by repetierserver which is a known issue if klipper runs as pi and socket is /tmp/printer due to special handling of /tmp folder in newer linux distros.
  • Ok.Thanks. Which should new comand for this: ~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0 , with repetier server klipper install?

  • /opt/klipper/<printer slug>/klippy-env/bin/python /opt/klipper/<printer slug>/scripts/canbus_query.py
    I think should do

  • ok i will try. Most of the people who use kliper ,special Voron user, have now can bus toolboard. Should made more documentation about that. I think.
  • printer slug is name of the printer wright?

  • > printer slug is name of the printer wright?
    Depends on name. You see it in url how it is named if you select one of the printer pages. If you have installed it it is also the only directory in that folder, so should be easy to determine.

    Do you have a webpage describing what you try to do so I can see what it for. Have no voron so no idea what you are trying so far. Guess it is similar like the input shaping mcu so it can be used inside klipper.
  • Repetier said:
    > printer slug is name of the printer wright?
    Depends on name. You see it in url how it is named if you select one of the printer pages. If you have installed it it is also the only directory in that folder, so should be easy to determine.

    Do you have a webpage describing what you try to do so I can see what it for. Have no voron so no idea what you are trying so far. Guess it is similar like the input shaping mcu so it can be used inside klipper.
    https://www.klipper3d.org/CANBUS.html
  • Thanks. Have update dthe next manual to have a extra section describing how to call klipper scripts. As it looks this is just a one time call to get the can0 id. And the can bus greatly depends on what you use and differs anyway, so there is no one solution that works for all.
  • Solved. Works fine. I think need to put command in config to flash the klipper to the board. Some board ex Duet need flash direct....

  • AVR boards are directly flashable. Most arm boards use the file to sd card solution for which we have the firmware download. In theory they should also support dfu but that uses different start adresses to flash so you do not overwrite the sd update bootloader. For my duet board I normally also use sd card solution. 
  • Klipper documentation says 
    To flash the board, double tap the board's reset button to enter the # bootloader and then run: make flash FLASH_DEVICE=/dev/ttyACM0 for the Duet.


  • Is that the SAM51 based duet board? Yes, they have a bootloader. I will see if I can add it. Thats the same solution we already use for avr. The only thing is we wanted to only show it when it is possible and I have no idea how to tell which arm board would work that way. In installing bootloader section I found several solutions as well. On the other side more then fail it can't so if I make it clear what it will run they can decide if this works:-)
Sign In or Register to comment.