[Kde-hardware-devel] Review Request: Adds tab with Mobile Broadband info (depends on ModemManager)

Sebastian Kügler sebas at kde.org
Wed May 19 00:40:22 CEST 2010


Hi Lamarque,

On Wednesday 19 May 2010 00:07:48 Lamarque Vieira Souza wrote:
> 	Ok, now plasma applet connects me to the Internet with all three types
> (wired, wireless and 3G), but it needs a lot of work:

Good to see that the very basics work. I don't have the means to try here, so 
everything mobile broadband-related, I have to do blindly.

I don't have answers to all your questions, but I'll give some insight here and 
there, and maybe we can connect the dots and fix those issues.

One thing upfront, since that clarifies where certain problems are to be sought: KNM 
is a monolithic network manager client, it acquires an exclusive lock on 
NetworkManager's user settings service. The Plasmoid is a bit different, as in this 
case, we use a kded module to hold NetworkManager's user settings service, and 
commnunicate with this through DBus and the nmclient library you can find in 
libs/client. 

That means that the equivalent to restarting knm would be unloading and reloading the 
kded module (see the scripts in tools/(un)load-module.sh).

I've just committed a change to not install knm's autostart file by default, but load 
the kded module instead, by the way. So by default, you get the Plasmoid now. The 
default Plasma layout will now also enable the NM Plasmoid in the notification area, 
this change went into trunk last weekend.

> . auto-connect works for wired and wireless, but for 3G it only works if
> the modem has already been "initialized" (radio turned on and registered
> to operator network). 3G modems can be slow to initialize (my MD300 can
> take 15 seconds to turn radio on after I hook it up to USB port plus more
> 15s to register to operator network, sometimes even more than that). It
> seems plasma applet does not wait for it to initialize and auto-connect
> does not work. To force it to connect I had to disable networking, which
> disconnects wired and wireless connections, and enable networking again.

If it works with knm, then it's probably a bug in the kded module.

> . some time ago I did a test with wvdial with my cell phone and if I issue
> the AT +CFUN=1 command (turn radio on) it does the contrary, it disables
> radio and I have to reboot my phone to get it working again, even for
> voice call. ModemManager always issue this command when connecting, that
> is another reason I do not use auto-connect for 3G here, so please make it
> possible to connect manually or I will have to reboot my cell phone
> everytime I hook it to my notebook.

Is that a modem manager bug?

> . connecting manually is very important to me because I have a 3G modem and
> a cell phone, both using chips from the same operator, I do it this way
> because voice call using 3G chip is much more expensive than using the
> other chip (about more than 8 times more expensive, one more wierd thing
> about brazilian telephone operators). So, if I hook up my cell phone
> plasma applet will automatically connects me to 3G and my cell phone bill
> will increase like hell until I notice it. Ok it will not because the
> problem mentioned before, but if that problem did not existed this one
> would happen. The problem below makes things a little worse since plasma
> applet does not notifies me I am connected.

If you've set up a 3G connection (and not set it to connect automatically) it will 
show up in the list on the right, and clicking on it means you connect. You can use 
the disconnect button to, well disconnect. In theory, of course, so that would be the 
intended behaviour. :)

> . plasma applet does not emmit any notification at all as far as I can see.
> There are entries in bugs.kde.org with people asking for notifications when
> a connection has been made or closed (https://bugs.kde.org/204356). I
> implemented this feature some weeks ago for knm and I think it is quite
> useful.

The Plasma applet is not responsible for notifications, those should be done by the 
kded module, and configured in the KCM (which is also reachable via the plasmoid's 
config dialog). A missing feature / bug nevertheless, of course.

> . when NM restarts the applet does not recognise NM anymore, but the kded
> modules still works and auto-connects in background. Knm has this problem
> too and as far as I could investigate this problem
> (https://bugs.kde.org/233469) some dbus signals are not reaching the
> slots. I created a hack to restart knm and it seems to workaround the
> problem in knm, but I do not know how to restart plasma applet. I think
> this is a annyoing bug, if someone could help investigate this or make my
> hack work with plasma applet I appreciate it. As a test I tried to remove
> and re-add plasma applet from notification tray but it still does not
> recognise NM is running. Even removing the whole notification tray did not
> do the trick.

First thing to try is reloading the kded module:

qdbus org.kde.kded /kded unloadModule networkmanagement
qdbus org.kde.kded /kded loadModule networkmanagement

> . there are some inconsistencies in the interface. The "Not Available"
> entry below the Mobile Broadband interface for instance, when I click on
> it it just show me the details about the last connection I had clicked
> (eth0, eth1, or usb0 in my case), if it is "not available" it should do
> nothing when I click on in, right? The "Show more"  button does nothing
> here.

I've committed a fix for that two or three hours ago already. :-)

Cheers,
-- 
sebas

http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9


More information about the Kde-hardware-devel mailing list