Manta-M8P icon indicating copy to clipboard operation
Manta-M8P copied to clipboard

CanBus support

Open emersonsc opened this issue 2 years ago • 53 comments

The owners manuals provided give zero help on getting the built in canbus to work.

emersonsc avatar Jan 11 '23 18:01 emersonsc

i agree. Im so close to just sledge hammering shit. i feel like ive watched and read 1000 bits a piece, and im still no closer. and fairly certain ive bricked an unnecessary U2C

Vargsh0rd3 avatar Jan 17 '23 19:01 Vargsh0rd3

i agree. Im so close to just sledge hammering shit. i feel like ive watched and read 1000 bits a piece, and im still no closer. and fairly certain ive bricked an unnecessary U2C

Yeah its annoying how spread out and fragmented documentation is for CanBus. For as much of a hard@$$ O'Conner is about stuff, you'd think he wouldnt merge something like CanBus into Klipper without proper documentation...

emersonsc avatar Jan 17 '23 20:01 emersonsc

Ingot my voron at the end of September. Had it running foe maybe 2 weeks. Gotna few mods and lost a month. Finally got it running for another week. Tap arrived. Fried my board and all my LEDs because of poor documentation on a necessary alteration to hartk pcb. Dfh took 4 weeks to send me 600 bucks of stuff that I now can't get working. I'm starting to feel really stupid.

Vargsh0rd3 avatar Jan 17 '23 20:01 Vargsh0rd3

Ingot my voron at the end of September. Had it running foe maybe 2 weeks. Gotna few mods and lost a month. Finally got it running for another week. Tap arrived. Fried my board and all my LEDs because of poor documentation on a necessary alteration to hartk pcb. Dfh took 4 weeks to send me 600 bucks of stuff that I now can't get working. I'm starting to feel really stupid.

what mods? are you on discord we can move this conversation there and I could possibly help

emersonsc avatar Jan 17 '23 20:01 emersonsc

No those were like 2 crisis ago lol. I gotnthat stuff figured now. We have the same problem now. And i dunno. I know not probably help matters. But I don't feel like I learned anything if I get help. I needn't scrape and struggle and curs4nthe sky and smash a 20 year old monitor with a sledgehammer that I keep around for therapy rage.

Vargsh0rd3 avatar Jan 17 '23 21:01 Vargsh0rd3

Healthy eh?

Vargsh0rd3 avatar Jan 17 '23 21:01 Vargsh0rd3

Holy sausage thumbs. I need to proofread. Too much repetitive mumbo-jumbo. Too lazy. Eyes... searing shut.

Vargsh0rd3 avatar Jan 17 '23 21:01 Vargsh0rd3

This is a feature that is also advertised on the homepage and in the sales documents, but there is no documentation on how to use it. How is the Can-Bus functionality activated when using a CB1? Not a word about it in any documentation from Biqu or BTT.

ALM007cs avatar Feb 09 '23 06:02 ALM007cs

This is a feature that is also advertised on the homepage and in the sales documents, but there is no documentation on how to use it. How is the Can-Bus functionality activated when using a CB1? Not a word about it in any documentation from Biqu or BTT.

This is something Biqu/Bigtreetech does with pretty much everything they sell. They make lots of claims on the productpages, then when it comes to support its crickets except for the cheerleaders who get upset when you call our Biqu/BTT for this kind of crap.

emersonsc avatar Feb 12 '23 17:02 emersonsc

@alexwiecke It Works.... THX

Only problemv i got was the bootloader. I have to flash the firmware by sd -card.

Now CAN-bus communication to EBB36 work well - without additional boards.

ALM007cs avatar Feb 14 '23 06:02 ALM007cs

Hey guys, this is the procedure we follow for getting CANBUS working on the Manta v1.1s:

These instructions reference the Manta M8P User Manual v1.04 (Commit 53df01d on Jan 8)

  1. Flash the compute board (CB1 or CM4) following the normal procedure in section 4 or 5 of the manual
  2. SSH into the compute board as shown in section 6.1
  3. In the terminal, navigate to the klipper repository and open the build configuration:
cd ~/klipper
make menuconfig
  1. Setup the configuration shown below:
[\*] Enable extra low level configuration options
	Micro controller Architecture (STMicroelectronics STM32 )
	Processor model (STM32G0B1 )
	Bootloader offset 8 KiB bootloader)
	Clock Reference (8 MHz crystal)
	Communication interface (USB to CAN bus bridge (USB on PA11/PA12))
	CAN bus interface (CAN bus (on PD12/PD13))
(250000) CAN bus speed

image

  1. Press 'q' to exit, save the configuration
  2. Build the firmware:
make clean
make
  1. Put the Manta MCU in bootloader mode:
    1. Hold down the BOOT0 button
    2. Press and release the RESET button
    3. Release the BOOT0 button
  2. Flash the MCU:
make flash FLASH_DEVICE=0483:df11
  1. Look for the success message. If the file does not download successfully, redo step 7 and try again.

image

  1. Check that the MCU is showing up as a CANBUS device:
~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0

Expected response:

> Found canbus_uuid=[UUID], Application: Klipper
> Total 1 uuids found

If the UUID doesn't appear, make sure you've setup the host as recommended in the instructions under Host Hardware, then reflash the board per steps 7-9

  1. Wire up the CAN bus using a twisted pair between the manta and your other boards. See the Manta M8P v1.1 pinout on page 11 of the manual. Make sure to verify that you have 120ohm resistors terminating the bus, and that your other boards are flashed for CANBUS communication at the same speed (250000)

Once you've gotten to this point, the Klipper CANBUS documentation will get you the rest of the way

Alex-Pantheon avatar Feb 14 '23 06:02 Alex-Pantheon

This work, but how i get the serial of Manta, because when i try run "ls /dev/serial/by-id/" the command return to me this error: ls: cannot access '/dev/serial/by-id/': No such file or directory

danielsmoura avatar Feb 16 '23 00:02 danielsmoura

when i try run "ls /dev/serial/by-id/" the command return to me this error: ls: cannot access '/dev/serial/by-id/': No such file or directory

Once flashed in CAN bridge mode the MCU no longer appears as a serial device, but instead shows up as a CAN device on can0. So you'll need the CAN UUID, not a Serial ID.

See the Klipper CANBUS documentation for instructions on how to query and configure it.

Alex-Pantheon avatar Feb 16 '23 01:02 Alex-Pantheon

Im not need put on printer.cfg the ?:

[mcu] serial: /dev/serial/by-id/xxxx

What i put here ?

danielsmoura avatar Feb 16 '23 01:02 danielsmoura

return error:

Klipper reports: ERROR

Option 'serial' in section 'mcu' must be specified

Once the underlying issue is corrected, use the "RESTART" command to reload the config and restart the host software. Printer is halted

danielsmoura avatar Feb 16 '23 01:02 danielsmoura

@danielsmoura, instead of a serial address, you'd put a CAN UUID, see below:

[mcu]
#serial: not needed
canbus_uuid: 6cc687f42f48

Alex-Pantheon avatar Feb 16 '23 01:02 Alex-Pantheon

@danielsmoura : https://www.klipper3d.org/CANBUS.html

ALM007cs avatar Feb 16 '23 06:02 ALM007cs

Thanks for you help @ALM007cs !

danielsmoura avatar Feb 16 '23 12:02 danielsmoura

every time I turn the printer off and on again it shows me

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

Total 0 uuids found

when i flash the board new is show 1 uuid .

when i turn the printer off and on it shows total uuids 0

twingi0815 avatar Feb 28 '23 14:02 twingi0815

every time I turn the printer off and on again it shows me

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

Total 0 uuids found

when i flash the board new is show 1 uuid .

when i turn the printer off and on it shows total uuids 0

Once you update your printer.cfg with the canbus_uuid and restart, klipper will claim the device. Running canbus_query.py will only show new or otherwise unused canbus devices.

edev-us avatar Mar 04 '23 15:03 edev-us

no it disappears even if i don't write the uuid in klipper

that's life shit like the flashing of the ebb42

I've been shitting around with the board for 14 days, I think it's time to throw it in the trash

twingi0815 avatar Mar 05 '23 14:03 twingi0815

Vargsh0rd3 and emersonsc i feel your pain been at it 3 weeks and no luck and pure frustration. my setup is pure BTT Manta m8P v1 ,CB1 and Io2Can, originally started with SB2240 but being new to this whole tmc2240 thing NOT supported natively!! so thought give it a go and ordered a SB2209 seeing as it looks to be supported, thinking should be easy as now got all the products that "should work together" BUT hard NO!! really think BTT rushed this out before Holidays hoping some would work it out for them. BTT need to realize that not everyone is a programming genius and need to write decent instructions that make sense and not 3 different ways to do the same task as it all melds into??? a product that doesn't work as advertised. I also see the Github Klipper Branches for TMC2240 are no good also .. machine now going back to hard wiring and deal with the can bus in 6 months when it all gets sorted. image

Mickd02 avatar Mar 06 '23 11:03 Mickd02

Thanks @Alex-Pantheon could I please ask for some help. Where you wrote; Wire up the CAN bus using a twisted pair between the manta and your other boards. See the Manta M8P v1.1 pinout on page 11 of the manual.

Could you please show which pins on that page to use for the canbus connection and the pinout of those pins please. Thanks in advance

patrickdiesslin avatar Mar 25 '23 13:03 patrickdiesslin

To use the built in CAN Bus on the Manta M8P, you need to use pins PD12/PD13.

edev-us avatar Mar 25 '23 13:03 edev-us

Just want to make sure I understand the physical connection side of stuff... the firmware bit makes sense.

When using a CM4/CB1 with the Manta v1.1 is the can comms done through the B2B connectors for the CM4/CB1 or does it need the likes of a Pi Can hat?

I ask as I'm building / looking to build a system with a preexisting hermit crab can toolhead (the hermit crab comes with a pi hat, and a tool board).

I 'assume' the PD12/13 connectors on the V1.1 board would go to the hermit crabs tool board (a 'dumb' hub) but does it still need the pi hat to connect to the tool board as well?

Can the v1.1 use Canboot or can it be re-flased via the klipper tools as described above after the MCU is flashed the first time (assume again you'd point your binary to can0 uuid).

Any advice would be appreciated. Whilst I HATE BTT for their overall lack of support once schematics and rough manuals have been uploaded (very much heres the hardware work it out yourself), they do make hardware that fits with what I want to achieve at a price point that makes sesne...... and I know I'm lucky enough to be able to decipher (more or less) the info they do upload.

ghost avatar Apr 16 '23 20:04 ghost

Just want to make sure I understand the physical connection side of stuff... the firmware bit makes sense.

When using a CM4/CB1 with the Manta v1.1 is the can comms done through the B2B connectors for the CM4/CB1 or does it need the likes of a Pi Can hat?

The CAN and the rest of the MCU communicate with the CM4/CB1 through the B2B connectors. There is no need for a seperate CAN hat. You can use a separate CAN hat if you want to offload the CAN communications and not use the built in CAN. There is plenty of CPU and bandwidth on the Manta so I don;t see this as usefull.

I ask as I'm building / looking to build a system with a preexisting hermit crab can toolhead (the hermit crab comes with a pi hat, and a tool board).

I 'assume' the PD12/13 connectors on the V1.1 board would go to the hermit crabs tool board (a 'dumb' hub) but does it still need the pi hat to connect to the tool board as well?

If you are using the CAN version of the Hermit Crab Tool board, I see no reason why you would need the Pi CAN Hat.

Can the v1.1 use Canboot or can it be re-flased via the klipper tools as described above after the MCU is flashed the first time (assume again you'd point your binary to can0 uuid).

The 1.1 can use CanBoot, but I see no reason to. The Manta is directly connected to the CM4/CB1 and always will be. So flashing/reflashing is quite easy and direct. You would only need CanBoot if you want to flash devices that are only connected to the CANBus.

Any advice would be appreciated. Whilst I HATE BTT for their overall lack of support once schematics and rough manuals have been uploaded (very much heres the hardware work it out yourself), they do make hardware that fits with what I want to achieve at a price point that makes sesne...... and I know I'm lucky enough to be able to decipher (more or less) the info they do upload.

Yeah, the lack of support sucks. Took me forever to get my Manta MP8 v1.1 w/CB1 and EBB SB2209 working together. Three of their own products. You would think that there would be a step by step guide somewhere, but nope. You got to figure it all out yourself.

edev-us avatar Apr 16 '23 21:04 edev-us

Huge thanks,

Yh as its using the B2B then that all makes sense. And again, no need for canboot as its using that.

Seriously thanks for your time and support!!

ghost avatar Apr 16 '23 22:04 ghost

@EveCodeJunkie

Hi there! Your comment was helpful in order to understand that i do not need to use Pi HAT that came with my Hermit Crab CAN.

Now i need to figure out how i could cut off one end of phone cable that came with the device and crimp connectors for my Manta M8P motherboard CAN pins.

Do you mby know where i could find pinout for BIGTREETECH CAN-Tool Board Version V1.0.

I only could find pinout for my motherboard..

image

But i would need to know the other end also.. :(

I have only found this scheme but i am not sure if that is the one i should reference with H and L positions..

https://github.com/bigtreetech/HermitCrab/blob/master/CanbusKlipper/Hardware/Schematic/BTT%20Tool%20Board-SCH.pdf

And after that how would i proceed with firmware conpilation and configuration :(

Official documentation of BTT products is not enough rly it is way way to simple..

nikolicjakov avatar Apr 24 '23 11:04 nikolicjakov

If I'm understanding you correctly, you'll find the pinouts in this repo:

https://github.com/bigtreetech/EBB

So on one end, you'd have your manta & a positive and negative lead from your PSU. On the other side of the cable will be whichever EBB CAN board you have.

Rizz226 avatar Apr 24 '23 13:04 Rizz226

That is correct i have Hermit Crab CAN and Manta M8P. Now i have them connected without using RPi Hat and now i need to understand how to configure software part.

Do i need to flash some custom klipper binary to Hermit Crab CAN and how could i use 2 mcu-s (Manta M8P and Hermit Crab CAN) in klipper...

nikolicjakov avatar Apr 24 '23 13:04 nikolicjakov