On Tuesday 13 June 2006 20:13, Suffield, David wrote:
> Hi Anish,
> Are you getting the timeout after the select() or the write() in
> hpiod?
After the write().

>
> If you are getting the timeout after the write(), you may be losing
> data when you close(endpoint_fd) between retries. The write() may
> timeout after writing a partial buffer. Then the close() will kill
> any remaining partial buffer.
Yes, that is what seems to be happening.  How should a timed out write 
be handled?

>
> -dave
>
> > -----Original Message-----
> > From: Anish Mistry [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, June 07, 2006 7:46 PM
> > To: Suffield, David
> > Cc: hplip-devel@lists.sourceforge.net
> > Subject: Re: [HPLIP-Devel] FreeBSD Porting
> >
> > On Tuesday 25 April 2006 18:11, Suffield, David wrote:
> > > Hi Anish,
> > > I appreciate your FreeBSD support. I finally got a chance
> >
> > to look at
> >
> > > HPLIP patches and basically they look ok, but I do have
> >
> > some questions
> >
> > > about your libusb changes in patch-io_device.cpp.
> >
> > Ok, now that the ugen driver has been fixed in CURRENT, I'm
> > trying to make the hpiod FreeBSD code correctly handle timeout
> > events on the device.  I've attached the latest patch that I'm
> > using.
> >
> > Where I am so far:
> > > Test scenario:
> > >
> > > 1. Remove the paper from the printer.
> > > 2. Start a print job from the PC.
> > > 3. HPIOD Device::Write should timeout and report the
> > > out-of-paper condition to "hp" CUPS backend. 4. The "hp"
> > > backend should
> >
> > retry the
> >
> > > Device::Write every 30 seconds. 5. Manually clear the
> > > paper-out-condition at the printer.
> >
> > We're good up to here. write() times out and I see the
> > out-of-paper condition appear in the hp-toolbox status.
> >
> > > 6. The print job should continue and finish printing
> >
> > without any loss
> >
> > > of data or artifacts.
> >
> > Once I've cleared the out of paper condition and press "OK" on
> > the Officejet it starts to resume the print job, but stops after
> > printing just the top bit of the page.  If I try to refresh the
> > device from hp-toolbox the following error code is displayed on
> > the LCD output: Error: 0xd0840001
> >
> > At this point I need to pull the power on the Officejet, and
> > restart hpiod, hpssd, and cupsd to bring the device back to a
> > good state.  If I don't restart hpiod it will keep giving be the
> > error stated above after I plug in the power.
> >
> > I'm pretty sure I'm doing something wrong with the
> > Read/Write.  If you
> > spot anything in the patch let me know.
> >
> >
> > Thanks,
> >
> > --
> > Anish Mistry
> > [EMAIL PROTECTED]
> > AM Productions http://am-productions.biz/

-- 
Anish Mistry
[EMAIL PROTECTED]
AM Productions http://am-productions.biz/

Attachment: pgpLq6M68vJ5F.pgp
Description: PGP signature

_______________________________________________
HPLIP-Devel mailing list
HPLIP-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hplip-devel

Reply via email to