-
-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When creating a print queue via command line, I cannot auto-select the driver #154
Comments
Note that |
This is especially important to get fixed as we need this for simple tools to guide users to set up their printer with a Printer Application. The tool could list printers available (on USB, non-IPP-2.x on network) and if the user selects one to set up he can get a menu of installed Printer Applications, the user chooses one and then the tool has to do see also the discussion about automatic printer setup on the OpenPrinting mailing list, thread "Automatic printer setup with Printer Applications". |
@tillkamppeter You're going to have to be patient, I'm in the middle of integrating my IPP-USB gadget code and that trumps any bug fixing at the moment... |
@tillkamppeter Can you verify whether your ps_autoadd callback is getting called? Everything appears to be plumbed correctly to allow this to work, so papplPrinterCreate should be calling your callback to get the actual driver name. If it gets |
I have found what the problem is: If the driver name "auto" is used, the autoadd_cb is called. The autoadd_cb() of the PostScript Printer Application (and in the future also of many other Printer Applications) requires the device ID to know which make and model the printer is. It immediately exits with NULL if the device ID is NULL. The server calls the function
The client, using the function The actual bug is that the device ID is nowhere polled from the printer. Polling the device ID is required for auto-determination of the driver. In addition, |
An additional hint for the best possible fix: Let the device ID be polled by the server, as in case of the Printer Application being a Snap, the server runs as root and the client runs as normal user (Issue #148) and with this the chances to obtain the device ID are much higher for the server. |
@tillkamppeter I will see about adding a 1284 query, but for 1.0 (at least) that will only work for USB printers because the code to try to query the 1284 ID for a network printer isn't hooked up - SNMP is unreliable at best and not all printers advertise the 1284 keys in the DNS-SD TXT record. |
In DNS-SD, if there is no device ID in the TXT record (can there be the complete one at all?) then next step is usb_mfg, usb_mdl, and usb_cmd for an artificial, but good enough device ID (which gives full functionality in the autoadd_cb() of the PostScript Printer Application and will work as well with any future Printer Application). If usb_mfg and or usb_mdl are myssing, needed info can get taken from ty and product, id usb_cmd is missing an artificial CMD: field can be constructed from pdls. So in DNS-SD one should always get enough info to supply a useful device ID. So both USB and DNS-SD should not be a problem, SNMP will sometimes work sometimes not. |
@tillkamppeter Please let me know about this issue and #153 so I can put out the 1.0.3 release. Thanks! |
OK, with my printer connected via USB it works now. It does not work with SNMP or DNS-SD URIs, will probably still need the appropriate device-specific backing for the Issue #153 is a problem of my printer as I have found out. I have no other printer for testing. So I am fine with 1.0.3 release. |
@tillkamppeter WRT DNS-SD, all you have are |
I want to create a queue via command line manually (not "autoadd", so that I can choose the queue name and also create a queue for a network printer) but I want to auto-select the driver, therefore I use
-m auto
:The queue does not get created as "auto" is not accepted as driver name. I get this result also if I use the network connection of the printer, by supplying the SNMP- or DNS-SD-based URI instead of the USB device URI.
The debug logging of the server is
The text was updated successfully, but these errors were encountered: