Hi Jürgen,

nice to hear from you in person, I’m quite impressed by the work you have done 
in sane-airscan.

Thank a lot! :-)

At some point, I wanted to include WSD support in AirSane but had to give up 
because Windows was never
willing to create a device node for the announced device, even if the metadata 
xml closely matched that from a real scanner.
So I concluded Windows has a whitelist for devices it is willing to accept, or 
some other undocumented mechanism designed to obstruct efforts like mine, or 
maybe I simply made a silly mistake that I was unable to see, despite I spent 
quite some time on this.
Do you have any insights into that complementary side of your code?

I don't think there is a whitelist of devices. Most likely, you've made a silly mistake, which is very easy to make with this ugly protocol.

Although formally WSD is fully documented, the quality of this documentation is exceptionally poor. Written text sometimes contradict with examples from the same text. Very similar things may have quite different syntax in two different but similar contexts (for example, <a:To>URL</a:To> vs <a:ReplyTo><a:Address>URL</a:Address></a:ReplyTo> in the message header).

All implementations are very fragile. A minor mistake may easily crash the device. And seems at devices side there are only 2-3 implementations actually exist, and all vendors use them by license.

Note also, at the devices side implementations are sensitive to XML formatting. XML, formatted into the very long single line works best of all; easy to read XML, formatted into multiple lines, not always understood by devices (this is true for eSCL too). Probably, the same defect may exist on a host side.

And another thing, MessageID should really be different all times you send a new message. They really drop messages with duplicated MessageID (and on my device the memory where received MessageIDs are saved, eventually overflows, so discovery stops working for several minutes, if used extensively).

OK, that sounds reasonable. So I have to report scan:AdfState as 
ScannerAdfLoaded all times, except once after scan failure.
BTW, would you bother to omit scan:AdfState for scanners that don’t have an 
ADF? I’ve noticed that Vuescan complains about an empty ADF when used with 
AirSane, even though the scanner has no ADF. This would suggest that 
scan:AdfState == ScannerAdfLoaded is not optional but expected for all 
scanners, with or without ADF?

This is what HP Deskjet 2540 series returns:

        <pwg:Version>2.0</pwg:Version>
        <pwg:State>Idle</pwg:State>
        <scan:Jobs>
            . . .
        </scan.Jobs>

So there is no AdfState here (this device has no ADF).

--

        Wishes, Alexander Pevzner ([email protected])

Reply via email to