First Commit

This commit is contained in:
Chillcog committed 2026-07-13 20:37:39 -07:00
1 parent f92ebd0125
commit 4ea9b0f4ef
30 files changed
+229 -178

No files matched your search

+1 -176
View File
@@ -1,176 +1 @@
# ---> CMake
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
CMakeUserPresets.json
# ---> ArchLinuxPackages
*.tar
*.tar.*
*.jar
*.exe
*.msi
*.zip
*.tgz
*.log
*.log.*
*.sig
pkg/
src/
# ---> C
# Prerequisites
*.d
# Object files
*.o
*.ko
*.obj
*.elf
# Linker output
*.ilk
*.map
*.exp
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
# Debug files
*.dSYM/
*.su
*.idb
*.pdb
# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf
# ---> VisualStudioCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
# Local History for Visual Studio Code
.history/
# Built Visual Studio Code Extensions
*.vsix
# ---> JetBrains
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# SonarLint plugin
.idea/sonarlint/
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
*.log
+55 -2
View File
@@ -1,3 +1,56 @@
# tailscale-on-flashforge-ad5m
# Tailscale For Adventurer5M
<a href="https://"><img src="https://img.shields.io/badge/License-GPL3.0-orange" alt="License - Apache"></a> <a href="./"><img src="https://img.shields.io/badge/Version_-1.0.0-green" alt="Version - 1.0.0"></a> <img src="https://img.shields.io/badge/maintained-yes-green" alt="maintained - yes"> <a title="Go to contributions doc"><img src="https://img.shields.io/badge/contributions-welcome-blue" alt="contributions - welcome"></a>
<br>
Hi, so you must be just as crazy as I am. You found this after all. This is a guide on how to install tailscale on your Adventurer 5M (unsure if it will work on the AD5M Pro).
Project that aims to allow you to put tailscale on and Flashforge Adventurer 5m 3D printer.
<details><summary>Installation Steps:</summary>
1. Go to the releases tab and get the latest release, its a .zip file don't **download the repository archives**.
2. Load the zip file onto an empty usb of really any size that will fix it formatted to FAT32 unzip the file so that it is in the root of the usb should look like this:
![folder image](guide-images/guide1.png)
3. You need to edit the ssh public key! You can open it with notepad/vim/nano and its located in `klipper_mod/root/.ssh/authorized_keys` I have my own key set but you can generate one at [https://showdns.net/ssh-key-generator](https://showdns.net/ssh-key-generator) Or via powershell/bash if you know how to
4. After you have done that delete the original .zip file and you can then eject your usb and put it in the usb slot of your Flashforge AD5M located near the display. Then just Simply Reboot your printer wait for the install you should see this:
![installing screen](guide-images/guide2.jpg)
5. When it changes to this:
![installed screen](guide-images/guide3.jpg)
and chimes you can take out the usb and restart the printer
6. Now you need to connect your device to wifi, if you know how to do this skip to step 9.
7. First navigate to more![main screen](guide-images/guide4.jpg)
Then to wifi and find your network and sign in ![more screen](guide-images/guide5.jpg)
8. Grab the wlan ip, its 192.168.0.110 for me keep it for later
![network screen](guide-images/guide6.jpg)
9. Get an ssh client such as putty, kitty or termius. I will be using termius as it is by far the easiest and most user friendly
10. Grab that ssh private key you made earlier
![ssh key screenshot](guide-images/guide7.png)
11. In termius go to keychain and press new key name it whatever and paste that private key into the private key section then when you do that go back to the hosts tab ![termius key creation screenshot](guide-images/image.png)
12. Make a new host set the ip you saved from the printer earlier into the ip/hostname area set the username to root and select the key you just created as authorization. Then press connect.
![termius host details screenshot](guide-images/image-1.png)
13. Now you are now connected to ssh
![termius connected to AD5M screenshot](guide-images/image-2.png)
14. There is only a single command we need to do `tailscale up` and there you go you are all set after you login with the link it gives you
15. You should see the device in your tailscale now!
![Tailscale screenshot](guide-images/image-3.png)
</details>
## Manual Install (Havent made this yet)
This is more manual than the first option and might be better for you
see [manual install](manual-install.md) for the guide
## Feature Overview
## Optional Features
BIN
View File
Binary file not shown.
+99
View File
@@ -0,0 +1,99 @@
#!/bin/sh
set -ex
# workdir contains our update files
cd "$(dirname "$0")"
WORK_DIR="$(pwd)"
MACHINE=$1
PID=$2
# error handling
error_handler() {
xzcat $WORK_DIR/img/install_fail_error.img.xz > /dev/fb0
sync
# always exit without error, to prevent immediate boot of flashforge software
exit 0
}
trap '[ $? -eq 0 ] && exit 0 || error_handler' EXIT
do_setup()
{
# safety check, only install on supported printer
if ([ "$MACHINE" != "Adventurer5M" ] && [ "$MACHINE" != "Adventurer5MPro" ]) || \
([ "$PID" != "0023" ] && [ "$PID" != "0024" ]) || \
[ "$(uname -m)" != "armv7l" ]
then
echo "Update file does not match machine type."
xzcat $WORK_DIR/img/install_fail_vers.img.xz > /dev/fb0
exit 0
fi
# saftey check, only install on supported versions
FF_VERSION="$(cat /root/version)"
MIN_VERSION="2.4.5"
if [ "${FF_VERSION//./}" -lt "${MIN_VERSION//./}" ]
then
echo "Printer software version not supported."
xzcat $WORK_DIR/img/install_fail_vers.img.xz > /dev/fb0
exit 0
fi
MOD_INIT_FILE="/etc/init.d/S00klipper_mod"
MOD_INIT_FILE_OLD="/etc/init.d/S90klipper_mod"
MOD_DIR="/data/.klipper_mod"
# chroot is replaced on mod upate or reinstall
# other data in .klipper_mod is kept, unless uninstalled
CHROOT_DIR="${MOD_DIR}/chroot"
# update start image
xzcat $WORK_DIR/img/install_start.img.xz > /dev/fb0
# --------------------------------
# uninstall previous mod version if present - keep other data in .klipper_mod
rm -f $MOD_INIT_FILE
rm -f $MOD_INIT_FILE_OLD
rm -rf $CHROOT_DIR
# check free space, we require 512MB before installation for saftey reasons
FREE_SPACE=$(df /data | tail -1 | tr -s ' ' | cut -d' ' -f4)
MIN_SPACE="524228"
if [ "$FREE_SPACE" -lt "$MIN_SPACE" ]
then
echo "Not enough free space on data partition. 512MB required!";
xzcat $WORK_DIR/img/install_fail_mem.img.xz > /dev/fb0
exit 0
fi
# calculate checksums to be printed in the log
if ls /mnt/Adventurer5M*; then
md5sum /mnt/Adventurer5M*
fi
md5sum $WORK_DIR/chroot.tar.xz
# unpack chroot environment
mkdir -p $CHROOT_DIR
xz -dc $WORK_DIR/chroot.tar.xz | tar -xf - -C $CHROOT_DIR
sync
# do intial setup
$CHROOT_DIR/etc/init/S00klipper_mod setup
sync
# install initfile
cp $CHROOT_DIR/etc/init/S00klipper_mod /etc/init.d/
sync
# update end image
# --------------------------------
xzcat $WORK_DIR/img/install_ok.img.xz > /dev/fb0
}
# write log (if mount point is found)
if grep "^/dev/sd[ab12]* /mnt " /proc/mounts; then
do_setup &> /mnt/klipper_mod_install.log
sync
else
do_setup
fi
exit 0
Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 659 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,4 @@
[Unit]
Description=Tailscale is online
Requires=tailscale-wait-online.service
After=tailscale-wait-online.service
@@ -0,0 +1,12 @@
[Unit]
Description=Wait for Tailscale to be online
After=tailscaled.service
Requires=tailscaled.service
[Service]
Type=oneshot
ExecStart=/usr/bin/tailscale wait
RemainAfterExit=yes
[Install]
WantedBy=tailscale-online.target
@@ -0,0 +1,8 @@
# Set the port to listen on for incoming VPN packets.
# Remote nodes will automatically be informed about the new port number,
# but you might want to configure this in order to set external firewall
# settings.
PORT="41641"
# Extra flags you might want to pass to tailscaled.
FLAGS=""
@@ -0,0 +1,23 @@
[Unit]
Description=Tailscale node agent
Documentation=https://tailscale.com/docs/
Wants=network-pre.target
After=network-pre.target NetworkManager.service systemd-resolved.service
[Service]
EnvironmentFile=/etc/default/tailscaled
ExecStart=/usr/sbin/tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/run/tailscale/tailscaled.sock --port=${PORT} $FLAGS
ExecStopPost=/usr/sbin/tailscaled --cleanup
Restart=on-failure
RuntimeDirectory=tailscale
RuntimeDirectoryMode=0755
StateDirectory=tailscale
StateDirectoryMode=0700
CacheDirectory=tailscale
CacheDirectoryMode=0750
Type=notify
[Install]
WantedBy=multi-user.target
Binary file not shown.
Binary file not shown.
+23
View File
@@ -0,0 +1,23 @@
#!/bin/sh
case "$1" in
start)
echo "Starting tailscaled..."
tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/var/run/tailscale/tailscaled.sock --tun=userspace-networking > /dev/null 2>&1 &
;;
stop)
echo "Stopping tailscaled..."
killall tailscaled
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
exit 0
+4
View File
@@ -0,0 +1,4 @@
# This is my ssh key you can change this you will need ssh access
# Use this if you don't know how to make one https://showdns.net/ssh-key-generator
# Put the public key here
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9JE+YM5NO3RSLh9B0Q9PLny8VdC/TrS5R50aZpDEvu
View File
Whitespace-only changes.
View File
Whitespace-only changes.