|
From: Suffield, D. <dav...@hp...> - 2007-07-24 19:24:48
|
Thanks everybody for your feedback. Now I have a better understanding of =
your use case. This looks like a case where we don't necessarily follow =
the Sane specification. Since the old hpaio code ignored localOnly and =
seemed to work ok, I see no reason for not changing it back. It should =
be fixed in the next hplip release.
-dave=20
> -----Original Message-----
> From: Hernan Pastoriza [mailto:he...@ca...]=20
> Sent: Tuesday, July 24, 2007 6:10 AM
> To: Suffield, David
> Subject: Re: Bug: hplip >=3D1.6.12 breaks support for the sane=20
> network daemon
>=20
> Hi Dave,
> Thanks for answering.
> My reason is simplicity and access control.We have the C5180=20
> in a ghost network, only local to our server and through=20
> saned and cups we provide access to the scanners and printers=20
> to our users. In this sense, our C5180 and printers are only=20
> local to the server but no to the clients.
> We must setup some complicated routing in the server to make=20
> the printers visible to the clients at the network level. And=20
> no, I can not connect them by USB as there are several rooms apart.
> I don't know who must care about our configuration, saned or=20
> hplip. My first impression is that hplip.
> I interpret that the localOnly is for those devices that are=20
> not accessible through the sane net protocol, which is this=20
> case as the control of the data through the wire is done by=20
> hplip right?
> Again I am not a developer just an user that tried to figure=20
> out what happened. As I read in several mailing list I wasn't=20
> the only one, and there were no clear answer to it (only:=20
> stay with hplip < 1.6.10...)
>=20
> Thanks again for your time,
>=20
> Hern=E1n
>=20
>=20
>=20
> Suffield, David wrote:
> > Hi,
> >
> > Why would you use saned with a networked PS C5180? Since=20
> the PS C5180=20
> > is networked, you can use xsane from any PC without saned.
> >
> > According to SANE Standard v1.04, when localOnly is true during=20
> > sane_get_devices, no remote devices are returned. This means only=20
> > USB/Parallel devices are returned.
> >
> > I would use saned if the all-in-one was USB connected only.=20
> Then the=20
> > hpaio.c code should work correctly.
> >
> > -dave
> >
> >
> > =20
> >> -----Original Message-----
> >> From: Hernan Pastoriza [mailto:he...@ca...]
> >> Sent: Friday, July 20, 2007 2:14 PM
> >> To: hpl...@li...
> >> Cc: dsu...@us...
> >> Subject: Re: Bug: hplip >=3D1.6.12 breaks support for the=20
> sane network=20
> >> daemon
> >>
> >> I tracked down
> >> this problem to the file:
> >> scan/sane/hpaio.c
> >>
> >> The function DevDiscovery(int localOnly) skips the=20
> detection of cups=20
> >> connected devices if localOnly is set. This flag is=20
> passed as TRUE=20
> >> by scaned, probably to avoid a loop with itself.
> >> I think that hplip is misunderstanding this flag.
> >> I just commented out the respective "if" (line 291 of hpaio.c in
> >> hplip-1.7.4a)
> >> and now it works.
> >>
> >> This is very crude but in this way saned is working with=20
> >> libsane-hpaio again.
> >>
> >> I hope this helps.
> >>
> >> Hernan
> >>
> >>
> >> This is the patch:
> >>
> >>
> >> diff -rup hplip-1.7.4a/scan/sane/hpaio.c=20
> hplip-1.7.4/scan/sane/hpaio.c
> >> --- hplip-1.7.4a/scan/sane/hpaio.c 2007-03-16=20
> >> 21:09:04.000000000 -0300
> >> +++ hplip-1.7.4b/scan/sane/hpaio.c 2007-07-20 16:17:38.000000000=20
> >> +++ -0300
> >> @@ -288,7 +288,7 @@ static int DevDiscovery(int localOnly)
> >> }
> >> }
> >> =20
> >> - if (!localOnly)
> >> + if (1)
> >> {
> >> cnt =3D GetCupsPrinters(&cups_printer);
> >> for (i=3D0; i<cnt; i++)
> >>
> >>
> >>
> >>
> >>
> >>
> >> =20
> >>> I've discovered a bug in hplip which makes it impossible to
> >>> =20
> >> share the
> >> =20
> >>> scanner of a networked HP Photosmart C5180 using the sane network=20
> >>> daemon (saned).
> >>>
> >>> In theory saned is supposed to provide access to a
> >>> =20
> >> connected scanner
> >> =20
> >>> (using e.g. the hpaio backend). Each client on the network which=20
> >>> supports sane should now be able to connect to the server
> >>> =20
> >> running the
> >> =20
> >>> sane network daemon and access the server's scanners -
> >>> =20
> >> without needing
> >> =20
> >>> any special drivers (because the driver, hplip in my case
> >>> =20
> >> is installed
> >> =20
> >>> on the server).
> >>> And this setup worked well with all hplip versions up to 1.6.10.
> >>>
> >>> I've tried many different distros now to get this feature
> >>> =20
> >> to work with
> >> =20
> >>> newer versions of hplip, but I was not successful:
> >>> Ubuntu 7.04 - hplip 2.7.6 - saned not working Gentoo=20
> 2006.1 - hplip
> >>> 1.6.12 & 1.7.3 - saned not working Debian 4.0 - hplip=20
> 1.7.3 - saned=20
> >>> not working openSuSE 10.2 - hplip 1.7.3 - saned not working
> >>>
> >>> Scanning (locally, on the server) and printing (locally and
> >>> =20
> >> over the
> >> =20
> >>> net using
> >>> cups) works fine in all cases.
> >>> Of course I am not using any firewall or other related=20
> >>> software/hardware which could block the saned=20
> functionality (and it=20
> >>> works with 1.6.10).
> >>>
> >>> For further details (output of saned, etc.) you might want
> >>> =20
> >> to take a
> >> =20
> >>> look at:
> >>>
> >>> =20
> >>=20
> http://www.mail-archive.com/hplip-help%40lists.sourceforge.net/msg028
> >> 6
> >> =20
> >>> 7.html
> >>>
> >>> I am definitely _not_ the only user who is annoyed by this
> >>> =20
> >> terrible bug.
> >> =20
> >>> Please try to investigate this. I would be willing to
> >>> =20
> >> provide you with
> >> =20
> >>> debug information etc.
> >>>
> >>>
> >>> Regards,
> >>> Daniel
> >>> =20
>=20
>=20
|