Pelco Developer Network (PDN)

4.2.1 SDK "Events" Sample application is not receiving events

We have recently had a request from a customer to upgrade their current integrated software to use Pelco SDK 4.2.1. In our development work so far the streaming of live and recorded footage as well as PTZ and preset controls have all worked without any problem.

However we have had difficulty receiving events from our PelcoNSM5200 server and cameras. Using the Events DotNet sample application that came with the SDK I have subscribed to Diagnostic, Motion, Online, Physical, PropertyChanged and VideoAnalytics events for each of the cameras attached to the server. I have also subscribed to Diagnostic, Motion, Online, Physical, External, SystemChanged and VideoAnalytics events for the System itself.

Using the Endura WS5000 Software I can see that Motion events are being generated regularly but these are never caught by the application's event handlers.

Also when I disconnect and then reconnect the cameras to our network no Online event seems to occur.

When the application was first run there was a prompt to allow it to communicate through the firewall and I selected the option to let it communicate.

I also created a small console application based on the C# code example found here . This application also did not receive any events.

Could anyone offer any ideas on why this might be happening?

Hello, thank you for your post!

My initial thoughts are that it may be related to a Firewall or networking issue that is causing event notifications not to arrive. I did see that in your post you indicated 'there was a prompt to allow it to communicate through the firewall'. I wouldn't trust that completely.

What I would suggest you do is to run Wireshark and capture the network traffic on a single data point. I would suggest trying only to subscribe to Motion Detection on a single camera. Check the Wireshark to ensure that the SUBSCRIBE request receives a response properly that includes a subscription ID from the camera (SID it is often abbreviated).

Assuming you get that far and you receive a proper SUBSCRIPTION, next is to trigger the event. It's important to verify the event through another method; perhaps Endura Workstation software. Ensure that the event is showing up in other tools, then try testing it out with the SDK sample. Use Wireshark and look for NOTIFY responses from the camera to the client source that initiated the SUBSCRIPTION.

What I expect is happening is that either (A) the SUBSCRIPTION isn't working properly, i.e. no reply from the camera, OR (B) the NOTIFY message from the source / camera isn't arriving to the client IP to let them know of the event. Both of these issues would indicate some sort of network interruption, with a Firewall being the most likely and possibly easiest to resolve. The next tests, if you can, I would suggest completely turning all Firewalls off and then trying again. Check and see if the messages are coming from the client properly after that.

I actually just encountered a very similar issue today while troubleshooting events. I had a Windows Server 2012 PC that had the Domain Profile and Public Profile firewalls still on, though the Domain Profile Firewall was off. I still could not properly receive the event messages in our system on that PC unless I had all 3 Firewalls turned off.

If you are still having problems after trying these suggestions, please let me know the results of these tests and we can proceed from there.

Thanks for your help on this Chris.

After following your instructions I found that it was the subscription getting blocked by the firewall rather than the events themselves. If I turn the firewall off, subscribe to events then turn it back on events are received by the sample application.

Thanks again, your suggestions were a great help.

Interesting, I'm very glad to hear that the issue was resolved. Glad to help out!