I ran into a similar problem while hacking the HP backend to support HP
OfficeJet MFPs connected to HP JetDirect print servers. The problem is that
when I close the network scan connection to the JetDirect, it keeps the scan
connection to the peripheral open for several more seconds. As a result, if
I try to reconnect to the JetDirect during this time, I get a "busy"
indication, and I have to delay and retry.
This was particularly problematic because I tend to get numerous
close-and-reopen request sequences in a row, and very quickly, which slowed
the GUI down to a crawl throughout operation! I think these frequent reopens
are due to somebody (perhaps the frontend?) wanting to do a SCSI TEST UNIT
READY operation on the scanner? This operation has no effect on non-SCSI
connections (which certainly is the case here), but the open and close still
For the time being, I solved this problem by caching the file descriptor I
get from the first open, faking out subsequent closes, and reusing the
cached file descriptor upon subsequent opens. This "solution" causes two
other problems, however: (1) Multiple MFPs cannot be specified in hp.conf,
since the connection to the first device will be recycled upon connection
attempts to subsequent devices. (2) Because the network connection to the
JetDirect is so persistent, the MFP is hogged by the xscanimage or xsane
user such that nobody else can scan on that device, for example through
JetDirect's web-scan feature.
If anybody has ideas on better ways to deal with this issue, I would
greatly appreciate hearing about them. Again, my web page is at
-- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail firstname.lastname@example.org