@rokapet, able to buy and try another? That worked for me.
I messed up and built EBB klipper without Bootloader Offset. Curiously, that ended up with constant faint status LED on Chad …
Fixed by reuploading CanBoot bootloader to 0x0800 0000 again (connect via USB-C, dfu-util ebb CanBoot, etc…). Then…
- Configured and built klipper for EBB36. With bootloader offset configured this time…
cd ~/klipper
make clean
make menuconfig
make
- Lookup EBB36’s CANBus UUID…
~/CanBoot/scripts/flash_can.py -i can0 -q
Resetting all bootloader node IDs...
Checking for canboot nodes...
Detected UUID: 642f53509351, Application: Klipper
Detected UUID: f7a5fa2b8bf6, Application: CanBoot
Query Complete
- Upload EBB klipper firmware to EBB36 via CanBoot over CANBus…
python3 ~/CanBoot/scripts/flash_can.py -f ~/klipper/out/klipper.bin -u f7a5fa2b8bf6
Sending bootloader jump command...
Resetting all bootloader node IDs...
Checking for canboot nodes...
Detected UUID: 642f53509351, Application: Klipper
Detected UUID: f7a5fa2b8bf6, Application: CanBoot
Attempting to connect to bootloader
CanBoot Connected
Protocol Version: 1.0.0
Block Size: 64 bytes
Application Start: 0x8002000
MCU type: stm32g0b1xx
Verifying canbus connection
Flashing '/home/661wls/klipper/out/klipper.bin'...
[##################################################]
Write complete: 14 pages
Verifying (block count = 418)...
[##################################################]
Verification Complete: SHA = 9AD0D76CFF75486FC1C6123F60F578EE80845C11
CAN Flash Success
- Previously, with just CanBoot on EBB36, the status LED would flash on/off (1sec on, 1sec off). After Klipper is uploaded status LED is constantly lit, but very dim.
- Query current CANBus UUIDs, and installed applications…
~/klipper $ ~/CanBoot/scripts/flash_can.py -i can0 -q
Resetting all bootloader node IDs...
Checking for canboot nodes...
Detected UUID: 642f53509351, Application: Klipper
Detected UUID: f7a5fa2b8bf6, Application: Klipper
Query Complete
- Pi can see Octopus and EBB Klipper firmware via CANBus. Time to start Klipper Host on Pi…
sudo service klipper start
-
Success, as is, Klipper Host/Web-UI can see EBB via CANBus…
-
Edit printer.cfg to start using EBB features…
- Add mcu definition for the EBB called EBBCan :
[mcu EBBCan] #AZA canbus_uuid: f7a5fa2b8bf6 #AZA
- Start adding definitions for features connected to the EBB. Will be mostly using BTT’s sample-bigtreetech-ebb-canbus-v1.2.cfg. But started with adding a simple fan since that was quick to wire up and tryout in the Klipper Web-UI…
[fan] pin: EBBCan: PA0
- Configure EBB Status LED to flash 2 secs on, 2 secs off when klipper firmware is running.
[led status_led] green_pin: EBBCan: PA13 cycle_time: 4.0 initial_GREEN: 0.5
- Add mcu definition for the EBB called EBBCan :
Hi @azab2c!
Sorry for the late answer, during the last day I was away from my computer. Impressive job you have done! I can order a second EBB36 for sure, only it will take weeks until it arrives. I thought I might try to inspect my EBB in a similar way you did (solders and such, though I do not have a microscope but I will try to come up with something), and also do the status LED check (at some time when work and family allows, I have no space and put my printer together on the kitchen table, that can be occupied when I would like to use it as a workbench… ). If I get the same results, then a new unit would be my only option I guess.
Meanwhile I can see that you managed to fire up klipper successfully, it is a great thing to know you managed to overcome this issue, and have a working system! Thumbs up!
Gents, I have made some progress!
I had a little bit of time and place, so I have recompiled CanBus with status LED enabled (thank you @jakep_82 for the hint, and @azab2c for digging out the pin ID for it), and uploaded it with dfu-util. I was greeted with a nice, flashing green light on the EBB36, which makes me think that even though I thought it was unlikely, but most probably my wiring for the CAN signal is the weak point here (or it could be the plug on the Octopus, or Octopus itself, but I am trying not to think of this option right now… Ordering a new Octopus would also take weeks!).
So I am going to redo the wire once I can get to it, and hope for the best.
OK, I have made some further tests, and I am still in nowhere…
I have completely redone the MicroFit end of my wire (new pins, new plug), and measured it with a multimeter. Both CAN-L and CAN-H was < 1 ohm from the MicroFit plug receptibe to the appropriate blade of the RJ12 plug, and they were not shorted. When plugged into the EBB36, I could measure exactly 120 ohms between the blades of the RJ12 plug. So far, so good…
I could not find any info on whether the Octopus has a terminating resistor for CAN bus, so I measured the appropriate pins of the RJ12 socket (unplugged), and measured 117 ohms. So no need to set a jumper, as the terminating resistor is already in place. Again, so far, so good…
Then I plugged the RJ12 plug into the socket, and measured it again, expecting ~60 ohms resistance. Guess what, it still read 117 ohms, indicating that the connection between the RJ12 plug and socket is far from perfect. Meh, I thought…
I cut and redone the RJ12 plug, trying to crimp it with the least force possible, so that the blades don’t go as deep in (note to self: I only have a busted cheap RJ11/12/45 crimper I got from Ebay for a few bucks years ago, so I need something better to work with). When plugged in, after the click, the RJ12 plug still can move into the socket further for approximately an additional 1 mm. Just after the click, I still measured 117 ohms, but after pushing that 1 mm further in, I measured ~59 ohms on the outer part of the RJ12 socket.
This is where I started to get excited… just to find out that when powering on the printer, it is still only the Octopus that is on the CAN bus, and the EBB is still nowhere to be found. The little green LED is still happily flashing on the back of the EBB, indicating that CanBoot is running on it.
This is where I am now, slowly losing faith that this CANbus this is going to ever work…
- Was klipper stopped
sudo service klipper stop
, and then, reset buttons pressed on both Octopus and EBB36, before running canbus_query script ? - Already
DoubleTriple checked baud rates match everywhere (CanBoot firmware, Octopus firmware andcat /etc/network/interfaces.d/can0
) ? Am using 250000 until I get end to end working, wary that when I eventually enable adxl345 that bandwidth might get saturated, hoping klippy/klipper logs will tell me if/when that’s a problem.
Octopus v1.1 schematic shows couple of 59R resistors in series making ~118 (± 1%, so your 117 is expected and ok). We’re close enough to the 120 recommended by docs based on electrical/math that’s beyond me.
(Expected) ~118 Ohms measured at Octopus CANBus connector when wire plugged NOT plugged in :
(Expected) ~60 Ohms measured at Octopus CANBus connector when (~48" 24AWG stranded) wire plugged in (can’t tell from the pic, but it’s plugged in) to both EBB36 and Octopus :
Hi @azab2c!
-
" * Was klipper stopped
sudo service klipper stop
, and then, reset buttons pressed on both Octopus and EBB36, before running canbus_query script ?"
Klipper was stopped, but this does not really makes a difference, as for the time of the CAN test, I completely emptied printer.cfg, to avoid Klipper consuming any of the mcu’s, even if running. Reset buttons were, however, NOT pressed, as I did not think it was necessary (would not press them after each startup during normal operation, but expect them to work right away when starting from cold&dark). Will try pressing them… -
" * Already
DoubleTriple checked baud rates match everywhere (CanBoot firmware, Octopus firmware andcat /etc/network/interfaces.d/can0
) ? Am using 250000 until I get end to end working, wary that when I eventually enable adxl345 that bandwidth might get saturated, hoping klippy/klipper logs will tell me if/when that’s a problem."
Yup, 250k everywhere. Will recompile firmwares (apart from CanBoot on Octopus, as it does NOT have this option in make menuconfig).
The 117 vs 120 and 59 vs 60 ohms were a “close enough” for me too. Anyway, thanks you for your help and suggestions, I will come back once I manage to do the next round of test.
@rokapet
BTW: You can quote a text by marking it and click "Quote
- It includes where it comes from.
- It’s more easy to read.
Like:
Thanks! This is useful.
Pressing RST buttons on either or both board did not make any difference, it is still only Octopis is getting detected.
EBB CanBoot config:
Edit:
Apparently the problem was the RPI OS, that for first, I chose the latest Raspbian 64bit, then used KIAUH to install all components. Today I decided that for the troubleshooting, I am out of options, and the best thing would be, apart from completely giving up, is to start again from scratch. But now, I took the lazy way of doing things, and reinstalled RPI using MainsailOS, 32bit version. I chose that because of some comments I read elsewhere, stating that this is still a somewhat safer way of doing things.
And this worked, I managed to follow the guide without any hiccups, and now I have a running Klipper system, that is able to communicate with both mcu’s through CANbus. I don’t know what the cause of my previous issue was, but it is not important anymore, either…
Thank you for everyone here for the help, time and effort!
Nice!
fwiw I also started with MainSail OS via Raspberry PI OS installer. Then used Kiauh to install additional components/apps.
Dear reader, recommend checking out…