Posted

For my 3D printer watchdog project, I am using Kotlin with IntelliJ. To avoid the hassle of uploading and remote debugging, I use the Embedded Linux JVM Debugger for Raspberry Pi plugin for IntelliJ, which is very straightforward.

On the other side, I use a Raspberry Pi 1 Model B with DietPi installed. DietPi v9.5.1 (Linux 6.1.21+) comes with Dropbear installed as the default SSH server, but this doesn’t work with the plugin. Running an application with that combination results in an IOException (-1).

The reason for that seems to be the missing SFTP service, which, as far as I know, is not available with Dropbear.

However, switching to OpenSSH with SFTP solved that issue.

Author
Categories 3dPrinter, Intellij

Posted

As I calibrated my printer, I observed a kinda strange issue. While moving my Z axis up and down repeatedly, I measured different lengths. Up and Up gave me exact 10mm. Down and down another 10mm. But sometimes it measured only 9.8mm. So, what was wrong?

After some testing, I figured out that it only happens during a direction change. This means I can lift my Z-axis by 10mm as often as I want, but the next time I lower the Z-axis, it will measure 9.8mm.

For a system with gears, I expected this because gears need to have some space to fit inside one another. Therefore, the space will cause such behavior. But with a direct-driven Z-axis, this was unexpected.

I don’t think that this was because the screw was worn due to the weight of the X-axis, which is hanging on it with some pressure. So, for me, the current drop during direction change could be a reason.

However, the Marlin firmware can handle this if it’s not a mechanical issue. Search for BACKLASH_COMPENSATION to enable it.

Author
Categories 3dPrinter

Posted

This is a wonderful laptop and since it has a lot to give and was laying around I decided to use it as server.

Shutoff display
One problem to solve was that the display stayed on all the time. To solve that, I had to insert the command consoleblank into the GRUB command line:

GRUB_CMDLINE_LINUX="consoleblank=30"
That will switch off the display after 30 seconds. To do that I opened /etc/default/grub with an editor. And inserted “consoleblank=30” into the already existing line:
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="consoleblank=30"
after that call:
update-grub

Disable action on Lid changes
The second thing I wanted to disable was the action for lid changes. Since I don’t want to open or close it all the time, but there may be a time, I have to move it to another location. To disable that action, I opened /etc/systemd/logind.conf with an editor, removed the hashtag on all lines that contain the word HandleLidSwitch, and changed the values to ignore:

#HandleHibernateKeyLongPress=ignore
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
After that, call:
systemctl restart systemd-logind

To test the changes, I rebooted the server.

Backup drives
Since I have a backup drive from a former Proxmox installation, I wanted to add it again. First, I wanted to mount it. To do so, I used fstab and the mount command. But before I could start, I needed the UUID and the folders prepared, so I created a folder in /mnt/:

mkdir -p /mnt/backup
To get the UUID and the file system type, I called lsblk in the console with some self-chosen columns:
lsblk -o name, uuid,type,size,tstype

Then I inserted the data into fstab:

UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /mnt/backup ext4 defaults 0 0
After that, reload:
systemctl daemon-reload
Let’s test:
mount -a
ls /mnt/backup

It should show the contents of the disk. Then, add it as directory to storage.

Author
Categories Proxmox, Post Installation