Re: Setting the IP address and other IP infos through the DBus API of Network Manager version 0.9.4+
On Sat, 2014-06-07 at 12:51 -0400, Simon Pleau wrote: > Hi, > > > > I'm looking to change the IP address, prefix, gateway, etc.. of a connection > through the NM and its DBus API but the only examples I have found are for > version 0.8.x in which the Update method on > org.freedesktop.NetworkManager.Settings.Connection can be set using the > parameters returned by the method GetSettings. Changing the IP address was > done by modifying the dictionary named 'ipv4' in the settings returned and > passing the new settings through the Update() method on the same interface. > I am using Debian and NM 0.9.4 and with the upgrade there seems to be no more > ipv4 setting returned by GetSettings() so I'm not sure if I can insert a new > dictionary entry for the ipv4 in the returned settings and simply return it > to Update() as before. Correct. You can insert the new dictionary for the "ipv4" setting and send all the previous settings, plus the new "ipv4" setting, back with the Update() call. That will save it to disk. > Also, I noticed org.freedesktop.NetworkManager.IP4config does have a property > name Addresses which returns the type of information I am looking to modify > (but missing the dns infos in the old ipv4 structure) but there is not way to > modify and set these parameters through the interface or any other. The IP4Config interface is the runtime configuration, after the Connection and it's associated settings have been applied to the interface. So for example, the Connection settings might specify "method=auto" (ie, DHCP), and then when DHCP is run, the actual IP address and DNS settings populate the IP4Config object. The Connection is only the saved profile configuration information used to connect to the network, but it does not store any runtime configuration in NM 0.9.8 and lower. > Can anybody advise me on the right course to modify the IP settings in NM > 0.9.4+? Depending on the language you're working with, there are some examples here: http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/examples I've just added two python examples which should show what needs to be done: http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/examples/python/dbus/update-ip4-method.py http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/examples/python/gi/update-ip4-method.py Let me know if you have more questions! Dan ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: NetworkManager-0.9.95 update in rawhide
On Tue, 2014-06-10 at 21:37 +0400, Igor Gnatenko wrote: > On Tue, Jun 10, 2014 at 9:34 PM, Thomas Haller wrote: > > On Tue, 2014-06-10 at 21:25 +0400, Igor Gnatenko wrote: > >> Hi, > >> > >> After latest update i can't use my wifi in NM. Probably this bug not > >> in NM, but I don't know how to debug this :( > > > > Do you have the package NetworkManager-wifi installed? > no. Interesting. > > > > Check with > > $ yum list NetworkManager-wifi > > > > > > and you certainly need it. Actually, you should have gotten it > > automatically... > What's happens? Checking dnf logs. As Igor and I discussed on IRC, the new NetworkManager package and sub-packages include "Obsoletes: NetworkManager < 1:0.9.9.95-1" which should cause *all* the subpackages (including NetworkManager-wifi) to replace the previous packages, and thus NM-wifi should be installed. We're checking with dnf people to figure out why this doesn't seem to be the case. I tested with 'yum' and a local repo before building the F21 update and this worked correctly, so at the moment the issue seems to be with dnf. Dan ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: NetworkManager-0.9.95 update in rawhide
On Tue, Jun 10, 2014 at 9:34 PM, Thomas Haller wrote: > On Tue, 2014-06-10 at 21:25 +0400, Igor Gnatenko wrote: >> Hi, >> >> After latest update i can't use my wifi in NM. Probably this bug not >> in NM, but I don't know how to debug this :( > > Do you have the package NetworkManager-wifi installed? no. Interesting. > > Check with > $ yum list NetworkManager-wifi > > > and you certainly need it. Actually, you should have gotten it > automatically... What's happens? Checking dnf logs. > > > > Thomas -- -Igor Gnatenko ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: NetworkManager-0.9.95 update in rawhide
On Tue, 2014-06-10 at 21:25 +0400, Igor Gnatenko wrote: > Hi, > > After latest update i can't use my wifi in NM. Probably this bug not > in NM, but I don't know how to debug this :( Do you have the package NetworkManager-wifi installed? Check with $ yum list NetworkManager-wifi and you certainly need it. Actually, you should have gotten it automatically... Thomas signature.asc Description: This is a digitally signed message part ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
NetworkManager-0.9.95 update in rawhide
Hi, After latest update i can't use my wifi in NM. Probably this bug not in NM, but I don't know how to debug this :( $ nmcli device status DEVICE TYPE STATECONNECTION virbr0 bridgeconnectedvirbr0 enp0s20u2 ethernet connectedenp0s26u1u2 virbr0-nic tap connectedvirbr0-nic cdc-wdm2gsm unavailable -- lo loopback unmanaged-- wlp3s0 wifi unmanaged-- $ nmcli general STATE CONNECTIVITY WIFI-HW WIFI WWAN-HW WWAN connected full enabled enabled enabled enabled $ sudo iwconfig wlp3s0IEEE 802.11abgn ESSID:off/any Mode:Managed Access Point: Not-Associated Tx-Power=0 dBm Retry short limit:7 RTS thr:off Fragment thr:off Encryption key:off Power Management:off Let me know what info is needed! -- -Igor Gnatenko ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list