Search This Blog

Wednesday, November 5, 2014

NetworkManagerQt is out

Bugs fixed in NMQt

. Add workaround to properly update IpInterface.
339652: Add IPv6 configuration for VPN connections (needed for OpenVPN).
. Remove IPv6 setting from cdma/gsm connections since NetworkManager does not support this configuration.


STiAT said...

Since I couldn't find it - is there any API documentation available already?

Lamarque Souza said...

Well, you can generate the documentation from the source code using doxygen:

git clone git://
mkdir build
cd build
cmake ../libnm-qt
make apidox

I have just configured the git repository to make the same documentation appear in It should be available tomorrow.

Pietro Pedrozzi said...

Hi Lamarque

I'd like to write a program setting up a WPA2 connection using libnm-qt (well, actually the backport to Qt4 which can be found here, for some reason I really can't switch to Qt5).

As a proof of concept I modified the example libnm-qt/examples/createconnection/main.cpp. The problem is that even if I call setPsk like it is done in the Handler class of plasma-nm, the psk field does not appear in the configuration file under /etc/NetworkManager/system-connections/

Here are my modifications:

1) To make the example attempt to connect also to WPA2 networks I commented out the condition filtering them out

2) I added the 3 lines below

NetworkManager::Ipv4Setting::Ptr ipv4Setting = settings->setting(Setting::Ipv4).dynamicCast();

// 3 lines added by me
NetworkManager::WirelessSecuritySetting::Ptr wifiSecurity = settings->setting(NetworkManager::Setting::WirelessSecurity).dynamicCast();

// We try to add and activate our new wireless connection
QDBusPendingReply reply = NetworkManager::addAndActivateConnection(settings->toMap(), wifiDevice->uni(), accessPointPath);


Is there something special to take into account when setting the psk?

Lamarque Souza said...

You need to add the following two lines after the three lines you added:


Pietro Pedrozzi said...

Now it works, thx!