python-ws-discovery icon indicating copy to clipboard operation
python-ws-discovery copied to clipboard

Discovery fails when multicast group registration request is sent ahead of discovery request

Open castleguarders opened this issue 4 years ago • 1 comments

This happens with several different vendor cameras with different onvif client stack. Discovery works fine once I stop sending the multicast group registration request (and associated DROP request). This registration request should be made optional (and not the default). Several other discovery stacks/tools that I checked out seem to not send this request.

self._multiInSocket.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, self._makeMreq(addr)) except socket.error: # see comments for setsockopt(.., socket.IP_ADD_MEMBERSHIP..

It's not clear from the specification if this is required or even recommended. Any insights would be appreciated.

castleguarders avatar Feb 16 '21 03:02 castleguarders

I have seen something similar but I believe it is the switch between the camera and the discoverer.

If I comment out IP_ADD_MEMBERSHIP, the camera can be queried.

If I disable IGMP Snooping in the switch, the camera can be queried even with IP_ADD_MEMBERSHIP.

tom24 avatar Aug 01 '22 15:08 tom24