Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.8.2
-
-
Foundation PM Staging
Description
`QNetworkInformation` doesn't update it's properties after initialisation on Yocto linux. It provides valid statuses at first but doesn't change since backend has been loaded. If you load the backend, then disconnect from network - it will still report reachability as connected. Most probably for rest of properties as well. Works fine on Ubuntu 22.04.
I noticed that calling QNetworkInformation::availableBackends on Ubuntu gives ("networkmanager", "glib") and loadDefaultBackend loads "networkmanager". Calling loadBackendByName(u"glib") on ubuntu returns a valid instance and reachabilityChanged is correctly emitted.
On yocto linux availableBackends gives ("glib", "networkmanager") and loadDefaultBackend loads "glib". Calling loadBackendByName(u"networkmanager") on yocto linux returns a nullptr. The glib instance returned by loadDefaultBackend gives a valid reachability at first but reachabilityChanged is never emitted and the value returned by reachability() never changed
Edit: On yocto linux with Boot2Qt connman is used as the default network manager, maybe a good idea could be to create a QNetworkInformationBackend based on net.connman