Why can't I discovery for devices?
chccc1994 opened this issue · comments
Hi, maybe the device is expecting a specific type in the WS-Discovery request. Try to replace tds:Device with tdn:NetworkVideoTransmitter (There second discovery Probe already contains tdn:NetworkVideoTransmitter but maybe only the first probe is processed correctly, also try to replace the second probe with type tdn:NetworkVideoTransmitter with tds:Device).
Long story short - try this:
ProbeTypeRequest request;
request.Types = "tds:Device";
auto uuidOne = QString("uuid:%1").arg(SoapHelper::GenerateUuid());
auto probeResponseTwo = discovery->Probe(request, uuidOne);
request.Types = "tds:Device";
auto uuidTwo = QString("uuid:%1").arg(SoapHelper::GenerateUuid());
auto probeResponseOne = discovery->Probe(request, uuidTwo);
and this:
ProbeTypeRequest request;
request.Types = "tdn:NetworkVideoTransmitter";
auto uuidOne = QString("uuid:%1").arg(SoapHelper::GenerateUuid());
auto probeResponseTwo = discovery->Probe(request, uuidOne);
request.Types = "tdn:NetworkVideoTransmitter";
auto uuidTwo = QString("uuid:%1").arg(SoapHelper::GenerateUuid());
auto probeResponseOne = discovery->Probe(request, uuidTwo);
Is there a typo?
should be tdn:NetworkVideoTransmitter
.
If this does not work you may try this ONVIF Server and see if it is found.
1、I tried to modify the device type tdn:NetworkVideoTransmitter
, but I still couldn't find the device under the windows platform.
2、 I tried this ONVIF Server ,onivfinfo.exe Found "no" match.
tds:Device
tdn:NetworkVideoTransmitter.
vs2022
cmake3.22.5
I compiled onvifinfo.exe on a fresh Windows 10 (version 21H2) virtual machine with VisualStudio 2022 and it works right away and finds the Happytime onvif server without any problems. I think you have to do some research why it fails on your Machine. Perhaps you have to experiment with some gsoap multicast related socket params here (https://www.genivia.com/doc/guide/html/structsoap.html#aa5faa7630425a8ab8018f0b2d4d0c18d).
Thank you for your prompt reply.
I tried to find the device under this operating system Windows 10 version 20H2(OS Build 19042.1889)
so,
I think it may be a problem with the operating system Windows 10 version 21H2(OS Build 19044.1889)