Help to implement some features

Lamarque Vieira Souza lamarque at gmail.com
Tue Apr 20 14:02:51 CEST 2010


	Ok, your patch is usefull too. There are a lot of little things that can 
be improved in knetworkmanager and your patch do one them.

	Yesterday I worked on adding the signal strenght and network name (APN) 
for Mobile Broadband connection to the tooltip. It is almost done, the only 
part that I have difficult is communicating to dbus 
org.freedesktop.ModemManager.Modem.Gsm.Network.GetSignalQuality method. The 
modifications in kde-networkmanager is done, now I changing solid to retrieve 
the information from networkmanager. I already have a dbus-send command that 
retrieves this information:

dbus-send --system --print-reply --dest=org.freedesktop.ModemManager 
/org/freedesktop/ModemManager/Modems/0 
org.freedesktop.ModemManager.Modem.Gsm.Network.GetSignalQuality

	I just need to change solid/networkmanager-0.7/dbus/nm-device-
gsminterface.h to add a method_call to do the same. I have always thought dbus 
very confusing to use and I am having difficult to understand which changes I 
need to do in change nm-device-gsminterface.h.

	One thing I have noticed is that nm-device-gsminterface.h interfaces with 
org.freedesktop.NetworkManager.Device.Gsm and the GetSignalQuality method is 
in org.freedesktop.NetworkManager.Device.Gsm.Network. If someone else here 
could help with this part I would appreciate a lot, this is the only thing 
that still need to be done to finish my patch.

Em Terça-feira 20 Abril 2010, Paul Marchouk escreveu:
> 20.04.2010 01:31, Lamarque Vieira Souza пишет:
> > Em Segunda-feira 19 Abril 2010, Paul Marchouk escreveu:
> >> 19.04.2010 20:28, Lamarque Vieira Souza пишет:
> >>> Em Segunda-feira 19 Abril 2010, Will Stephenson escreveu:
> >>>> On Saturday 17 April 2010 02:00:45 Lamarque Vieira Souza wrote:
> >>>>> 	I would like to implement this feature in the knetworkmanager's 
TODO:
> >>>>> Extended information (System/user connection; IP config; pppStats
> >>>>> bytes up/down stats (FEATURE) etc)
> >>>>> 
> >>>>> 	I would also like to implement bytes accounting like
> >>>>> 	kppp/kppplogview do.
> >>>>> 
> >>>>> I use 3G connection and transfered bytes counting is important to me.
> >>>>> By what I have found we can use Linux netlink interface to implement
> >>>>> this, the obvious problem is that as far as I know that only works in
> >>>>> Linux. We do not need need root privileges to access netlink
> >>>>> interface, which is good, and it gives statistics for all network
> >>>>> interfaces, not only pppX.
> >>>>> 
> >>>>> 	Is anyone working on that feature?
> >>>> 
> >>>> Hi Lamarque
> >>>> 
> >>>> I'm not aware of anyone working on it atm.  The code already existed
> >>>> in the 0.2 KDE 3 knetworkmanager code but was never reimplemented for
> >>>> KDE 4. Please go ahead and ask questions if you need to.  There are
> >>>> feature requests on bugs.kde.org so you would make some friends by
> >>>> adding this to KNM
> >>>> 
> >>> 	Ok, I will take a look at 0.2 source code. I am looking at
> >>> 
> >>> knetworkmanager code now and it there are other little things that I
> >>> think can be done too. For instance, there is no route information
> >>> available in the tooltip, it always returns "No route data available",
> >>> only for KDE 4.2.95 it tries to get the information. I removed the #if
> >>> KDE_IS_VERSION(4, 2, 95) but it still returns a empty route list, I
> >>> would like to change that too since it seems an easy thing to do (I may
> >>> be wrong :-)).
> >>> 
> >>> 	During this weekend I found that ModemManager already have a
> >>> 
> >>> GetSignalQuality method, I would like to add this information to the
> >>> tooltip too. Do you know where I need to change to add it?
> >> 
> >> Hi Lamarque, I have a patch for storing/getting routes information (IPv4
> >> settings). And if routes info is blocking you I can check it in. UI is
> >> not polished, but it works.
> >> -Pavel
> >> 
> > 	Is your patch for setting static routes? The problem I described is
> > 
> > because Solid always returns a empty route, even if you use DHCP and the
> > route
> > 
> > is working ok. In monolithic/tooltipbuilder.cpp there is this code:
> >     else if (requestedInfo == QLatin1String("routes")) {
> > 
> > #if KDE_IS_VERSION(4, 2, 95)
> > 
> >         QList<Solid::Control::IPv4Route> routes = cfg.routes();
> >         
> >         if (!routes.isEmpty()) {
> >         
> >             temp = buildRoutesHtmlTable(routes);
> >         
> >         }
> >         else temp = i18nc("@info:tooltip No network route data
> >         available", "No
> > 
> > route data available");
> > #else
> > 
> >         temp = i18nc("@info:tooltip No network route data available", "No
> > 
> > route data available");
> > #endif
> > 
> >         html = QString("<tr><td><b>%1:</b></td><td>&nbsp;%2</td></tr>")
> >         
> >                 .arg(i18nc("@info:tooltip network routes", "Routes"))
> >                 .arg(temp);
> >     
> >     }
> > 	
> > 	Even if I remove the #if KDE_IS_VERSION(4, 2, 95), routes.isEmpty()
> > 
> > always returns true. Does your patch solve this issue?
> 
> Sorry, you are right, my patch doesn't solve the issue that you
> described. I've just added UI to add/remove static routes for IPv4
> settings (as it is done in nm-applet). These routes are just stored in
> ~/KDEHOME/share/apps/networkmanagement/connections and should be passed
> to NM. Further NM should apply the routes. Can't say about this process
> in details.
> 
> -Pavel


-- 
Lamarque V. Souza
http://www.geographicguide.com/brazil.htm
Linux User #57137 - http://counter.li.org/
http://www.kde-mg.org


More information about the kde-networkmanager mailing list