Libnymea-networkmanager internal data seems to fail to update

Good day,
My Question:
Is there any way to force libnymea-networkmanager to update with what the OS is seeing? I have tried to call many of the signals and nothing seems to work.

Back Ground:
A project I have been working on uses libnymea-networkmanager to handle UI network management, the underlying Linux image uses nmcli. The project used an old version of libnymea-networkmanager has a copyright from 2018 with Linux kernel 4.9.88.

We are currently trying to update everything to Kernel 5.15, and the latest libnymea-networkmanager lib, not what is included in the project.

My problem:
When we start up the qt/qml app everything seems to work fine the network is up and running the issue is when we try to change to a different access point/network. We use

NetworkManager::NetworkManagerError result = m_networkManager->connectWifi(m_wirelessNetworkDevices.first()->interface(), ssid, passphrase, hidden);

After running that function, I see at the OS level we have change AP confirmed by the command iwgetid. But when I try to retrieve the active m_wirelessNetworkDevices[0]->activeAccessPoint()->ssid(); I get the old AP.

I did have a hack that kind of worked

  1. call connectWifi
  2. call m_networkManager->stop();
  3. call m_networkManager->start();
    but after I leave the view where we manage the wifi it look like things are disconnected
    i get NetworkManagerStateDisconnecting when I call m_networkManager->stateString();
    Now an even stranger thing is if I wait for some time 3 to 4 min things update to correct.

Please let me know what more info you might need from me and any ideas you might have to point me in the correct direction.


Hmm… It would maybe help if I could test your code myself. Can you link the repository so I can build and test it in order to find out what’s going wrong?

Hi @mzanetti,
Here is a link to a copy of the code that is using libnymea-networkmanager

I am still working on getting the qml view that uses this for the user to set up wifi cut out of the large main project.