Expand description
Finding cameras on the LAN: WS-Discovery, Dahua discovery, IP-range scan.
Three mechanisms, because no single one finds everything:
| Mechanism | Finds | Misses |
|---|---|---|
ws_discovery | Anything speaking ONVIF | Cameras with ONVIF disabled; anything across a router |
dahua | Dahua devices, including ONVIF-disabled ones | Other vendors; anything across a router |
scan | Anything with an open port, across subnets | Nothing — but it is slow and noisy |
Both multicast mechanisms are link-local: they do not cross a router, which on a vehicle LAN is usually fine and occasionally the whole problem. The range scan is the fallback for when it is not.
§Discovery finds addresses, not access
A discovered camera is a candidate. Nothing here authenticates, and
nothing here fills in a working CameraConfig
— credentials come from the environment or the keyring, never from the
network. A Discovered is something to show an operator, who then says
which of them to configure.
Modules§
- dahua
- Dahua’s own UDP discovery broadcast.
- scan
- IP-range scan: the fallback that crosses routers.
- ws_
discovery - WS-Discovery: the ONVIF multicast probe.
Structs§
- Discovered
- A candidate camera found on the network.
Enums§
- Discovery
Method - How a device was found.
Constants§
- DEFAULT_
TIMEOUT - How long to listen for replies before giving up.
Functions§
- local_
ipv4_ interfaces - Every usable local IPv4 address, one per interface.
- merge
- Merge results from several mechanisms, preferring the richest entry per address.
- subnet_
broadcast - The subnet-directed broadcast address for an interface.