# Issues with CANable

**URL:** <https://klipper.discourse.group/t/issues-with-canable/7970>\
**Category:** General Discussion\
**Created:** [April 21, 2023, 7:54pm UTC](https://klipper.discourse.group/t/issues-with-canable/7970 "2023-04-21T19:54:51Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![hcet14](https://avatars.discourse-cdn.com/v4/letter/h/ecd19e/32.png) [@hcet14](https://klipper.discourse.group/u/hcet14)\
**Post date:** [April 23, 2023, 11:41am UTC](https://klipper.discourse.group/t/issues-with-canable/7970/21 "2023-04-23T11:41:12Z")

</div>

My impression is, there are still some unexplained phenomenons concerning CAN and Klipper.

koconnor just wrote a utility to parse Klipper messages in a candump capture [Comparing master...work-parsecandump-20230417 · Klipper3d/klipper · GitHub](https://github.com/Klipper3d/klipper/compare/work-parsecandump-20230417)  
First you need a candump.log [CANBUS Communication timeout while homing Z - #12 by koconnor](https://klipper.discourse.group/t/canbus-communication-timeout-while-homing-z/3741/12)  
To get the candump utility you need to install can-utils [Debian -- Details of package can-utils in sid](https://packages.debian.org/sid/can-utils)

Good luck, hcet14

---

<div class="post-metadata">

**Author:** ![laukejas](https://avatars.discourse-cdn.com/v4/letter/l/a587f6/32.png) [@laukejas](https://klipper.discourse.group/u/laukejas)\
**Post date:** [April 23, 2023, 12:00pm UTC](https://klipper.discourse.group/t/issues-with-canable/7970/22 "2023-04-23T12:00:07Z")

</div>

Thank you, I will attempt this. For clarity, am I supposed to run the dump utility right after the printer loses connection with can0? I tested this tool out with `candump -t z -Ddex can0,#FFFFFFFF`, and it just slowly prints memory contents to the terminal. Is it going to eventually write them to a file?

---

<div class="post-metadata">

**Author:** ![hcet14](https://avatars.discourse-cdn.com/v4/letter/h/ecd19e/32.png) [@hcet14](https://klipper.discourse.group/u/hcet14)\
**Post date:** [April 23, 2023, 12:20pm UTC](https://klipper.discourse.group/t/issues-with-canable/7970/23 "2023-04-23T12:20:03Z")

</div>

> [@laukejas](#):
>
> For clarity, am I supposed to run the dump utility right after the printer loses connection with can0?

No, just start logging to the candump.log file. You will need this file to use parsecandump.py.  
Here is an informative video [https://www.youtube.com/watch?v=ef4akXEDKOQ](https://www.youtube.com/watch?v=ef4akXEDKOQ) about candump. You may also find a lot here in the forum. Many people have some problems with CAN bus.

---

<div class="post-metadata">

**Author:** ![laukejas](https://avatars.discourse-cdn.com/v4/letter/l/a587f6/32.png) [@laukejas](https://klipper.discourse.group/u/laukejas)\
**Post date:** [April 23, 2023, 12:42pm UTC](https://klipper.discourse.group/t/issues-with-canable/7970/24 "2023-04-23T12:42:45Z")

</div>

Okay, I got the dump, attaching it. How do I use that parsecandump.py? It requires more arguments than just the dump file, I can’t find any documentation on this tool.  
[candump-2023-04-23\_153346.log](https://klipper.discourse.group/uploads/short-url/vOsllD2ZsQZ3PlXiBfWggoLpJRm.log) (449.2 KB)

EDIT: It says it requires can ID and something called mcu.dict, but I have no idea where to get that.

---

<div class="post-metadata">

**Author:** ![mykepredko](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/mykepredko/32/2085_2.png) [@mykepredko](https://klipper.discourse.group/u/mykepredko)\
**Post date:** [April 23, 2023, 2:13pm UTC](https://klipper.discourse.group/t/issues-with-canable/7970/25 "2023-04-23T14:13:28Z")

</div>

You have a **LOT** of macros and if you “picked them up from various places” then I would be very surprised if you have any idea what’s going on with them and how they interact. When I tried reading your klippy.log, there are things that don’t make sense, like setting max\_velocity to 500 (along with your acceleration/deceleration/square corner velocity/etc.) repeatedly before starting your QGL.

Could I suggest that you eliminate essentially all of them and start working through the operation of the printer to eliminate the chance there is a macro problem before assuming you have a CAN problem or any other problem?

---

<div class="post-metadata">

**Author:** ![laukejas](https://avatars.discourse-cdn.com/v4/letter/l/a587f6/32.png) [@laukejas](https://klipper.discourse.group/u/laukejas)\
**Post date:** [April 23, 2023, 2:29pm UTC](https://klipper.discourse.group/t/issues-with-canable/7970/26 "2023-04-23T14:29:25Z")

</div>

I think I have a decent understanding of how they work, and I included them for a reason. But sure, I can do what you suggested. Can you tell me specifically what I should do? Because right now, I just boot up the printer, press Home All in the Mainsail interface, then run QGL - and bam, I get shutdown due to loss of connection with can. So basically I’m just running two commands, and none of these macros should be called. They are listed in the klippy.log, but they aren’t called I think. So let me know what I need to change for the testing and I’ll do it.

---

<div class="post-metadata">

**Author:** ![mykepredko](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/mykepredko/32/2085_2.png) [@mykepredko](https://klipper.discourse.group/u/mykepredko)\
**Post date:** [April 23, 2023, 3:14pm UTC](https://klipper.discourse.group/t/issues-with-canable/7970/27 "2023-04-23T15:14:31Z")

</div>

Based on your previous posts and what I see in the klippy.log and what you’ve shared you’re doing an awful lot more than just basically “just running two commands”. When I look at your klippy.log, there’s a lot of commands executing I don’t understand the purpose of and you’re not paying me enough to figure them out.

You want to know what I think you need to change for testing? In looking at the `printer.cfg`, I would say start by taking out/commenting out the following lines:

```auto
[include stealthburner_leds.cfg]
[include purge_macro.cfg]
[include tones.cfg]
[include movement_macros.cfg]
[include calibration_macros.cfg]
[include toolhead_btt_ebbcan_G0B1_v1.2.cfg]

```

Which is basically literally everything but the basic `mainsail.cfg` macros (virtual\_sdcard, PAUSE, RESUME, etc.).

Next, in `printer.cfg`, remove/comment out everything after “# Macros” including `[include klicky-probe.cfg]` When I look at `klicky-probe.cfg` I see:

```auto
#Simple way to include all the various klicky macros and configurations
# the current home for this configuration is https://github.com/jlas1/Klicky-Probe, please check it

#[include ./klicky-specific.cfg] #place to put other configurations specific to your printer
[include ./klicky-variables.cfg] #Required
[include ./klicky-macros.cfg] #Required
[include ./klicky-bed-mesh-calibrate.cfg] #bed mesh, requires klipper configuration
#[include ./klicky-screws-tilt-calculate.cfg] #help adjust bed screws automatically
[include ./klicky-quad-gantry-level.cfg] #level 4 Z motors
#[include ./klicky-z-tilt-adjust.cfg] #level 2 or 3 Z motors

```

Which moves us into several more levels of macros. I should point out that several of these macros aren’t included in the .zip file you provided.

Then, when you’ve done that, put in the basic Klicky dock and undock functionality and start testing.

Sorry for being so brutal, but I want to throw up my hands when I see header comments like:

```auto
# This macro was provided by discord user Garrettwp to whom i give my thanks for sharing it with me.
# I have tweaked it a lot.
# They are based on the great Annex magprobe dockable probe macros "#Originally developed by Mental,
# modified for better use on K-series printers by RyanG and Trails", kudos to them.
# That macro as since evolved into a klipper plugin that currently is pending inclusion in klipper, 
# more information here, https://github.com/Annex-Engineering/Quickdraw_Probe/tree/main/Klipper_Macros
# User richardjm revised the macro variables and added some functions
# User sporkus added led status notifications

```

It’s like the power set up; go back to being as basic as possible, draw out the process and start working from there.

---

<div class="post-metadata">

**Author:** ![laukejas](https://avatars.discourse-cdn.com/v4/letter/l/a587f6/32.png) [@laukejas](https://klipper.discourse.group/u/laukejas)\
**Post date:** [April 23, 2023, 3:53pm UTC](https://klipper.discourse.group/t/issues-with-canable/7970/28 "2023-04-23T15:53:53Z")

</div>

I apologize for my lack of knowledge. I am very new at this, and I’m trying to learn as fast as I can. I appreciate your patience.

Okay, so I did what you told me - for now, I removed all includes except for mainsail.cfg and toolhead\_btt\_ebbcan\_G0B1\_v1.2.cfg. I commented out all macros from the printer.cfg. Didn’t even include Klicky macros yet. Left the bare minimum. After doing this, I cannot even make a full restart - Klipper gets stuck in `Klipper reports: STARTUP` blue screen for a while, and then throws `mcu 'can0': Unable to connect` again. Klippy.log keeps growing and is not resetting - meaning, at the beginning I still see logs from old tests, and the new log is just appended at the end of the file. Attaching for you to see.  
[klippy(14).log](https://klipper.discourse.group/uploads/short-url/tELfxHeJhbDEPFHy7RhOgApRfnc.log) (2.2 MB) Not even turning printer power off and on back again fixes this. I am really confused.

---

<div class="post-metadata">

**Author:** ![laukejas](https://avatars.discourse-cdn.com/v4/letter/l/a587f6/32.png) [@laukejas](https://klipper.discourse.group/u/laukejas)\
**Post date:** [April 23, 2023, 4:10pm UTC](https://klipper.discourse.group/t/issues-with-canable/7970/29 "2023-04-23T16:10:46Z")

</div>

I cleaned up printer.cfg as much as I could - removed all unnecessary comments, organized everything, moved in everything needed to boot up the printer except for mainsail.cfg (which is still included):  
[printer.cfg](https://klipper.discourse.group/uploads/short-url/9dybzzhfpO9xwp2w5Fw5FZG9QVa.cfg) (9.0 KB)

And I still get the same issue, printer is not booting due to can0:  
[klippy(16).log](https://klipper.discourse.group/uploads/short-url/uMLOlITL5arPpKhcaMPrW7qkF3J.log) (2.3 MB)

The log has one line that I didn’t notice before, or maybe it is new:  
`mcu 'can0': Unable to open CAN port: Failed to transmit: [Errno 105] No buffer space available`

Researching this now, but just letting you know.

---

<div class="post-metadata">

**Author:** ![mykepredko](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/mykepredko/32/2085_2.png) [@mykepredko](https://klipper.discourse.group/u/mykepredko)\
**Post date:** [April 23, 2023, 4:12pm UTC](https://klipper.discourse.group/t/issues-with-canable/7970/30 "2023-04-23T16:12:15Z")

</div>

Okay, what I would recommend is going through the CAN set up procedure again following something like:

> <https://github.com/rlaferla/Voron/blob/main/CAN_Bus_Guide.md>

or this video which is highly rated/go to for Vorons:

[![](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/b/bde68c43c0934e4ba8e260d50aa83533208648d1.jpeg "Introduction to CAN bus for your 3D Printer - (Voron) CANBUS") ](https://www.youtube.com/watch?v=mwpI7dCOgh0)

Hopefully things will come together from doing that and you can start moving forwards again.

---

<div class="post-metadata">

**Author:** ![laukejas](https://avatars.discourse-cdn.com/v4/letter/l/a587f6/32.png) [@laukejas](https://klipper.discourse.group/u/laukejas)\
**Post date:** [April 23, 2023, 4:21pm UTC](https://klipper.discourse.group/t/issues-with-canable/7970/31 "2023-04-23T16:21:08Z")

</div>

Okay, I went through the whole procedure again like you suggested, step by step, not missing anything. Still the same. Printer is not booting with the same error.  
[klippy(17).log](https://klipper.discourse.group/uploads/short-url/5NSjgipwWTCH37g8gsyobGG8ZUD.log) (2.3 MB)

---

<div class="post-metadata">

**Author:** ![hcet14](https://avatars.discourse-cdn.com/v4/letter/h/ecd19e/32.png) [@hcet14](https://klipper.discourse.group/u/hcet14)\
**Post date:** [April 23, 2023, 7:48pm UTC](https://klipper.discourse.group/t/issues-with-canable/7970/32 "2023-04-23T19:48:02Z")

</div>

> [@laukejas](#):
>
> Okay, I got the dump, attaching it. How do I use that parsecandump.py? It requires more arguments than just the dump file, I can’t find any documentation on this tool.

I guess there is no docu. I never used parsecandump.py. koconner stated “It works similarly to the existing klippy/parsedump.py tool”. I would look here in the documantation [Debugging - Klipper documentation](https://www.klipper3d.org/Debugging.html#extracting-information-from-the-klippylog-file)

> [@laukejas](#):
>
> EDIT: It says it requires can ID and something called mcu.dict, but I have no idea where to get that.

Line 109 in parsecandump.py says: (sorry I can’t quote the original source, discourse shows not what I write). Just have a look at the original file [https://github.com/Klipper3d/klipper/compare/work-parsecandump-20230417](https://github.com/Klipper3d/klipper/compare/work-parsecandump-20230417)  
usage = “%prog \<candump.log\> \>canid\> \<mcu.dict\>”

> [@mykepredko](#):
>
> I’m really not an expert at decoding klippy.log but I think you’re problem is being flagged at line 8127 with a `Lost communication with MCU 'can0'`.

I would take can0 for \>canid\>, but for \<mcu.dict\> I have no clue. I guess it has something to do with debugging Klipper in batch mode.

---

<div class="post-metadata">

**Author:** ![mykepredko](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/mykepredko/32/2085_2.png) [@mykepredko](https://klipper.discourse.group/u/mykepredko)\
**Post date:** [April 23, 2023, 8:04pm UTC](https://klipper.discourse.group/t/issues-with-canable/7970/33 "2023-04-23T20:04:07Z")

</div>

What do you get when you do an `ifconfig` command in ssh?

You should be seeing something like this at the start of the response:

```auto
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 256 (UNSPEC)
        RX packets 1031046 bytes 7522103 (7.1 MiB)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 85056 bytes 566641 (553.3 KiB)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

```

Let’s first make sure can0 exists in your system.

---

<div class="post-metadata">

**Author:** ![laukejas](https://avatars.discourse-cdn.com/v4/letter/l/a587f6/32.png) [@laukejas](https://klipper.discourse.group/u/laukejas)\
**Post date:** [April 23, 2023, 8:12pm UTC](https://klipper.discourse.group/t/issues-with-canable/7970/34 "2023-04-23T20:12:37Z")

</div>

Thanks, I figured it out, the python script referred to `klipper.dict` in the `out` directory. So I ran `python parsecandump.py candump-2023-04-23_153346.log afac3c9694c2 ../out/klipper.dict` and got this:

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/c/c1ea6611bf303820e61120fd3a8f139fec0a0348.png)

Sorry - the script doesn’t output it into a file, I don’t know how to do it, hence the screenshot.

---

<div class="post-metadata">

**Author:** ![laukejas](https://avatars.discourse-cdn.com/v4/letter/l/a587f6/32.png) [@laukejas](https://klipper.discourse.group/u/laukejas)\
**Post date:** [April 23, 2023, 8:13pm UTC](https://klipper.discourse.group/t/issues-with-canable/7970/35 "2023-04-23T20:13:16Z")

</div>

It seems to exist. Here is what I get:

```auto
pi@V24RP:~/klipper/klippy $ 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 1000 (UNSPEC)
        RX packets 55460831 bytes 443686648 (423.1 MiB)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 3 bytes 24 (24.0 B)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
        ether b8:27:eb:12:1e:4d txqueuelen 1000 (Ethernet)
        RX packets 0 bytes 0 (0.0 B)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 0 bytes 0 (0.0 B)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
        inet 127.0.0.1 netmask 255.0.0.0
        inet6 ::1 prefixlen 128 scopeid 0x10<host>
        loop txqueuelen 1000 (Local Loopback)
        RX packets 79067 bytes 29945480 (28.5 MiB)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 79067 bytes 29945480 (28.5 MiB)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
        inet 192.168.1.170 netmask 255.255.255.0 broadcast 192.168.1.255
        inet6 fda3:85e6:18dd:0:11e4:10f0:29b4:5e2e prefixlen 64 scopeid 0x0<global>
        inet6 fe80::9241:5f6b:371:8a94 prefixlen 64 scopeid 0x20<link>
        inet6 fda3:85e6:18dd::2de prefixlen 128 scopeid 0x0<global>
        ether b8:27:eb:47:4b:18 txqueuelen 1000 (Ethernet)
        RX packets 57670 bytes 4416704 (4.2 MiB)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 70942 bytes 66710953 (63.6 MiB)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

```

---

<div class="post-metadata">

**Author:** ![hcet14](https://avatars.discourse-cdn.com/v4/letter/h/ecd19e/32.png) [@hcet14](https://klipper.discourse.group/u/hcet14)\
**Post date:** [April 23, 2023, 8:26pm UTC](https://klipper.discourse.group/t/issues-with-canable/7970/36 "2023-04-23T20:26:33Z")

</div>

> [@laukejas](#):
>
> the python script referred to `klipper.dict`

cool, do us a favor and post all files you got zipped @[https://pastebin.com/](https://pastebin.com/)

😛 yes, that was also my feeling, klipper.dict! I never heard about mcu.dict.

---

<div class="post-metadata">

**Author:** ![laukejas](https://avatars.discourse-cdn.com/v4/letter/l/a587f6/32.png) [@laukejas](https://klipper.discourse.group/u/laukejas)\
**Post date:** [April 23, 2023, 8:39pm UTC](https://klipper.discourse.group/t/issues-with-canable/7970/37 "2023-04-23T20:39:53Z")

</div>

Can you clarify what files you meant? This python script produces none, it only outputs everything to the console, but the console can’t handle that many lines, so I only get the last part of the parse. What do you want me to upload?

---

<div class="post-metadata">

**Author:** ![hcet14](https://avatars.discourse-cdn.com/v4/letter/h/ecd19e/32.png) [@hcet14](https://klipper.discourse.group/u/hcet14)\
**Post date:** [April 23, 2023, 9:06pm UTC](https://klipper.discourse.group/t/issues-with-canable/7970/38 "2023-04-23T21:06:58Z")

</div>

Please do the hole procedure again. Do what you what to do until you get your failure.

And than post every file you generated after using parsecandump.py. Just post everything.

---

<div class="post-metadata">

**Author:** ![laukejas](https://avatars.discourse-cdn.com/v4/letter/l/a587f6/32.png) [@laukejas](https://klipper.discourse.group/u/laukejas)\
**Post date:** [April 23, 2023, 9:16pm UTC](https://klipper.discourse.group/t/issues-with-canable/7970/39 "2023-04-23T21:16:38Z")

</div>

Well, okay. Like I said, I now get error right after I turn on my printer. I can’t even get to do anything, it fails to boot with an error `mcu 'can0': Unable to connect`

So, the parsecandump.py output (as much as I could get): first part [0181:000.000000: WARN Ignoring line: (1682253236.788823) can0 109#5C81F45E0C6C7E - Pastebin.com](https://pastebin.com/wi9DtFPD), second part [5710:000.000000: WARN Ignoring line: (1682253308.148274) can0 109#9F9C3101BD7E - Pastebin.com](https://pastebin.com/3ueVS3GF)

(Can’t post everything in one paste, pastebin says it’s too long).

As for my Klippy.log and printer.cfg - they haven’t changed since my last post where I uploaded them. I can’t put klippy.log on the pastebin also because it’s too long. And I can’t cut it into pieces because this forum doesn’t allow more than two links per post. So, sorry for that, just scroll up a bit if you want my latest printer.cfg and klippy.log.

---

<div class="post-metadata">

**Author:** ![jakep\_82](https://avatars.discourse-cdn.com/v4/letter/j/ea666f/32.png) [@jakep\_82](https://klipper.discourse.group/u/jakep_82)\
**Post date:** [April 23, 2023, 10:38pm UTC](https://klipper.discourse.group/t/issues-with-canable/7970/40 "2023-04-23T22:38:14Z")

</div>

Please post the contents of /etc/network/interfaces.d/can0.

It’s also not clear to me if the firmware you flashed on the CANable is meant for the MKS clone. I built candlelight firmware from source specifically for the MKS clone if you want to try it. I’ve been using the non-pro version of the MKS CANable for quite some time on my 2.4 with no issues. I run Huvuds on my A and B motors, and an SB2040 on the toolhead all running through the CANable at 1M.

[CANable\_MKS\_fw.bin.zip](https://klipper.discourse.group/uploads/short-url/f1RVaI0tolpBBdyMOtNtcqnvWxL.zip) (12.7 KB)

[Previous page](https://klipper.discourse.group/t/issues-with-canable/7970.md?page=1)

[Next page](https://klipper.discourse.group/t/issues-with-canable/7970.md?page=3)
