Thread Rating:
  • 0 Vote(s) - 0 Average
Information needed on upload + print automation
#1
Hey folks,

So, like many of you (I'm sure), I've already automated away the USB thumb drive and "sneakernet" approach of getting files to the printer by using the Linux g_mass_storage module to export a USB drive image and then also loopback mounting that image to re-share over SMB, so yay, now Chitubox on Linux/Windows/Mac can easily save files to a network share and whatever client machine of choice you have, and no USB thumb drives plugging in and out.

But... That's not enough, is it?   We also want to tell the printer to PRINT a file that we have just sent to the file share and we know that we can use inotify to watch the mount point for the arrival of files (and can see open/write/close to know that the file is fully "there" and not just an upload in progress), but the missing piece is how to control the printer without having to attack it with a soldering iron, which nobody wants to do.  Fortunately, the Saturn (and maybe other Elegoo models) has an *ethernet* port that it will happily accept uploads and print commands from, as the integration with Chitubox demonstrates, but the ethernet port only solves part of the problem because:

A) Whatever file transfer protocol that Chitubox is using with "Network send", and I haven't wiresharked it yet but it kind of doesn't matter because I can't change it, it's very very slow - nowhere near as fast as sending the files over SMB - and on a Wifi->Ethernet connection (even with 1GbE and 5Ghz wifi) it basically times out on anything worth printing.

B) It still assumes that the user has both wifi and ethernet available wherever the printer is, and while that may be true in my case just because I happen to have ethernet in my garage, it seems a long-shot to imagine many people being in the same boat.  Wifi is great.  Let's use wifi!

So, here's my Cunning Plan™ that just requires a bit of API knowledge from our friends at Chitubox:   I'll grab a Wifi+Ethernet capable Raspberry Pi out of the box (cheap, easy) and configure it to run a DHCP server on the LAN interface, exporting the virtual USB thumb drive over USB bus as it does today.  Then I will vend a DHCP address to the printer, using a point-to-point ethernet cable connection *directly with the printer* so there is no need for any other ethernet infrastructure.  Two cables from the Pi to the printer, power to the Pi, that's it - put the Pi on your wifi network and you're good to go after logging into the PI and answering a few questions about default username/password to use for SMB ownership of the virtual thumb drive so that the SMB side works and you have write access from the client.  Easy, right?

Well, sort of.  I need the API docs to know how to discover the printer's IP address over the private LAN and how to tell it to print a file that it sees on the USB port.  With those two pieces of information, I'm good to go on "one touch printing over SMB".

Anyone know where I can get that doc?   Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)