Fix ONVIF auto-discovery and improve service compatibility#2
Draft
Copilot wants to merge 5 commits into
Draft
Conversation
…d missing handlers - Fix GetVideoSourceConfigurations to return both main (1920x1080) and sub (640x360) video source configs - Add GetVideoSourceConfiguration (singular) handler for querying specific source config by token - Add GetVideoEncoderConfiguration (singular) handler for querying specific encoder config by token - Add GetAudioSourceConfigurations handler for listing audio source configurations - Add GetAudioEncoderConfigurations handler for listing audio encoder configurations - Add ConfigurationToken extraction from SOAP requests Co-authored-by: symysak <103905928+symysak@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update RTSP sub stream for ONVIF compatibility
Add ONVIF sub stream support to media service
Mar 14, 2026
…tion, standard URLs - Add setup_multicast() to join multicast group via route/ifconfig (fixes Probe reception) - Fix PID management: use $! (background PID) instead of $$ (parent PID) - Add periodic Hello every ~30 seconds so clients discover the device reliably - Add WS-Discovery Bye message on shutdown - Fix Probe detection to exclude ProbeMatch/Hello using SOAP Action URI - Use standard ONVIF XAddrs paths (/onvif/device_service, /onvif/media_service) - Exempt ONVIF paths from HTTP digest auth in lighttpd.conf Co-authored-by: symysak <103905928+symysak@users.noreply.github.com>
Copilot
AI
changed the title
Add ONVIF sub stream support to media service
Fix ONVIF auto-discovery and add sub stream support
Mar 14, 2026
Discovery fixes: - Add allmulti flag to ensure multicast frame reception without IGMP join - Add ip maddr add for explicit multicast group membership - Disable WiFi power-save to prevent dropping multicast packets - Separate Hello loop from Probe listener (independent background process) - Use timeout command as fallback when busybox nc -w is unreliable - Improve child process cleanup on stop (grandchildren too) Device service additions: - GetServiceCapabilities, GetDiscoveryMode, GetHostname - GetDNS, GetNetworkProtocols, GetNetworkDefaultGateway Media service additions: - GetServiceCapabilities with streaming capabilities - GetVideoEncoderConfigurationOptions with H264 options - GetVideoSourceConfigurationOptions - GetCompatibleVideoEncoderConfigurations Co-authored-by: symysak <103905928+symysak@users.noreply.github.com>
- Clarify allmulti comment (bypasses filter, not IGMP join) - Improve Probe detection to exclude both ProbeMatch and ProbeMatches Co-authored-by: symysak <103905928+symysak@users.noreply.github.com>
Copilot
AI
changed the title
Fix ONVIF auto-discovery and add sub stream support
Fix ONVIF auto-discovery and improve service compatibility
Mar 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ONVIF camera auto-discovery was broken — devices were invisible to NVRs and ONVIF clients. Multiple root causes plus missing service handlers that caused clients to reject the device post-discovery.
Discovery fixes (
onvif_discovery.sh)allmultiflag,ip maddr addgroup join, and WiFi power-save disable — without these,busybox ncnever receives Probe packets on most embedded WiFi interfacesnclisten loop, so ifnc -wblocked (common busybox bug), Hello stopped entirelytimeoutfallback: Wrapsncwithtimeoutcommand when available, sincebusybox nc -wis unreliable across versionsAuth fix (
lighttpd.conf)/onvif/*and/cgi-bin/onvif_*paths from HTTP digest auth — ONVIF uses WS-Security, not HTTP authDevice service — 6 new handlers
GetServiceCapabilities,GetDiscoveryMode,GetHostname,GetDNS,GetNetworkProtocols,GetNetworkDefaultGateway/onvif/device_serviceinstead of CGI paths)Media service — 8 new handlers
GetServiceCapabilities,GetVideoEncoderConfigurationOptions,GetVideoSourceConfigurationOptions,GetCompatibleVideoEncoderConfigurationsGetVideoSourceConfiguration,GetVideoEncoderConfiguration(singular, by token)GetAudioSourceConfigurations,GetAudioEncoderConfigurations📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.