LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how cups identifies locally connected usb printers (https://www.linuxquestions.org/questions/linux-newbie-8/how-cups-identifies-locally-connected-usb-printers-4175559284/)

akhilbaai 11-19-2015 05:03 AM

how cups identifies locally connected usb printers
 
Hi,

I would like to use cups APIs for setting up printing system in an embedded target.
I don't want the entire cups features but basic installation and dot-matrix graphics printing is required.

When I connect a usb printer to my Ubuntu pc,
I can see the connected printed listed in cups web interface..

I'm interested in knowing what happens under the hood from connecting usb printer and cups identifying it.. what are the required cups APIs that can perform the same ?

Habitual 11-20-2015 02:46 PM

I'm gonna venture a calculated guess that the Common Unix Printing System polls the system using dmesg, or dbus?

https://www.openprinting.org/downloa...onnections.pdf
says this:
The backends do not only send data to the appropriate devices. They are also called when CUPS
is started. They autodetect which printer models are connected to which ports.

But it doesn't say how auto-detect is accomplished. And only mentions parallel ports and bi-directional
communications.

Another decent reference is https://wiki.gentoo.org/wiki/Printin...nter_.28USB.29 which only says
USB support enabled as some printer drivers require the usblp kernel module.

and mentions dbus on that page as an option for "emerge" (their package manager)

So, I conclude dmesg and/or dbus. :)

Kernel module stuff all gets 'trapped' by dmesg.

I hope that's helpful.

See also the API references at http://cups.org/documentation.php/doc-2.1/api-cups.html


All times are GMT -5. The time now is 07:37 AM.