Hi,
I'm having issues finding and then talking to my Brother DCP-7055W printer. I'm using code such as:
DiscoveryEndpoint discoveryEndpoint = new UdpDiscoveryEndpoint(DiscoveryVersion.WSDiscoveryApril2005);
DiscoveryClient discoveryClient = new DiscoveryClient(discoveryEndpoint);
FindCriteria findCriteria = new FindCriteria();
findCriteria.Duration = TimeSpan.FromSeconds(5);
findCriteria.ContractTypeNames.Add(new System.Xml.XmlQualifiedName("PrintDeviceType", "http://schemas.microsoft.com/windows/2006/08/wdp/print"));
FindResponse findResponse = discoveryClient.Find(findCriteria);
to doscover my printer. This seems to return two endpoints one for my Web enabled WebCam and one for my printer. The printer entry three ContractTypeNames, one for devprof:Device, one for print:PrintDeviceType, and one for scan:ScanDeviceType which matches my expectations. The associated endpointAddress contains a URI that looks like:
{urn:uuid:e3248000-80ce-11db-8000-008092965229}
I was half expecting this to be an IP address or similar http://192.168.1.143 would be nice as that's the address of the printer.
My question is two fold, why does the line:
findCriteria.ContractTypeNames.Add(new System.Xml.XmlQualifiedName("PrintDeviceType", "http://schemas.microsoft.com/windows/2006/08/wdp/print"));
not limit the findings to just my printer? And how do I obtain the actual IP address?
Many thanks
Martin