# Klipper protocol / startup

**URL:** <https://klipper.discourse.group/t/klipper-protocol-startup/10810>\
**Category:** General Discussion\
**Created:** [October 3, 2023, 1:34pm UTC](https://klipper.discourse.group/t/klipper-protocol-startup/10810 "2023-10-03T13:34:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rew](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/rew/32/1978_2.png) [@rew](https://klipper.discourse.group/u/rew)\
**Post date:** [October 3, 2023, 1:34pm UTC](https://klipper.discourse.group/t/klipper-protocol-startup/10810/1 "2023-10-03T13:34:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [October 3, 2023, 4:13pm UTC](https://klipper.discourse.group/t/klipper-protocol-startup/10810/2 "2023-10-03T16:13:17Z")

</div>

The config for the SBASE can be found here: [https://github.com/Klipper3d/klipper/blob/master/config/generic-smoothieboard.cfg](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](https://klipper.discourse.group/t/installing-klipper-with-kiauh/10734/1)

---

<div class="post-metadata">

**Author:** ![rew](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/rew/32/1978_2.png) [@rew](https://klipper.discourse.group/u/rew)\
**Post date:** [October 3, 2023, 5:48pm UTC](https://klipper.discourse.group/t/klipper-protocol-startup/10810/3 "2023-10-03T17:48:10Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [October 3, 2023, 6:09pm UTC](https://klipper.discourse.group/t/klipper-protocol-startup/10810/4 "2023-10-03T18:09:54Z")

</div>

> [@rew](#):
>
> 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`

```auto
usermod -a -G dialout my_great_new_user

```

---

<div class="post-metadata">

**Author:** ![rew](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/rew/32/1978_2.png) [@rew](https://klipper.discourse.group/u/rew)\
**Post date:** [October 3, 2023, 6:55pm UTC](https://klipper.discourse.group/t/klipper-protocol-startup/10810/5 "2023-10-03T18:55:07Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![rew](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/rew/32/1978_2.png) [@rew](https://klipper.discourse.group/u/rew)\
**Post date:** [October 6, 2023, 8:23am UTC](https://klipper.discourse.group/t/klipper-protocol-startup/10810/6 "2023-10-06T08:23:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/klipper/original/1X/64419bf2aac6639e6ef5cef200dcd456b0a01ac3.png) [@system](https://klipper.discourse.group/u/system)\
**Post date:** [December 5, 2023, 8:24am UTC](https://klipper.discourse.group/t/klipper-protocol-startup/10810/7 "2023-12-05T08:24:06Z")

</div>

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