I have implemented a list of the xaddrs in my application without changing libonvif. However, this is not quite so easy as you also have to keep a record of the camera index, because prepareOnvifData() requires the index to return the OnvifData structure for that camera. Basically, I build a list containing xaddrs and their corresponding libonvif indices. Sure, feel free to use any or all of this in the next version.
Hi Stephen, Ok, so I've written some code to take the second Ip address if the first one is a 169 subnet address and that fixed that particular issue. Other cameras return an Ipv6 address in addition to the Ipv4 address so I may also have to check for this too. Another camera on the network was responding too slowly for libonvif and the responses were being ignored. I changed this line in the sendCommandToCamera function in onvif.c to wait for a response. valread = recv( sock, buffer, 4096, MSG_WAITALL);...
Hi Stephen , I'm back on this project now. I added all of your debug stuff and I think I can see the problem with the camera which returns "Error getting camera uri - No XML reply". In the broadcast response section for a good camera I get this: <soap-env:envelope xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:d="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:soap-enc="http://www.w3.org/2003/05/soap-encoding" xmlns:dn="http://www.onvif.org/ver10/network/wsdl"><soap-env:header><wsa:messageid>urn:uuid:e1279c3b-6659-405b-8fec-fd32d244bc43</wsa:messageid><wsa:relatesto>urn:uuid:fecfb31b-6e7d-9041-56e4-390df1d28082</wsa:relatesto><wsa:to...
Thanks again, I have to take a break from this work for a few weeks but I'll let you know when I get back to it
Hi Stephen, Many thanks for the repsonse. The problem with the Axis camera was indeed the date-time and daylight-saving settings which didn't match the PC client, this camera is now working with libonvif. I have another camera which does not have a daylight-saving setting and which cannot currently be authenticated. I also have other cameras which are returning "No XML reply" which I wil need to debug.
Hi there, I've just built the libraries for my hardware and I'm running the test_onvif program. It finds 7 cameras (some are repeated) and it returns the rtsp url for the camera which does not have authentication enabled. However it fails wih the message "ter:NotAuthorized" on cameras which have authentication enabled. I have checked the username and password are correct using OnvifDeviceManager. Any suggestions for what might be the problem? Many thanks