I'm looking for discovering the IP cameras that are connected to my network. I found a tool in the following link
https://github.com/andreikop/python-ws-discovery
when I'm using it with the following commands I can not find one of my cameras which is in my network
from wsdiscovery.discovery import ThreadedWSDiscovery as WSDiscovery
from wsdiscovery.publishing import ThreadedWSPublishing as WSPublishing
from wsdiscovery import QName, Scope
# Define type, scope & address of service
ttype1 = QName("http://www.onvif.org/ver10/device/wsdl", "Device")
scope1 = Scope("onvif://www.onvif.org/Model")
xAddr1 = "localhost:8080/abc"
# Publish the service
wsp = WSPublishing()
wsp.start()
wsp.publishService(types=[ttype1], scopes=[scope1], xAddrs=[xAddr1])
# Discover it (along with any other service out there)
wsd = WSDiscovery()
wsd.start()
services = wsd.searchServices()
for service in services:
print(service.getEPR() + ":" + service.getXAddrs()[0])
wsd.stop()
the result of this commands are:
urn:uuid:9b8cd29b-4bd4-5d1c-2f0c-edf3ff9a7eb3:http://#.#.42.244:80/onvif/device_service
urn:uuid:c65e3f71-99e5-4c5d-9615-325bcab19840:http://#.#.42.128/onvif/device_service
urn:uuid:317435e5-a21c-467b-96b8-a213e455bcb4:http://#.#.42.60:5357/317435e5-a21c-467b-96b8-a213e455bcb4/
my own IP is #.#.42.53 and two IP cameras with IPs: #.#.42.244 and #.#.42.128 are discovered but I have another camera which IP is #.#.5.179 and it isn't discoverd.
it's because that it has various IP range from my computer? (the camera range is 5 and my computer range is 42)
In that case how I can solve this problem and expand my discovery range?