Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Option to disable mDNS #96

Closed
jinnatar opened this issue Nov 14, 2022 · 2 comments
Closed

FR: Option to disable mDNS #96

jinnatar opened this issue Nov 14, 2022 · 2 comments

Comments

@jinnatar
Copy link

Problem:

  • Building a minimal SoapySDRServer for example as a Docker image is needlessly complicated due to the assumption that mDNS is always available.
  • Not all scenarios call for mDNS, for example if alternative service discovery methods are used. In my scenario I'm actually relying on Consul service discovery.
######################################################
## Soapy Server -- Use any Soapy SDR remotely
######################################################

Server version: 0.5.2-unknown
Server UUID: a28c6e87-882b-1727-8567-000111ac1e00
Launching the server... tcp://[::]:55132
Server bound to [::]:55132
Launching discovery server... 
Connecting to DNS-SD daemon... 
[ERROR] avahi_client_new() failed: Daemon not running
Press Ctrl+C to stop the server
DNS-SD daemon disconnected...
Exiting prematurely...
Shutdown client handler threads
Cleanup complete, exiting

Proposed solution:

  • Add an optional flag --disable-mdns that skips client creation and just skips straight to binding.
  • Alternatively, if client creation fails, still proceed with serving, just without mDNS. This can however lead to inconsistent results if mDNS has a transient issue, so my preference is on requiring an explicit opt-in or opt-out for mDNS, whichever is preferred for expected default behavior.
@guruofquality
Copy link
Contributor

try this branch: with -DENABLE_AVAHI=OFF passed to cmake #97

@jinnatar
Copy link
Author

jinnatar commented Nov 18, 2022

That seems to work at least as far as being able to compile and start the server without Avahi, which is great! I was also able to get CubicSDR to connect, so I'd say that's a working solution. The caveat is that I couldn't get Cubic to actually give me any data from the remote radio, but most likely it's my own fault. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants