c# - Enumerating IPP Printers -


i'm looking dns based service discovery in windows 10 , found this video build. change made discovery changing service name "_ipp._tcp". don't hits though know have > 15 ipp enabled printers on network (i can identify these using ipptool, ios , android code).

i've checked , double checked typos. i've included networking capabilities in appxmanifest file.

here's code, pretty straight forward:

public sealed partial class mainpage : page {     static guid dnssdprotocol = new guid("{4526e8c1-8aac-4153-9b16-55e86ada0e54}");     string querystring = "system.devices.aepservice.protocolid:={" + dnssdprotocol + "} , " +         "system.devices.dnssd.domain:=\"local\" , system.devices.dnssd.servicename:=\"_ipp._tcp\"";      devicewatcher watcher;      public mainpage()     {         this.initializecomponent();     }      private void button_click(object sender, routedeventargs e)     {         watcher = deviceinformation.createwatcher(querystring,             new string[]             {                 "system.devices.dnssd.hostname",                 "system.devices.dnssd.servicename",                 "system.devices.dnssd.textattributes",                 "system.devices.ipaddress" },             deviceinformationkind.associationendpointservice             );          watcher.added += watcher_added;         watcher.start();     }      private void watcher_added(devicewatcher sender, deviceinformation args)     {         system.diagnostics.debug.writeline("found device");     } } 

does else have experience , can figure out why no devices found? query correct? need else when setting devicewatcher?

update
i've verified requests being created since showing in wireshark. identical other mdns requests being created. i've verified can create ssdp requests return discovered devices doubt it's issue networking permissions via app capabilities.

try using watcher.updated handler. if empty, presence of updated handler can cause added handler triggered.


Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -