Copy files to Ender 3 SD card via usb WITHOUT Octipi/Octoprint - raspberry-pi

I have a Raspberry pi that I am using for various other IOT things which is pretty busy, but I want to be able to connect my Ender3 3d printer USB to it so I can just copy files to the SD card. Right now, I'm pulling the card, copying files, replacing the card.
I know I can use Octopi/Octoprint but I'm just wondering if there is a simple way to get the ender3 SDcard to a mount point on the Raspberry pi so I can just remote into the Pi, upload the files and then start the printer. The printer sits on my desk so I can easily start printing using the dial. I'm just trying to avoid having to sneakernet the files to the sd card.

When you open Octoprint you can drag and drop gcode files to it in order to print.
Dropping on the left hand side of the screen stores them on the Pi dropping on the right side stores them on the SD card.
You can also click the upload to SD card button on the left hand side to do the same. Just under the list of files
once those are uploaded you can just use the printer from the front panel easily and print these files. The pi only needs to be connected in order to transfer the files.
Sorry I don't have the reputation to add images to a post to show more clearly.

Related

RASPBERRY : Write to an external microSD card in SPI mode

I have already posted this question on the raspberry forum but I only got a few answers that didn't solve my problem... I have been waiting for a month so I turn to this forum hoping to be able to find a solution there...
PS : do not hesitate to check my post on RPI forum to see my progress and my research/tests carried out (https://forums.raspberrypi.com/viewtopic.php?t=335338)
So here is my problem :
I have been looking for a while how to write to an external microSD card in SPI mode...
My goal is to write data collected by a sensor an store them on various microSD cards (6) by using CS. But at this point, I'm tring to write data on one card.
I'm using a RPI Zero 2W, a simple microSD card module and an 512GB microSD card (with exFAT filesystem).
I saw that there was a "mmc_spi" driver included in a linux kernel which allows to detect an SD card connected by SPI as if it were a USB key to which we could simply access/read/write (https://ralimtek.com/posts/2016/2016-12-10-raspberry_pi_secondary_sd_card/)
the problem is that this tutorial is not working anymore... In fact, the linux Kernel used in the tuto is an old one compare to the current version and and I had confirmation that the "mmc_spi" driver used to detect the SD card had evolved but the use of this new version is not documented and obviously does not work like the old one...
So my question is : does the mmc_spi driver still allows to detect SD cards and access them and if yes, does it works with the PI zero 2W ?

How to create a small system to randomize file names on a USB stick?

I bought a USB stick and put like 700 songs on it, so that I can plug it into my car radio, put it on shuffle and never get tired of listening to the same songs over and over again.
Turns out the car radio stops at (of course) 256 songs, so it will not play the ones with a higher ID than that.
Now I thought it would be cool to have like a Raspberry Pi where I plug the USB stick in, hit a button and the songs on it just get random names. That way the first 256 songs will be different every time I do it.
I already worked with Raspberrys, so I would know how to do that, but I honestly don't want to buy a Raspberry Pi just for that. Is there a smaller, cheaper option to achieve the same? I have an Arduino nano, but that won't work, right?
If you have a smartphone you can use OTG cables. That way you can read your usb stick to your smartphone and make a small script or app for your device to randomise the names

"Minimal Image" of Raspberry Pi SD Card

I have a small IOT app that I've developed on a Raspberry Pi. I'd like to try running the app of a few other Pi's around my apartment. I can make a disk image of the sd card with dd, but, the original disk is 32gb and mostly empty. Is there a way to make a disk image of just the contents of a drive/sd card? This way i can make copies to smaller (cheaper) sd cards. The original SD card was set up with NOOB.
Ordinarily, I'd deploy with something like ansible, but installing all the libraries used took over 8 hours!

Raspberry Pi resize SD Backup - HDDRawCopy1

I have been using HDDRawCopy to make backup copies of the SD cards for my Raspberry Pi's. It works well and has saved me several times when I have accidently damaged the SD card.
However, several months ago I restored an 8GB SD card image to a 16GB SD card without realizing it. Now, a lot of water has passed under the bridge (changes, new data, etc and several backups) and I want to go back to one of the recent backups.
Yesterday I discovered that a the more recent backup images think they need to be restored to a 16 GB card and fail if I try to restore to an 8GB card, even though I know it would fit.
Is there any way to take the current 16GB SD card and resize it to fit on an 8GB SD card?
I never used that tool. But I used DD in linux, it actually backes up even the empty space..and that is really hard to solve from the .img.
My suggestion is that you flash the backup onto a 16 gb card, flash the vanilla os that u used on a 8gb one, and then copy the files from one to another in a file explorer (only copy the partition that windows can open, the other one/s needs to remain intact)...in raspbian it shall work..

How to bind SD card to Raspberry Pi

Is there a way to make sure that SD card of Raspberry PI works only with particular device only?
I do not want anyone to use the SD card with any other Raspberry Pi device other than specified.
Is there a way out?
There is no simple way do do this. Of course you can build some trickeries based on Device Informations (fsys and udev) and crypt your disk. But, it is clearly impossible to guarantee system integrity when the storage device is physically reachable: anyone can mount it and some aware/clever guy, using enough time and effort, shall reverse engineering it.
See this guide for Arch linux: https://wiki.archlinux.org/index.php/Disk_Encryption
If you encrypt your filesystem only he have the password can decrypt the sdcard. This prevent unauthorize access for example from the Windows/Linux to the sd card files.
But if you boot from the PC you are in the same problem.
The only thing that comes to mind is to make a script that controls a device that exists only on raspberry is available and if not, automatically encrypt the system.