mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-19 00:56:16 +00:00
Features Added: • mDNS/Bonjour discovery using hashicorp/mdns library • Unified discovery service combining UPnP + mDNS + configuration • Parallel discovery execution for optimal performance • Comprehensive logging for both UPnP and mDNS discovery • Network diagnostic tools for troubleshooting New Discovery Methods: • Configuration-based (fastest, most reliable) • UPnP/SSDP discovery (widely supported, enhanced logging) • mDNS/Bonjour discovery (Apple ecosystem friendly) New Programs & Tools: • cmd/example-mdns - Standalone mDNS discovery testing • cmd/example-upnp - Isolated UPnP/SSDP discovery testing • cmd/mdns-scanner - Network diagnostic tool for mDNS services Enhanced Build System: • make dev-mdns / dev-mdns-verbose (mDNS testing) • make dev-upnp / dev-upnp-verbose (UPnP testing) • make dev-scan-all (scan all network services) • make dev-scan-soundtouch (scan for SoundTouch services) Documentation: • docs/DISCOVERY.md - Comprehensive discovery guide • Updated README.md with new features and commands • Full API documentation and troubleshooting guide Technical Improvements: • Detailed request/response logging for UPnP M-SEARCH • Step-by-step mDNS service discovery tracking • IP address resolution with IPv4/IPv6 handling • Service name parsing and device info extraction • Robust error handling and network diagnostics Backward Compatibility: • No breaking changes to existing APIs • All existing tests pass • CLI interface unchanged but enhanced • Legacy UPnP-only service still available
22 lines
509 B
Go
22 lines
509 B
Go
package discovery
|
|
|
|
import "time"
|
|
|
|
const (
|
|
// SSDP multicast address and port
|
|
ssdpAddr = "239.255.255.250:1900"
|
|
|
|
// SoundTouch device URN for UPnP discovery
|
|
soundTouchURN = "urn:schemas-upnp-org:device:MediaRenderer:1"
|
|
|
|
// mDNS service type for SoundTouch devices (matches Bose's actual service name)
|
|
soundTouchServiceType = "_soundtouch._tcp"
|
|
soundTouchDomain = "local."
|
|
|
|
// Default discovery timeout
|
|
defaultTimeout = 5 * time.Second
|
|
|
|
// Default cache TTL
|
|
defaultCacheTTL = 30 * time.Second
|
|
)
|