-   Linux - Newbie (
-   -   how cups identifies locally connected usb printers (

akhilbaai 11-19-2015 05:03 AM

how cups identifies locally connected usb printers

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?
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

Another decent reference is 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

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