USB CAN is down troubleshooting help

Basic Information:

Printer Model: VZBot 330
MCU / Printerboard: BTT OCTOPUS with EBB36
Host / SBC: RPI 3B+
klippy.log:
mcu ‘mcu’: Starting CAN connect
Created a socket
webhooks client 548416756416: New connection
webhooks client 548416756416: Client info {‘program’: ‘Moonraker’, ‘version’: ‘v0.9.3-16-g72ed175’}
Loaded MCU ‘mcu’ 132 commands (v0.12.0-410-gcf3b0475d / gcc: (15:8-2019-q3-1+b1) 8.3.1 20190703 (release) [gcc-8-branch revision 273027] binutils: (2.35.2-2+14+b2) 2.35.2)
MCU ‘mcu’ config: ADC_MAX=4095 BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c1a=PB8,PB9 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_i2c3=PA8,PC9 BUS_PINS_sdio=PC12,PD2,PC8,PC9,PC10,PC11 BUS_PINS_spi1=PA6,PA7,PA5 BUS_PINS_spi1a=PB4,PB5,PB3 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_spi3=PB4,PB5,PB3 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi4=PE13,PE14,PE12 CANBUS_BRIDGE=1 CLOCK_FREQ=180000000 MCU=stm32f446xx PWM_MAX=255 RECEIVE_WINDOW=192 RESERVE_PINS_CAN=PD0,PD1 RESERVE_PINS_USB=PA11,PA12 RESERVE_PINS_crystal=PH0,PH1 STATS_SUMSQ_BASE=256 STEPPER_BOTH_EDGE=1
mcu ‘EBBCan’: Starting CAN connect
Created a socket
Loaded MCU ‘EBBCan’ 120 commands (v0.12.0-410-gcf3b0475d / gcc: (15:8-2019-q3-1+b1) 8.3.1 20190703 (release) [gcc-8-branch revision 273027] binutils: (2.35.2-2+14+b2) 2.35.2)
MCU ‘EBBCan’ config: ADC_MAX=4095 BUS_PINS_i2c1_PA9_PA10=PA9,PA10 BUS_PINS_i2c1_PB6_PB7=PB6,PB7 BUS_PINS_i2c1_PB8_PB9=PB8,PB9 BUS_PINS_i2c2_PB10_PB11=PB10,PB11 BUS_PINS_i2c2_PB13_PB14=PB13,PB14 BUS_PINS_i2c3_PB3_PB4=PB3,PB4 BUS_PINS_i2c3_PC0_PC1=PC0,PC1 BUS_PINS_spi1=PA6,PA7,PA5 BUS_PINS_spi1a=PB4,PB5,PB3 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi2_PB2_PB11_PB10=PB2,PB11,PB10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_spi3=PB4,PB5,PB3 CANBUS_FREQUENCY=1000000 CLOCK_FREQ=64000000 MCU=stm32g0b1xx PWM_MAX=255 RECEIVE_WINDOW=192 RESERVE_PINS_CAN=PB0,PB1 RESERVE_PINS_crystal=PF0,PF1 STATS_SUMSQ_BASE=256 STEPPER_BOTH_EDGE=1
Sending MCU ‘mcu’ printer configuration…
b’Got error -1 in can read: (100)Network is down’
b’Got error -1 in can read: (19)No such device’

dmesg

[Jan14 10:04] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[ +0.014287] mc: Linux media interface: v0.10
[ +0.003239] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[ +0.000054] [vc_sm_connected_init]: start
[ +0.012105] [vc_sm_connected_init]: installed successfully
[ +0.184358] videodev: Linux video capture interface: v2.00
[ +0.032734] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[ +0.025552] bcm2835_audio bcm2835_audio: card created with 4 channels
[ +0.015394] bcm2835_audio bcm2835_audio: card created with 4 channels
[ +0.040671] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[ +0.006635] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[ +0.023201] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[ +0.003117] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
[ +0.008782] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video13
[ +0.023031] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[ +0.009708] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video14
[ +0.008855] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video15
[ +0.022789] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video16
[ +0.000064] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[ +0.000047] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[ +0.000055] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[ +0.000058] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[ +0.015137] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video20
[ +0.000028] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[ +0.000090] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[ +0.000645] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video21
[ +0.000570] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video22
[ +0.000465] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video23
[ +0.000046] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[ +0.000055] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[ +0.000030] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[ +0.000043] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[ +0.000354] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp
[ +0.018525] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[ +0.000081] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[ +0.014927] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[ +0.000079] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[ +0.003442] bcm2835-codec bcm2835-codec: Device registered as /dev/video18
[ +0.000077] bcm2835-codec bcm2835-codec: Loaded V4L2 image_fx
[ +0.009350] bcm2835-codec bcm2835-codec: Device registered as /dev/video31
[ +0.000103] bcm2835-codec bcm2835-codec: Loaded V4L2 encode_image
[ +0.632465] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ +0.070541] cfg80211: Loaded X.509 cert ‘sforshee: 00b28ddf47aef9cea7’
[ +0.000591] CAN device driver interface
[ +0.020760] cfg80211: loaded regulatory.db is malformed or signature is missing/invalid
[ +0.008378] usb 1-1.2: current rate 48000 is different from the runtime rate 8000
[ +0.003758] usb 1-1.2: current rate 48000 is different from the runtime rate 16000
[ +0.019777] usb 1-1.2: current rate 48000 is different from the runtime rate 44100
[ +0.002635] gs_usb 1-1.4:1.0: Configuring for 1 interfaces
[ +0.020549] usbcore: registered new interface driver gs_usb
[ +0.010728] usb 1-1.2: current rate 48000 is different from the runtime rate 8000
[ +0.016832] usb 1-1.2: current rate 48000 is different from the runtime rate 16000
[ +0.004127] usb 1-1.2: current rate 48000 is different from the runtime rate 44100
[ +0.012504] usbcore: registered new interface driver snd-usb-audio
[ +0.001849] usb 1-1.2: Found UVC 1.00 device HP Webcam HD 3300 (03f0:e307)
[ +0.073991] input: HP Webcam HD 3300: HP Webcam HD as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/input/input0
[ +0.015205] usbcore: registered new interface driver uvcvideo
[ +0.213869] brcmfmac: F1 signature read @0x18000000=0x1541a9a6
[ +0.036559] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[ +0.003964] usbcore: registered new interface driver brcmfmac
[ +0.269226] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Jul 19 2021 03:24:18 version 7.45.98 (TOB) (56df937 CY) FWID 01-8e14b897
[ +0.952301] SPI driver ads7846 has no spi_device_id for ti,tsc2046
[ +0.000334] SPI driver ads7846 has no spi_device_id for ti,ads7843
[ +0.000023] SPI driver ads7846 has no spi_device_id for ti,ads7845
[ +0.000018] SPI driver ads7846 has no spi_device_id for ti,ads7873
[ +0.001888] ads7846 spi0.1: supply vcc not found, using dummy regulator
[ +0.014875] ads7846 spi0.1: touchscreen, irq 185
[ +0.005589] input: ADS7846 Touchscreen as /devices/platform/soc/3f204000.spi/spi_master/spi0/spi0.1/input/input1
[ +0.076792] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready
[ +0.138233] Adding 262140k swap on /var/swap. Priority:-2 extents:1 across:262140k SSFS
[ +1.660480] smsc95xx 1-1.1:1.0 eth0: hardware isn’t capable of remote wakeup
[ +0.005406] smsc95xx 1-1.1:1.0 eth0: Link is Up - 100Mbps/Full - flow control off
[ +0.000211] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ +0.076354] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save disabled
[ +0.552930] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save disabled
[ +11.488173] can: controller area network core
[ +0.000297] NET: Registered PF_CAN protocol family
[ +0.037853] can: raw protocol
[ +1.833549] gs_usb 1-1.4:1.0 can0: usb xmit fail 0
[ +0.112142] usb 1-1.4: USB disconnect, device number 5
[ +0.000519] gs_usb 1-1.4:1.0 can0: Couldn’t shutdown device (err=-19)
[ +0.733762] usb 1-1.4: new full-speed USB device number 6 using dwc_otg
[ +0.118013] usb 1-1.4: New USB device found, idVendor=1d50, idProduct=606f, bcdDevice= 0.00
[ +0.000035] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ +0.000029] usb 1-1.4: Product: stm32f446xx
[ +0.000012] usb 1-1.4: Manufacturer: Klipper
[ +0.000010] usb 1-1.4: SerialNumber: 250035000A51303432383339
[ +0.017758] gs_usb 1-1.4:1.0: Configuring for 1 interfaces
[ +0.176417] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready

Describe your issue:

I have verified all of the usual suspects. I also tried just starting from scratch. I ame getting the same errors no matter what I do. I have tried replacing all of the boards (PI Octopus and EBB36) My can bus is showing up like it should and everything looks setup correctly on the PI. From what I can tell the CAN is going active from pi but when Klipper tries to connect the CAN network is crashing.

I am 99% sure this is something in the pi configuration. When I first set it up before updating all of the software I get the error mcu protocal error. MCU mcu multibyte msgtag not supported.

After update it just hangs at

Printer is not ready
The klippy host software is attempting to connect. Please
retry in a few moments.

It never errors out it just never connects.

Three things:

  1. Please post your klippy.log that should have been done when you made the post.
  2. When copying in a list, use the “Preformatted Text” tags:
  3. What is the process you used to set up your CAN system?
2 Likes

klippy.log (33.1 KB)
I followed this guide. https://canbus.esoterical.online/

Thanks for the tip on preformatted text.

Good guide.

At what step are you having the problem?

Not having a problem with this guide. Everything on it goes as planned. But once it is all set up, the PI cannot connect to the printer. Klipper says that the CAN Bus in not there, but it shows up when I query it and dmesg show the CAN Bus as up. I think there is some kind of conflict on the PI, but I am not finding anything.

mcu 'mcu': Starting CAN connect Created a socket webhooks client 548416756416: New connection webhooks client 548416756416: Client info {'program': 'Moonraker', 'version': 'v0.9.3-16-g72ed175'} Loaded MCU 'mcu' 132 commands (v0.12.0-410-gcf3b0475d / gcc: (15:8-2019-q3-1+b1) 8.3.1 20190703 (release) [gcc-8-branch revision 273027] binutils: (2.35.2-2+14+b2) 2.35.2) MCU 'mcu' config: ADC_MAX=4095 BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c1a=PB8,PB9 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_i2c3=PA8,PC9 BUS_PINS_sdio=PC12,PD2,PC8,PC9,PC10,PC11 BUS_PINS_spi1=PA6,PA7,PA5 BUS_PINS_spi1a=PB4,PB5,PB3 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_spi3=PB4,PB5,PB3 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi4=PE13,PE14,PE12 CANBUS_BRIDGE=1 CLOCK_FREQ=180000000 MCU=stm32f446xx PWM_MAX=255 RECEIVE_WINDOW=192 RESERVE_PINS_CAN=PD0,PD1 RESERVE_PINS_USB=PA11,PA12 RESERVE_PINS_crystal=PH0,PH1 STATS_SUMSQ_BASE=256 STEPPER_BOTH_EDGE=1 mcu 'EBBCan': Starting CAN connect Created a socket Loaded MCU 'EBBCan' 120 commands (v0.12.0-410-gcf3b0475d / gcc: (15:8-2019-q3-1+b1) 8.3.1 20190703 (release) [gcc-8-branch revision 273027] binutils: (2.35.2-2+14+b2) 2.35.2) MCU 'EBBCan' config: ADC_MAX=4095 BUS_PINS_i2c1_PA9_PA10=PA9,PA10 BUS_PINS_i2c1_PB6_PB7=PB6,PB7 BUS_PINS_i2c1_PB8_PB9=PB8,PB9 BUS_PINS_i2c2_PB10_PB11=PB10,PB11 BUS_PINS_i2c2_PB13_PB14=PB13,PB14 BUS_PINS_i2c3_PB3_PB4=PB3,PB4 BUS_PINS_i2c3_PC0_PC1=PC0,PC1 BUS_PINS_spi1=PA6,PA7,PA5 BUS_PINS_spi1a=PB4,PB5,PB3 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi2_PB2_PB11_PB10=PB2,PB11,PB10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_spi3=PB4,PB5,PB3 CANBUS_FREQUENCY=1000000 CLOCK_FREQ=64000000 MCU=stm32g0b1xx PWM_MAX=255 RECEIVE_WINDOW=192 RESERVE_PINS_CAN=PB0,PB1 RESERVE_PINS_crystal=PF0,PF1 STATS_SUMSQ_BASE=256 STEPPER_BOTH_EDGE=1 Sending MCU 'mcu' printer configuration... b'Got error -1 in can read: (100)Network is down' b'Got error -1 in can read: (19)No such device'

Don’t post portions of your klippy.log, post the whole thing.

What you’re saying doesn’t make sense - if you go through the esoteric guide, the last thing you do is get the toolhead’s CAN UUID as per Toolhead Flashing | Esoterical’s CANBus Guide

You can’t do this step without the rPi connected.

Are you getting a CAN UUID, putting it in the printer.cfg as instructed? After doing that, you should click on “SAVE & RESTART” in the printer.cfg editor. All these steps require the rPi to be connected and active.

Could you please explain, in as much detail as possible, how you set up your system and where things are failing.

I am getting the CAN UUID and the EBB UUID and putting it in the printer config. I can query the UUID from Mainsail and see it.

Everything in the guide works as expected, and the printer.cfg has the correct UUID’s in it.

I am using a BTT Octopus in CAN Bridge mode with a EBB36 Toolhead board. This is all setup on an RPI 3B+.

When I finish setting everything up and confirm all the UUIDs everything looks correct. Then I reboot everything and Klipper just sticks at the klippy host software is attempting to connect. It never times out and fails, it just never gets past it. The last line in the log is CAN network is down and No Such device, but the device shows up in dmesg.

I agree, it doesn’t make sense. I have used this process to set up 5 printers and never had any issue with it. The only thing that is different is that I am using an RPI 3 instead of RPI 4 or BTT CB1, and I am using a display that has SPI touch instead of USB touch. I do know what I am doing, but this one has me stumped. I am leaning towards a conflict with the touch driver, but I am not seeing anything in dmesg that confirms that.

My next question was what are you running along with Klipper.

I would suggest setting up Klipper on this printer using the rPi 3 without KlipperScreen and the display. See if it works and then add the display and see how that goes.

Klipper, Mainsail, Moonraker, Crowsnest, and Klipperscreen.
I am trying the pi without a screen right now.

Remove Crowsnest as well.

Let’s see what happens with just Klipper/Moonraker/Mainsail running on the rPi.

Same issue with RPI 3 and no display. The only items installed are Klipper Mainsail and Moonraker.

When I have the CAN Network up and the printer config renamed, and I run ~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0 should I see the toolhead board UUID or just the MCU UUID. I am seeing only the MCU UUID. In some places it says I should only get the MCU UUID and others it says I should get both.

I just loaded my Voron printer.cfg to it and only changed the UUID’s and it works. I confirmed that something in my printer.cfg is causing the issue. I have gone over it with a fine tooth comb several times, and I am not seeing what could be causing it.

This section is causing the issue but why?

[led cpap_power]
# HE3 To run main power to CPAP Fan. PB11 is negative turn on source
white_pin: PB11
initial_WHITE:1

Can I ask why you’re defining this pin as an LED and not a fan using something like:

On the Octopus, PB11 is the “HE3” (Extruder Heater) output.

In your comments, you’re saying that “PB11 is negative turn on source” - what do you mean by that? When the MCU’s PB11 pin is high/positive, the N-Channel MOSFET of HE3 (which is what PB11 controls) will be on and the pin will be effectively tied to ground. If PB11 is low (negative) the transistor will be in a high impedance state.

This is going to sound weird, but what kind of 24V power supply are you running? I just helped somebody with a similar issue and when they put in a MeanWell power supply on their Octopus (Pro, in this case) the problem went away.

Going back to a previous question:

You should only be seeing the MCU UUID when Klipper service is active.

I am turning on the power to my CPAP Fan using a Heater control. "Negative to turn on source is my shorthand for it switches on the Ground and not on VCC.
I control the speed of my CPAP from my PI (GPIO26) and if I don’t want the fan at full speed during boot I need to turn the power off to the CPAP control board. Then turn it on when I am using it.

Edit for clarification. With the HE3 I am not trying to control speed. I just want to turn it on or off. That is why I used LED. If memory serves I tried FAN at first and was getting some unexpected behavior, so I used LED instead.

I am running a meanwell LRS-350-24. I only use the cheap generic ones for stuff that has very little power demand and reliability is not required.

I played around with it and CAN Bus will not run if I assign PB11 anywhere in the printer config. I also tried on my Voron and got the same result.

Most likely you have a wiring problem running lines to the CPAP Fan from two devices. You’ll have to check how your grounded things. This may be affecting the power going out to the CAN Toolhead.

Can you draw out your wiring (having pictures to show how you do it helps). Please include all grounds.

I just looked over the klippy.log that you just posted - it looks like the fan control is using the Octpus’s DIAG7 Connector (which is connected to MCU Pin PG15).

[led cpap_power]
white_pin = PB11
initial_white = 1

[fan_generic CPAP_partfan]
pin = PG15
max_power = 1
off_below = 0.2
cycle_time = .0005

What is correct?

You are correct. I have not wired up the CPAP Stuff yet. I put it this way so I could try using the Diag7 connector to run CPAP instead of the PI. On my VORON it is easy enough to just wire from the PI to the CPAP, but on the VZBot I am building the PI is in a case with the display. So Accessing the GPIO on the PI is not a good option.

At this point, wiring cannot be the issue. I have not hooked any of the wires to the Controller board. The only wires I have hooked up to the controller is Power, Ground, CAN and USB. I did wire up the EBB36 and Have hooked thermistors up. But the motors and all the diag and fan ports are not connected.

What are you calling the “controller”? rPi, Octopus or EBB36?

Again, drawings and pictures are really helpful because it’s really confusing what you’re doing here. Bringing in information from a second board wasn’t helpful.

Your goal should be to making things as easy as possible for me to understand what you’re doing otherwise we’re just fumbling around.

This is post 19 of this thread - let’s try and get things resolved by 25.

Now, as I understand it, everything runs properly on the VZBot until you add the PB11 statement - correct?

What is wired to HE3? Again, a wiring diagram and photographs would help. As always, the latest klippy.log would be useful.

1 Like

Controller is The Octopus. The issue is resolved. PB11 is causing the issue. There is no need to show or explain how I have it wired because the port we are referring to is not wired up.

I am not sure why mentioning the other printer would cause any confusion. I “CONFIRMED” that PB11 causes the CAN Bus to fail on any Octopus board that I try it on.

1 Like