NetworkDiscoveryHandler does not work, it always returns 0 in the count parameter, I have a zc300 printer connected in the LAN network.(10.10.10.1)
private class NetworkDiscoveryHandler : DiscoveryHandler
{
private List printers = new List();
private AutoResetEvent discoCompleteEvent = new AutoResetEvent(false);
public void DiscoveryError(string message)
{
Console.WriteLine($"An error occurred during discovery: {message}.");
discoCompleteEvent.Set();
}
public void DiscoveryFinished()
{
discoCompleteEvent.Set();
}
public void FoundPrinter(DiscoveredPrinter printer)
{
printers.Add(printer);
}
public List DiscoveredPrinters
{
get => printers;
}
public AutoResetEvent DiscoveryCompleteEvent
{
get => discoCompleteEvent;
}
}
public ObservableCollection DiscoveredPrinters { get; } = new ObservableCollection();
5 Replies
Hello,
Have you tried running the C# Developer Demo that accompanies the SDK? If so, does discovery also fail?
Yes, I'll try DeveloperDemo.Card.Desktop.exe option Discovery and it does not work either
Are the printer and the PC running the Developer Demo on the same subnet or different subnets of your network?
yes,printer and pc are running on the same subnet zc300 = 10.10.100.180 / PC = 10.10.100.129 we can connect and print using eth port
Hello Jesus,
I am running the C# Developer Demo on Windows 10 with my ZC300 on the same subnet as my test PC: I am unable to reproduce the issue you have reported. Would you please contact Zebra Technical Support and open a support ticket to enable us to further investigate this issue?
Thank you,