Comments (9)
I checked the source of ONVIF Device Manager on SourceForge to see how they do Discovery.
The correct procedure on Windows is to make some calls to the Microsoft System.ServiceModel.Discovery service API. Microsoft then handle port 239.255.255.250 data and pass results back via the Microsoft API.
So right now there is no way that Discovery will work reliably on Windows without a lot of Microsoft specific code.
As a result I'm going to close this issue.
from onvif.
Hello!
Probably you should use events because camera can send response later than timeout is over.
Another way is to run probe
several times, maybe the problem in your network?
from onvif.
I would like to add to this Issue Report
-
Windows 10 machine.
I am using the code below.
First time I execute it I can find the ONVIF devices on my network (3 of them).
Next time I execute it it does not find any devices.
I can run it over and over and it never finds any more devices, but then after a while it does get replies from devices but then no longer receives any more replies. Clearing the ARP cache (arp -d *) made no difference for me.
Tested with node 0.12 and node 4.4.4 -
At the same time I run the example on my Raspberry Pi and it detects the devices every time.
(with devices detected within 2 seconds)
So something related to Windows.
var onvif = require('./lib/onvif');
onvif.Discovery.on('device', function(cam){
// function would be called as soon as NVT responses
console.log('received discovery message');
console.log(cam.hostname);
console.log(cam.port);
console.log(cam.path);
})
onvif.Discovery.probe();
from onvif.
This is very interesting. As you can see in the code, there is nothing else sending udp packet and listening the response. I haven't got any Windows machine, so let this issue being open.
from onvif.
I have looked at the source of another node wsdiscovery package. One thing they do a close of the udp socket when discovery is over. Will need to try it.
from onvif.
But there is close
method at line 142 in discovery.js
. I don't know where to dig.
from onvif.
sorry, I had missed the close on line 142. It was just a guess.
Anyway I ran wireshark. The first time I run my test program I can see that Windows transmits the UDP broadcast packet to 239.255.255.0 and the test program gets a reply from ONVIF devices.
Next time I run the program there is no reply from ONVIF devices and wireshark tells me the UDP broadcast packet was not sent.
Windows does do WS-Discovery too, so perhaps something in windows is preventing port 3702 from being used,
from onvif.
I've written a really small program to send UDP packets on 3702 239.255.255.0.
Some times the packets leave. Some times they do not. It looks like some other process in Windows is causing problems.
from onvif.
I wrote a small C# program to send UDP packets on 239.255.255.0. On my Win10 box they are transmitted for a while, then stop being transmitted.
So there is something windows specific here. I wonder if the proper Windows way is to register with some MS discovery service and let it handle the packets.
I think we can close this and simply say that Discovery does not work on Windows right now
from onvif.
Related Issues (20)
- D-Link DCS-8635LH not working HOT 3
- Non conform /onvif/media2_service response leads to Error: Unrecognized configuration HOT 2
- setOSD(): position can take effect, but plaintext does not HOT 1
- Question: I have a dvr/nvr dahua so the discover method retrieve me 1 record. Is there any other method that can tell me how many cameras the dvr has? HOT 2
- Error: GetRecordings
- Compatibility of Axis M5000-G PTZ Camera. HOT 4
- HikVision "Wrong ONVIF Soap Response" Error HOT 17
- Find recording from nvr within specific time HOT 4
- ONVIF SOAP Fault during connect with Vivotek camera's HOT 3
- Action string in Content-Type causes failures with Illustra cameras
- Discovery has been unable to search, how to debug it
- Discovery displays HTTP servers on local network
- Wrong ONVIF SOAP Response on AXIS Cameras
- NetworkInterfaceSetConfiguration documentation change
- feat req: custom position in createOSD HOT 1
- No events for TAPO C520 C510 HOT 1
- relativeMove documentation incorrect
- Unsubscribe: Triggers a second unsubscribe via _eventRequest
- getRecordingOptions not working with UNIVIEW Channels | brand issue | ONVIF SOAP Fault: Optional Action Not Implemented
- Add an option to set pull-request timeout
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from onvif.