Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 4 Support (Qt 6) › ZeroConf Android trouble

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #25370

    Dominik

    Does ZeroConf on Android target platform actually work?

    On Pixel 7, Android 15 I can’t seem to get it return any services. The ZeroConf.networkServiceDiscoveryActive returns true, nevertheless it won’t report any results.

    During app start a warning is shown.

    W qtMainLoopThrea: type=1400 audit(0.0:3296): avc:  denied  { ioctl } 

     

    https://felgo.com/doc/felgo-zeroconf/#details

    #25372

    Dominik
    #25374

    Dominik

    Tested the latest and the assumption of a fix was wrong. The discussion continues in the Github issue: https://github.com/jbagg/QtZeroConf/issues/46

    #25375

    Günther
    Felgo Team

    Hi,

    the Felgo Android ZeroConf features directly use the native Android APIs for network service discovery (android.net.nsd.NsdManager). So the above posted discussions on QtZeroConf do not apply.

    The avc: denied { ioctl } message is not necessarily related to ZeroConf. It also shows for apps that do not use the ZeroConf features. We are not aware on any issues with the Android ZeroConf implementation in general.

    Please try to run the example from the docs: https://felgo.com/doc/felgo-zeroconf/#example-usage
    It should list all available services. Do you see any interesting details or errors in the log, like the “Network service search failed” log output when discovery fails?

    I can also imagine that some Android device setting might restrict network discovery or only allow certain network services. That’s just an idea though, as with Android there’s a lot of different vendors, devices and OS versions where things might work differently. So the type of device and service you want to work with could play a role as well.

    Best,
    Günther

    #25376

    Dominik

    Hi Günther,

    thanks for your answer.

    Thanks for clarification about QtZeroConf not related to your implementation. Nevertheless, QtZeroConf also uses the native Android API approach as of it’s latest version: https://github.com/jbagg/QtZeroConf/blob/master/QZeroConfNsdManager.java and can therefor be used as B-test.

    Both versions “Felgo ZeroConf” and “QtZeroConf” result in the same behavior on the test devices (Pixel 7 – Android 15, Samsung Galaxy 21FE – Android 14).

    1. avc: denied { ioctl } warning appears
    2. QZeroConfNsdManager is created
    3. android.permission.ACCESS_NETWORK_STATE is confirmed to be allowed
    4. discoverServices() is called
    5. onDiscoveryStarted() is called
    6. silence

    The network discovery itself and or the allowance of certain services may not be the blocker as other implementations for mDNS discovery seem to work fine.

    Example: https://play.google.com/store/apps/details?id=com.druk.servicebrowser&hl=de

     

    #25377

    Dominik
    #25378

    Günther
    Felgo Team

    Hi Dominik,

    thanks for the additional information. What is the actual service type / device that you want to find and correctly shows up in the other service browser app?

    Other services seem to operate fine with our implementation, so it is currently unclear why it fails in this case. I will forwarded all the information to our developers then so we can investigate as well.

    Best,
    Günther

    #25379

    Dominik

    Hey Günther,

    for the tests I’m mostly using “_services._dns-sd._udp.” to have the most broad test as in your example.

    The same service type returns dozens of available services via working apps.

    “_http_tcp.” was another test scenario.

     

Viewing 8 posts - 1 through 8 (of 8 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded