Setting up a Rock64 v3 for klipper / mainsail over serial
#1
Just thought if anyone was thinking/trying to use a rock64 to control their 3d printers with Klipper / Mainsail over serial, that this might help
I did this with four rock64 v3 and got everyone working exactly like my pis, controlling 2 Prusa MK3S each.
I am not a Linux user, I managed to piece this together for the first one and the other 3 went smoothly following this.
Some of these steps may be redundant or unnecessary, but the result is that it works.

Base Setup:

Wipe SD card with SD Card Formatter
Download and use Armbian Imager to image SD
select board and OS
I used OS Minimal 25.5.1 bookworm

sudo apt update && sudo apt upgrade
sudo apt-get install git -y
sudo apt install network-manager
sudo reboot

Set up wifi dongle: (you may need specific firmware for brand if not Linux native. Mine was, I used a Ralink dongle)

nmcli device wifi list
nmcli dev wifi connect "Your_WiFi_SSID" password "Your_WiFi_Password"
nmcli device status
sudo reboot


Setup Mailsail and klipper, just follow prompts to install 1-3 or follow a guide for Kiauh:

cd ~ && git clone https://github.com/dw-0/kiauh.git
./kiauh/kiauh.sh
(install 1, 2, and 3)
sudo reboot
sudo apt update && sudo apt upgrade


Reduced bootup time for no Lan connection from 2min to 10 sec:

find / -name "systemd-networkd-wait-online.service"
(This should be the location, but confirm with the find)
sudo nano /etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service

(add text under [Service])
TimeoutStartSec=10

(At this point you could run klipper over a usb to the printer
Mailsail/klipper web GUI is whatever IP the rock64 or wifi dongle grabs
It will be at the top of the screen when you ssh/login)

Tx/Rx setup on UART2/tty2:

sudo apt update && sudo apt upgrade

1.Overlays
sudo armbian-config
system>kernel>boot01
(added text to boot/armbianEvn.txt under overlay)
overlays=rk3328-uart1 rk3328-uart2 rk3328-uart3

2.Kernel
sudo armbian-config
system>kernel>ker001 - alt kernel
updated to the newest rock kernel

3.disabled console
sudo systemctl mask serial-getty@ttyS2

4. Added users to dialout group
sudo usermod -a -G dialout <username>
(confirm user is in dialout group)
groups

5. echo test with jumper if you want(jump the UART2 Tx and Rx pins(8,10) together with a wire, no ground needed)
sudo apt install picocom
sudo picocom -b 115200 -r -l /dev/ttyS2

Type anything, if writing appears port is working
ctrl a then ctrl x to exit

In your printer.config file under the MCU you will use
serial: /dev/ttyS2


Happy Printing!!!
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Rock64 - Simple Bare-Metal Example krjdev 1 7,046 01-24-2021, 11:59 PM
Last Post: krjdev
Information Manual: Howto cross-compile Upstream U-Boot for rock64 rock7 3 12,756 04-15-2020, 05:09 PM
Last Post: rock7
Thumbs Up A guide for how I made RetroPie, RetroArch, and EmulationStation Work on the Rock64 Mrfixit2001 4 21,309 12-17-2018, 03:52 AM
Last Post: va88
  Using the Movidius NCS with rock64 markjay 0 5,594 07-02-2018, 09:51 AM
Last Post: markjay
Information Guide - Setting up a NFS Share Ptheven 0 7,325 09-26-2017, 04:44 AM
Last Post: Ptheven
  Guide - Setting up a SMB(Windows) file server Ptheven 0 14,945 08-21-2017, 08:54 AM
Last Post: Ptheven

Forum Jump:


Users browsing this thread: 1 Guest(s)