-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
USB connection only uni-directional #153
Comments
@tillkamppeter Can you attach the output from "lsusb -v" when the printer is connected? |
Here we go. |
Note that the fix of issue #156 did not fix this issue. The USB printers still get set up with only uni-directional access. |
@tillkamppeter It looks like it should detect the bidirectional interface and use it. The printer doesn't have any 7/1/1 interfaces so I'm puzzled as to the cause here... Can you try changing the read timeout in device-usb.c to 10 seconds, e.g.:
It's possible the printer just can't respond within 100ms... |
I have tried it out (with unsnapped ps-printer-app) and it still does not work. |
OK, try this patch:
|
Tried also this and it is even worse. Printer detected and set up, but when polling installable options the printer does not even make the noise to say that it has received the commands. |
Update: Running the Printer Application as root the printer makes the noise of having received the commands, so writing to the printer works, but reading from the printer does not work, no data is coming back within 10 seconds (reading every 100 msec), no error message from |
Another update: Thee bug seems to be in the printer, not in PAPPL. I did the following: For development of the PostScript Printer Application I hacked the original PPD file for my HP OfficeJet Pro 8730 (from HPLIP) with query code of the PPDs of some older LaserJet printers. With this PPD and the PostScript Printer Application I can actually query my printer, but only if it is connected via Socket/JetDirect (port 9100), not via USB. Therefore I opened this issue. The PPD is here: Now I tested with CUPS:
According to In the PostScript Printer Application I also only get timeouts, no USB I/O errors. So I recommend that you test this feature with another USB printer, preferably not HP. |
Note that this part of your second suggested patch is wrong:
You already replace the endpoint indices in
Replacing the endpoint indices twice makes things completely break, with the commands even not making it into the printer (and also no printing). The extension of the timeout and exiting from the read function when there is no read endpoint is OK, and I think we should do it even if we cannot prove with my printer whether it makes things better or not. |
@tillkamppeter OK, I've pushed some minor changes for the timeout and a new "--ps-query DEVICE-URI" option for the testpappl program that lets me test a simple PostScript query (to get the product string). Seems to work OK with my Lexmark and HP printers with PostScript support. |
Closing this now; works for me with the printers I have available... |
In my PostScript Printer Application I use printer functionality which requires bi-directional communication. This functionality is querying the printer for default settings (what in CUPS is done by the
commandtops
filter). This works perfectly for me when I connect to the printer via network (both the DNS-SD- and SNMP-based device URIs work) but not when I connect via USB. If I set up the printer with the USB device URI I can only use the uni-directional functionality (printing and identifying the printer) but not the bi-directional functionality (querying the presence of installable accessories and defaults of options). The printer receives the query jobs but there is simply no answer comming back. The Printer Application waits 10 seconds, then times out, tries the next query, ... For none of the queried options an answer arrives.I could not test with ink level queries as these are not yet supported (issue #83), but they will probably also not work via USB.
Perhaps PAPPL connects to the 7/1/1 interface and not to the 7/1/2 interface.
ipp-usb
is not running, I have stopped it and checked that there is no process of it. After that I have restarted the (non-snapped) Printer Application.The problem occurs for both the snapped and the non-snapped PostScript Printer Application.
Here is a log file (logging of PPD repository indexing removed):
ps-printer-app-log-usb-unidirectional-20210221.txt
Printer is the HP OfficeJet Pro 8730 (It has bi-directional USB, as a 7/1/2 interface is available).
The text was updated successfully, but these errors were encountered: