Project

General

Profile

cups-laos backend should be a network printer

Added by m.winkler about 12 years ago

This is bugging me for some days now so i open this thread to clear out some questions.

While i was compiling the cups-laos backend for OSX i had some insights into how the driver works.
Some thinks are not so clear for me, i think that by definition the driver is a Network Printer driver ( it is connected over ethernet ).

While i had the problem to not be able to edit the deviceURI for the driver trough CUPS admin pannel i read about CUPS backend programming,
and the situation is basically that:

KDE + Gnome tools allow you to alter setting in /etc/cups/printers.conf
but the CUPS API is not made to do such thinks.

I have no idea why tftp was chosen to upload the gcode file, i can only guess that the firmware has a build in tftp server.

Why not use http or ipp and make the driver a Network Printer driver ?
mbed can run a httpd.

That would make much more sense, and would prevent futur problems , it would be just much more CUPS alike.

So please prove me wrong and give me some insights why tftp was the way to go.


Replies (7)

RE: cups-laos backend should be a network printer - Added by Daid about 12 years ago

a) I've invested some time in the CUPS driver. And I recommend against it. It's way more buggy then visicut.
b) The firmware indeed is running an tftp server, this is quite normal for embedded devices with limited flash/ram. Running a full blown cups in the firmware would be very hard to impossible.

RE: cups-laos backend should be a network printer - Added by jaap about 12 years ago

Daid: yes, there are bugs in the cups driver. But also in Visicut. Feel free to fix them, it's a very simple driver so it cannot be to complicated ;-)

M.Winkler: Running a "network printer service" involves running "the service" as Daid points out, which could be done but would at least require an RTOS in the firmware. We don't have that yet, but it's on our todo-list. Another problem is that the MBED is not powerful enough to convert incoming postscript files to machine movements. On my fast laptop, conversion can take up to 1-2 minutes when I send a big raster drawing to the cups driver. So even when using a printer-like network interface, there should be some kind of file-conversion on the computer-side before the file goes to the MBED.

One of the solutions we think of is making a pre-installed CUPS server on a Raspberry PI. If that works, you could use that as a network printer driver. The PI is not as fast as a desktop PC, but it can do a lot more math then the MBED.

It's all work in progress, and Peter and me would very much welcome any help we can get in improving the workflow. Also, the choices we made might turn out to be temporary solutions. If TFTP should be replaced by something more printer-like, why not?

RE: cups-laos backend should be a network printer - Added by Daid about 12 years ago

jaap, I rather fix the firmware first. (I still see power problems at low speeds)
And the driver, with ps2edit, it is not the easiest software. But the biggest bug is that inkscape doesn't send the printer settings. Which makes the driver 100% useless for all my usecases.

RE: cups-laos backend should be a network printer - Added by jaap about 12 years ago

Inkscape doesn't send the printer settings? That's a new bug for me. As far as I know, it does. I get whatever I set in Inkscape in the LGC file.

RE: cups-laos backend should be a network printer - Added by peter about 12 years ago

There is a general problem with inkscape on WINDOWS. It does not respect the printer dialog settings.
This is not only true for Laos, but for every other printer type also (unless the printer driver implements his own custom
page with persistent settings). All standard windows and postscript PPD settings are lost.

You can modify the defaults of the printer (afaik) and it should use these.

@morris: Indeed, HTTP, IPP, or LPR/LPD would be better. Originally we had a TCP/IP socket interface, that was easier to
use by the client. But we wanted file up and download (for config files, firmware and jobs) so we opted for TFTP.

implementing IPP or LPD would be possible, but requires some implementation work.
Have you ordered your MBED or LPCXPRESSO already? (I can ship a board one to anyone who is willing to implement the TCP/IP stack on the lpcxpresso)

RE: cups-laos backend should be a network printer - Added by Daid about 12 years ago

FYI: I had the Inkscape problem on LINUX.

RE: cups-laos backend should be a network printer - Added by jaap about 12 years ago

Then maybe you should try again. The latest version most certainly sends it's speed and power values to CUPS, I tried it this weekend!

    (1-7/7)