Connecting to a third party ONVIF service

Hi all, I am currently trying to create an ONVIF compliant device with Milestone. I have taken a look at the required protocols and others approaches posted (replies from here and mentions here) and have implemented them to respond with valid information or so I believe.

Whenever I try and add my device manually I unfortunately fail at the second “scan” of getting the device information. I’m attaching a PCAP of my responses (trying to use10.10.1.10 as the compliant device). My assumption is that my GetProfiles is returning something that isn’t liked as it is the last call made before failing. I’d appreciate any help as I have tried various versions in changing what is returned. Thanks!!!

You can have a look in the logs to see if the issue is reported there. The logs for the ONVIF Driver are by default located here:

[C:\ProgramData\Milestone\XProtect](file:C:/ProgramData/Milestone/XProtect) Recording Server\Logs\Drivers\ONVIF

Also it seems you are using pretty old Device Pack version. I would suggest updating to the newest and re-trying.

https://www.milestonesys.com/support/software/device-packs/

Hi Maxim,

Thank you so much for the response. I was able to see the GetProfiles call failing and have fixed it but now I have another issue of not playing video. I see it in the logs saying:

“NmONVIFDevice::SaveXPCOStreamSettings()@ONVIFSettings.cpp:403 Error: Protocol=‘Protocol_RTP_UDP’ does not exist, using ‘Protocol_RTP_RTSP_HTTP_TCP’ instead” which is why the GetStreamUri requests HTTP as the protocol but I’m trying to change it to RTSP as that is what I am using. I have it so in the GetServicesResponse it does RTP_TCP and RTP_RTSP_TCP so I’d like to know more about how it determines which protocol to use here. I’ve attached the logs as well. Thank you so much again for all the help :slight_smile:

Forgot to mention, there is also GetNetworkProtocols returning support for RTSP. Here is also an attachment of the pcap

I think there could be some mismatch between the cached capabilities of the device and the actual capabilities. Can you try removing the device, restarting the Recording Server, and adding the device again.

Thanks a lot for the help Maxim. Digging around more with it you were right although restarting it didn’t delete the cache. I deleted my device under %ProgramData%\Milestone\XProtect Recording Server\DriverCache\NativeDrivers and the Devices.ini and am now getting a valid stream and also added PTZ. Thanks again for all the help and pointing me in the right direction :slight_smile:

Update: It works fine when only using one profile, however when I add another Profile (with new video sources and video encoder config) the device scan fails and errors with this: “CmONVIF::GetXmlInterface()@ONVIF.cpp:2442 Failed to get Profiles (Can not find setting: 79928 Device index: 0)”

After refreshing the recording server and removing stored cache’s of the device it still persists. Nothing in my GetProfiles response sticks out to me as incorrect or malformed but it appears to be failing because of it. I’ve attached a pcap of the scan. Any help or guidance is greatly appreciated!