Klipper protocol / startup

I’ve “inherited” an old/modified TRONXY 3D printer. There is an old MKS SBASE 1.3 control board in there that I may have tried upgrading to klipper a long time ago. Currently very little is working. Klipper won’t connect, ocotprint won’t connect that sort of stuff.

So I’m back to basics. I’m trying to figure out what firmware that board is running. I tried downloading stock firmware for that thing, put it on an SD card and booted the board. It flashed a few patterns, renamed firmware.bin to firmware.cur and now it is running firmware that says somethign like “smoothieboard\n ok” when I connect to it.

Is this typical for klipper-like firmware or is this a marlin-like firmware? (it doesn’t respond do anything I send from there. Tried a few GCODe commands).

If it is klipper, I’d like to manually try to make it do a few things. Maybe turn a led on or off. Can I make it do that kind of stuff without the klippy daemon? (that last one is hanging on connect, and then not responding to anything on /tmp/printer).

MKS SBASE 1.3, LPC1768.

The config for the SBASE can be found here: https://github.com/Klipper3d/klipper/blob/master/config/generic-smoothieboard.cfg

  • Build for 100MHz LPC1768 with Smoothieware Bootloader. No other options
  • Rename klipper.bin to firmware.bin and put in into the root of your SD card
  • Reset / Reboot the board → firmware.bin gets renamed to firmware.cur

Follow some up-to-date guide how to setup the rest of Klipper, e.g. Installing Klipper with KIAUH

Flashed Klipper again. I can now communicate to /tmp/printer and klippy reports stuff like compile date of the firmware I just flashed. (I configured as you said (“no changes to be saved”), built it (nothing to do), copied over the firmware and flashed it again. )
I then started working on my Z axis. Something about inverting my endstop. Once I figured out I had the syntax wrong, that now works. It shows open when open and triggered when triggered.
Then I decided that hitting “home Z” in octoprint is easier than typing G28 Z all the time, So I quit my terminal program to /tmp/printer and told octoprint to connect and… “connecting” but that never finishes…

Edit: I’m having trouble that nobody else is seeing.
Hypothesis: I downloaded and compiled klipper using my own user account. Most people will do this as user “pi”. So I want to redo the “install” step of the klipper software. However, I must have done that yesterday, but I don’t remember the command. I copy-pasted something probably. Now “make install” seems reasonable but is not it. All the “install klipper” howtos… seem to forget that step???

OK. I was going to change all instances of my username to “pi” but once I got started I changed just the klippy-user into pi and decided to give it a try. Works!

You stumbled over some Linux permission thing: Your user was not in the right group and thus not allowed to access /tmp/printer

usermod -a -G dialout my_great_new_user

My user already IS in group dialout.
The /dev/pts/0 device that /tmp/printer links to was owned by me, group tty. Now it is owned by pi, group tty. Its mode is 660.

User pi is in group tty by default. Maybe it was running into something that being able to open the device for RW was not enough: it was doing something that requires you to be owner.

That said: I don’t see the use of figuring this out to the bottom. The conclusion is: install klipper when logged in as user pi, or otherwise set
KLIPPY_USER=pi
in /etc/default/klipper
(I think pi might not be able to write to the printer.cfg file. IIRC it does that when auto bed levelling. Maybe I like that reassurance for now).

Small update: I ran pid-tune. It offered to write it to printer.cfg, but I did it manually. Works for me.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.