Jump to content

How to Use CAN Toolhead Boards Connected Directly to Octopus / Octopus Pro on CanBoot


Go to solution Solved by mvdveer,

Recommended Posts

On 2/25/2023 at 2:19 PM, conceptualme said:

I struggled with this for a while. The issue is most likely with the firmware, either on the Octopus or the EBB. I'd suggest restarting the whole process, reflashing both devices. Be sure you are selecting the right options in the config.

If you keep having issues, feel free to reach out to me directly. Admittedly it has been a few months since I went through this process, so I'm not as familiar with all of the small troubleshooting steps I went through, but I'm happy to re-familiarize myself with it if you need a hand. I have some old Discord chats I can probably go through and figure out exactly what I did differently to eventually get it working.

Thanks mate, ended up being user error as normal. I hadn't entered all the right details in 1 of the steps

Link to comment
Share on other sites

20 hours ago, Camos said:

next hurdle, i cant seem to find out why this is happening. has anyone got any ideas or run into this before?

I've gone back and started again from the start to make sure i hadn't missed anything and get stuck here

image.png.99d5f1a4785cf9ae936ae31428d41dfe.png

Trying running this command first. I ran into the same issue an this fixed it.   

sudo apt install python3-pip

 

Edited by Joebus
Link to comment
Share on other sites

If anyone else can't get the USB device to show up in STM32CubeProgrammer on Linux but you can see it when you run lsusb in terminal you need to run STM32CubeProgrammer as root.

Open a terminal window in ~/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin (if you installed it to the default location) then run sudo ./STM32CubeProgrammer You should see the Octopus in DFU mode show up.

Might also be the reason some people can't get it to show up in Windows as well. Try running STM32CubeProgrammer as Administrator.

 

Edit:

If you try to flash the EBB36 v1.2 in my case and you get "Failed to Download Segment" you need to downgrade STM32CubeProgrammer to version v2.10 instead of using the latest version v2.13

Edited by Akanar
Link to comment
Share on other sites

Now I'm stuck. After running python3 flash_can.py -i can0 -q  only the Octopus is detected. I have the Octopus connected and fluidd sees everything it should just the EBB36 is nowhere to be found.

I checked continuity with a multimeter at the rear of the connectors and CAN_L on Octopus is connected to CAN_L on the EBB36 Same goes for CAN_H to CAN_H. Not seeing continuity between CAN_L and CAN_H. The EBB36 has power. Not seeing any errors or dropped packets on the CAN interface. Baud rate and ports were correct when I compiled firmware. I crimped the RJ11 myself with 24AWG PTFE cable twisted in a drill going to an IGUS Chainflex umbilical cable via a molex microfit. Don't think it gets much better than that.

Not sure where to go from here. I guess I will try to start the whole process over again tomorrow if nobody has any good ideas to try.

Link to comment
Share on other sites

My issue was STM32CubeProgrammer still. Version 2.13 would fail to flash the EBB36 due to download segment failed because of a "received memory address is wrong or unsupported" error (also tried BTT pre compiled version of firmware) and version 2.10 would flash correctly according to the program but would leave both boards in a broken uncommunicative state. Also, yes I tried terrible Windows with the same exact issues.

I solved these issues by following the below guide and using dfu-util via terminal. A lot better experience regardless since you can do everything from the pi without needing to transfer files to a different computer.

https://maz0r.github.io/klipper_canbus/toolhead/sht36-42.html

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Im extending the information or rather the questions in this helpful thread.....

Its my first CANBUS test.. its all on a desk, since I felt, I dont want to run into a not working printer... so all the spare parts are helpful.

I followed the guide mention in first post. Seems all fine, yet I skipped the CANBUS setup on the SHT36V2 board, since its already there.

All followed and installed successfully, I first got a Klipper UUID and a CANBUS, and after the klipper flash on the SHT36, they both are on Klipper.

pi@VoronV24R2:~/CanBoot/scripts $ python3 flash_can.py -i can0 -q
Resetting all bootloader node IDs...
Checking for canboot nodes...
Detected UUID: 3373fb520086, Application: Klipper
Detected UUID: 0522fc173582, Application: Klipper

I adjusted my printer.cfg so it calls these mcu:

[mcu]
##  Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify
##--------------------------------------------------------------------
[mcu]
canbus_uuid: 373fb520086
[mcu EBBCan]
canbus_uuid: 0522fc173582

Yet, Klipper doesnt want to start.... 

image.png.d385794541ff1f539ed69f4de0046d2d.png

 

The ifconfig command also sends back a can0:

pi@VoronV24R2:~/CanBoot/scripts $ ifconfig
can0: flags=193<UP,RUNNING,NOARP>  mtu 16
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 128  (UNSPEC)
        RX packets 2  bytes 16 (16.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 290  bytes 1424 (1.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

No ideas anymore, for now... anyone? 

Link to comment
Share on other sites

  • Solution

The fist [mcu] is missing a 3 at the start In your printer.cfg file.

9 hours ago, Buurman said:
Detected UUID: 3373fb520086, Application: Klipper

As opposed to what you have:

9 hours ago, Buurman said:
[mcu]
canbus_uuid: 373fb520086

 

  • Thanks 1
Link to comment
Share on other sites

6 hours ago, mvdveer said:

The fist [mcu] is missing a 3 at the start In your printer.cfg file.

As opposed to what you have:

Let’s not get into the details of that to save a little bit of my sanity 😂 and self respect 🙈😆

  • Haha 1
Link to comment
Share on other sites

  • 4 weeks later...

Greetings Gentlemen!

 

I am trying to put together the config this topic is about (Octopus v1.1 F446 in canbus bridge mode and EBB36 v1.2), but I am close to tearing my hair out. Nothing on earth can make EBB36 to talk on the CAN bus...

 

Details:

I am following the PDF that was linked into this topic multiple times. I can install CanBoot and Klipper to the Octopus without issues. Installing CanBoot to the EBB6 in DFU mode was also painless. But regardless what I try, the RPi4 only lists the Octopus when querying the CAN bus...

 - Wiring: I do not have the tools to state that it is 100% OK, but as far as I can tell, both the Microfit and the RJ12 plug is OK, wire order is triple checked, should be fine. The EBB36 gets 24V, ligths up when connected.

- Octopus has CanBoot and Klipper, can be queried on CAN bus, if configured as mcu, Klipper is happy to start using it.

- EBB36 has CanBoot installed. Both CanBoot and Klipper was compiled by me (for Octopus also, freshly pulled from Github, CanBoot also), menuconfig was triple checked to use the same speed and correct pins/MHz/kB.

- The can0 interface appears to be up, when Klipper is configured to use Octopus as mcu, I can see TX/RX packet counters growing.

- The 120R jumper is in place on the EBB36, I am not aware of Octopus having such a jumper.

 

I have started from scratch 2x, first with speed of 500000, second time with 250000. But nothing. EBB36 does not show up on the CAN bus as a CanBoot device, it can not be queried for its UID.

 

Can anyone point me to the rigth direction, or give some guidance on how to troubleshoot? I'd like to keep my hair for quite a while, instead of tearing out...

 

Thanks,

Peter

Link to comment
Share on other sites

  • 1 month later...
On 5/20/2023 at 6:22 PM, rokapet said:

Greetings Gentlemen!

I am trying to put together the config this topic is about (Octopus v1.1 F446 in canbus bridge mode and EBB36 v1.2), but I am close to tearing my hair out. Nothing on earth can make EBB36 to talk on the CAN bus...

Details:

I am following the PDF that was linked into this topic multiple times. I can install CanBoot and Klipper to the Octopus without issues. Installing CanBoot to the EBB6 in DFU mode was also painless. But regardless what I try, the RPi4 only lists the Octopus when querying the CAN bus...

 - Wiring: I do not have the tools to state that it is 100% OK, but as far as I can tell, both the Microfit and the RJ12 plug is OK, wire order is triple checked, should be fine. The EBB36 gets 24V, ligths up when connected.

- Octopus has CanBoot and Klipper, can be queried on CAN bus, if configured as mcu, Klipper is happy to start using it.

- EBB36 has CanBoot installed. Both CanBoot and Klipper was compiled by me (for Octopus also, freshly pulled from Github, CanBoot also), menuconfig was triple checked to use the same speed and correct pins/MHz/kB.

- The can0 interface appears to be up, when Klipper is configured to use Octopus as mcu, I can see TX/RX packet counters growing.

- The 120R jumper is in place on the EBB36, I am not aware of Octopus having such a jumper.

I have started from scratch 2x, first with speed of 500000, second time with 250000. But nothing. EBB36 does not show up on the CAN bus as a CanBoot device, it can not be queried for its UID.

Can anyone point me to the rigth direction, or give some guidance on how to troubleshoot? I'd like to keep my hair for quite a while, instead of tearing out...

Thanks,

Peter

Hi Peter,

I have exactly the same problem! Have you eventually solved it?

Cheers,

Benjamin

Link to comment
Share on other sites

On 7/18/2023 at 9:32 AM, Bomblebiber said:

Hi Peter,

I have exactly the same problem! Have you eventually solved it?

Cheers,

Benjamin

Hi Benjamin!

I solved it by restarting the whole RPi installation from scratch. First I used vanilla Raspbian 64bit, and installed everything using KIAUH. When starting all over again, I chose MainsailOS 32bit, and everything worked from the first moment without a glitch. Don't know if it was the 64bit vs 32bit switch, or MainsailOS has some sort of magic already configured out of the box, but it did the trick. I did use KIAUH afterwards again, as I needed to add KlipperScreen to the installation, but this is not relevant to the previous issue.

 

Bests,

Peter

  • Thanks 1
Link to comment
Share on other sites

On 7/20/2023 at 9:25 AM, rokapet said:

Hi Benjamin!

I solved it by restarting the whole RPi installation from scratch. First I used vanilla Raspbian 64bit, and installed everything using KIAUH. When starting all over again, I chose MainsailOS 32bit, and everything worked from the first moment without a glitch. Don't know if it was the 64bit vs 32bit switch, or MainsailOS has some sort of magic already configured out of the box, but it did the trick. I did use KIAUH afterwards again, as I needed to add KlipperScreen to the installation, but this is not relevant to the previous issue.

Bests,

Peter

Thanks for the tip 🙂

I think I've installed raspbian 32 bit, so that shouldn't be the issue. I'll try MainsailOS then and let you know if it worked.

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
On 8/5/2022 at 3:14 PM, Demosth said:

I found this Canbus with CanBoot and Octopus excellent guide on Facebook, posted by TJ M.

Wanted to share it with the community and make it easier to find!

How to Use CAN Toolhead Boards Connected Directly to Octopus / Octopus Pro on CanBoot

  • Klipper has a new CAN bus feature, the USB to CAN bus bridge communication for Octopus boards (and other compatible MCUs).
  • This feature allows the Octopus boards (and other compatible MCUs) to act as a USB to CAN bus adapter. This replaces the need for an adapter like a Raspberry Pi CAN HAT, canable adapter, or the Bigtreetech U2C board.

image.thumb.png.4d84c3072422afc8e3f8345884615f17.png

What is CanBoot?

  • CanBoot is a custom bootloader loaded onto your Octopus and EBB board that allows users to update Klipper firmware over USB, UART, or CAN comms without physically having to access the board reset buttons or BOOT jumpers.
  • It uses the same ‘make menuconfig’ setup to configure and compile firmware.
  • CanBoot is NOT required to use the Klipper USB to CAN bus bridge comms. But I have not tested this comms feature separately.

You Will Need the Following

  • USB-A to USB-C cable
  • Power supply for Octopus and EBB toolboard (i.e. printer)
  • RJ11 or RJ12 telephone cable, crimped to connect EBB board to Octopus
    • See wiring info at end of guide. Best to setup wiring before installing software.
  • Raspberry Pi, or similar, with Klipper / Moonraker / UI installed and working
  • Computer with following software:

High Level Instructions, for Understanding

  1. Install CanBoot on Raspberry Pi, flash firmware to boards
    1. Configure and compile CanBoot firmware for Octopus / Pro and EBB
    2. Flash CanBoot to boards using STM32CubeProgrammer and computer
  2. Setup boards for Klipper
    1. Octopus - Setup Klipper for USB to CAN bus bridge, with CAN comms to EBB
    2. EBB - Setup Klipper for CAN comms
    3. Find serial device for Octopus / Pro on Raspberry Pi
    4. Flash Klipper to Octopus / Pro with CanBoot serial command
  3. Setup can0 network on Raspberry Pi, power cycle printer
  4. Find CAN uuid for Boards a. Connect EBB to Octopus / Pro, power cycle printer
  5. Flash Klipper to EBB board with CanBoot CAN command
  6. Printer Config Update and General Tips
  7. How to Use CanBoot to update boards, Tips

Okay, enough talking! Let’s get started!

(download the FULL 25 Page guide below!

How to Use CAN Toolhead Boards Connected Directly to Octopus.pdfUnavailable

Can someone please share the document to get connected? It appears to be unavailable.

Link to comment
Share on other sites

  • 1 month later...

I do want to mention that the manual in the first post doesnt work anymore, this because of updates on the software.

I have build about 8 Vorons with Canbus following that guide, but the last one just didnt want to detect my canbus MCU.

After a few hours of checking wires and re-firmwaring everything 5 times... I came to the conclusion something must have changed in the software, and yes.

I followed this github page(s) and that worked like a charm, also, I like not to need to connect the board to my computer anymore. 

https://github.com/Esoterical/voron_canbus/blob/main/mainboard_flashing/README.md

There are seperate pages there for details on your specific Board and Toolhead, you may have to switch around a bit.

The part on creating the can0 network was on the main page, a bit strange place to put it, but very needed.

The whole CANBUS part is now called KATAPULT, also the folders and commands used, it should be backwards compatible, but I noticed its not, so just use KATAPULT now.

 

Link to comment
Share on other sites

Just in time !

Was about to start experimenting with CANBUS, and always read such tutorials from the end to the begining, just in case...
Could you please confirm (or not...) that this is a viable setup : Pi connected to Octopus UART1 (PA9/PA10) @2Mbps (seems to be working fine, but on a non functionnal printer : no motors etc...., ) ; I want to do UART1 to CAN, the only device on the network being a EBB36.

After flashing Katapult, will flashing using the Octopus SD card still be possible ? Seems to me it's supported, did you test it ? This is how I flashed Klipper, I find it is the most convenient method.

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...

From pdf: "I run: ... CanBoot throws an error. If I try ifconfig, the can0 network is down ..."

That "forcing via can upgrade to cause board go into a state where /dev/serial/... becomes available" can be replaced with cleaner version:

python3 ~/katapult/scripts/flashtool.py -i can0 -r -u OCTO_UUID

Above nicely asks octopus board fw to switch into bootloader mode, then device file:

/dev/serial/by-id/*katapult*${OCTO_SERIAL}* (or ...by-id/*CanBoot*... if using older canboot firmware)

becomes available.

 

My klipper upgrade script:

#!/bin/sh

set -e
set +x

OCTO_UUID="6bfcb0dff7fe"
OCTO_SERIAL="24000F100120304E35313720"
SB2209_UUID="303bace72bab"

# flashtool.py -i can0 -q

echo "Building klipper for octopus board"
cd ~/klipper
cp -a .config-octobus-board .config
make OUT=out-octo/ clean
make OUT=out-octo/ -j4

# Recovery: to force octopus board into katapult mode press reset button on octopus board twice. Diode should blink.

echo "Upgrading klipper on octopus board"
sudo systemctl stop klipper
# switch into bootloader mode if not switched already
ip l show dev can0 && python3 ~/katapult/scripts/flashtool.py -i can0 -r -u "${OCTO_UUID}" && sleep 5
# flash klipper
python3 ~/katapult/scripts/flashtool.py -d /dev/serial/by-id/*katapult*${OCTO_SERIAL}* -f ~/klipper/out-octo/klipper.bin
sudo systemctl start klipper



echo "Building klipper for sb2209 toolhead board"
cd ~/klipper
cp -a .config-sb2209-board .config
make OUT=out-sb2209/ clean
make OUT=out-sb2209/ -j4

echo "Upgrading klipper on sb2209 board over canbus"
sudo systemctl stop klipper
python3 ~/katapult/scripts/flashtool.py -i can0 -f ~/klipper/out-sb2209/klipper.bin -u "${SB2209_UUID}"
sudo systemctl start klipper

 

Edited by arek
Link to comment
Share on other sites

  • 5 weeks later...
On 1/24/2023 at 11:20 AM, Christian Lingner said:

I figured it out. It was a false configurated pin in the adxl345 section of my config. Now is the EBB36 working well and I'm happy.

Hey uh, i am having this exact same issue, PB13 on EBB36 is reserved for SPI2. It's a headache.

Even commenting out the ADXL completely, I still get this issue. What does your config look like?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...