Skip to main content

Qidi Installation

Hardware

This guide is specifically tailored to installing HivePrint on a Qidi X-max 3 printer.

If you are looking for instructions for installing HivePrint on a Raspberry Pi, please see here.

System Requirements

HivePrint has been successfully run on the Qidi X-max 3 printer, however it is important to note that the OS that the Qidi printers ships with seems to differ depending on when the printer was purchased. We're happy to support any problematic Qidi OS via discord, so please join our Discord if you need any support!

The Qidi X-max 3 printer is running on an custom MKS main board which is running the Armbian OS.

SSH & Sudo access

The Qidi printers are using a custom MKS main board which uses the following credentials:

NameValue
usernamemks
passwordmakerbase
ssh port22
ssh passwordmakerbase

Installation instructions

We follow the instructions from NodeSource. You may be able to use whatever method you want, but we know that the following work.

0. Ensure the time on the MKS is accurate

Run the following command to check the date. Ensure it matches the date of today.

timedatectl

If it does not, you will run into issues when trying to update/install packages. If the date is incorrect, you can set it using the following command:

sudo apt-get install ntpdate
sudo ntpdate -u time.nist.gov
caution

Run the following commands as the mks user on your pi.

1. Download and import the Nodesource GPG key
sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
note

If you receive an error that matches the following:

File '/etc/apt/keyrings/nodesource.gpg' exists. Overwrite? (y/N)
Enter new filename:
gpg: no valid OpenPGP data found.
gpg: dearmoring failed: File exists
(23) Failed writing body

You may need to do the following:

sudo mv /etc/apt/keyrings/nodesource.gpg /etc/apt/keyrings/nodesource.gpg.backup
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
2. Create deb repository
NODE_MAJOR=18
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
3. Run Update and Installation
sudo apt-get update
sudo apt-get install nodejs -y
Caution!

These instructions are coming directly from the NodeSource repo above. Please reference their documentation if you have any issues.

4. Ensure you are running NodeJS 18, and can run npm
node --version
v18.14.2 # You may see something different, ensure 18+.
npm --version
9.5.1 # You may see something different, ensure 9+.
5. Enable corepack
sudo corepack enable

HivePrint Pi

As mentioned above, the HivePrint code runs on the SBC, using node. You will need to download and install the HivePrint package.

Installation Instructions

warning

If you need to re-run these instructions for whatever reason, you should follow the uninstallation instructions first.

1. Set up the projects directory.
cd ~
mkdir projects
cd projects
2. Add the public GitLab NPM registry for HivePrint.
echo @hiveprint:registry=https://gitlab.com/api/v4/packages/npm/ >> ~/.npmrc
echo @dovetail-digital:registry=https://gitlab.com/api/v4/projects/28900673/packages/npm/ >> ~/.npmrc
3. Run the create script.
pnpm create @hiveprint/create-hiveprint-starter

This will prompt you for some information, namely the access token, printer IP, and server URL.

access token This will be generated for you by someone on the HivePrint team. This is what allows you to grab updates.

printer ip This is the IP of your printer. This will link to the Home button on the printer card within HivePrint. This will only be useful if you have UI that resolves to the printer IP. If you don't, just put 1.1.1.1 or literally anything.

server url This will be generated for you by someone on the HivePrint team. This is the server that will be responsible for your instance of HivePrint. All your SBC's will connect to this instance.

4. Copy the service file to /etc/systemd/system/
Check your node path

This instruction assumes your node executable is at /usr/bin/node. You can check using which node. If it is different, edit the hiveprintpi.service file replacing the node path with your node path.

Service file types

There are more than one type of printer we have a service file for. For most cases, if the pi running klipper is the mks user, you can use the service file in the qidi directory. If you need a different one, please create your own, or copy one from one of the existing directories in the templates directory.

Run one of the following:

Stable Version

This command will give you the stable version of HivePrint Pi. The stable version is not updated as often.

cd hiveprint-pi
sudo cp config/qidi/qidi-latest.service /etc/systemd/system/hiveprintpi.service
Next Version

This command will give you the next version of HivePrint Pi. The next version is updated more often. It is still fairly stable, but some issues may arise.

cd hiveprint-pi
sudo cp config/qidi/qidi-next.service /etc/systemd/system/hiveprintpi.service
5. Start the script with systemctl
sudo systemctl enable hiveprintpi.service
sudo systemctl start hiveprintpi.service
Sudo access

You may need to ensure that your pi user is able to run the sudo command without entering a password. If you are prompted for a password, add this to /etc/sudoers file pi ALL=(ALL) NOPASSWD: /bin/systemctl restart hiveprintpi.service

6. Restart moonraker if necessary

Sometimes the HivePrint Pi can trigger a bit too early on start up, or if the printer was rebooted. Manually restarting moonraker is the fix.

7. Updating

For updating, please follow the updating guide.