Bug 282453 - Network Management applet unable to unblock a sim card
Summary: Network Management applet unable to unblock a sim card
Status: RESOLVED FIXED
Alias: None
Product: Network Management
Classification: Unmaintained
Component: Mobile Broadband (show other bugs)
Version: 0.9
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Will Stephenson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-21 05:53 UTC by Enrique Artal
Modified: 2011-10-14 14:42 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Crash after trying to unblock sim card. (3.61 KB, application/octet-stream)
2011-10-06 14:07 UTC, Enrique Artal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Enrique Artal 2011-09-21 05:53:01 UTC
Version:           0.9 (using KDE 4.7.1) 
OS:                Linux

I am able to create a new mobile broadband connection. Some seconds after plugging the usb modem I got a dialog box to introduce the pin of the sim card. After introducing it and clicking OK the box appears and appears again without unblocking the sim card.

If I open the nm-applet, its dialog box works and then I can connect through any applet. By the way, in the settings I introduce the sim pin but the dialog box appear always.

Reproducible: Always

Steps to Reproduce:
1.- Enter the data of your cell company and save them
2.- Plug the usb modem
3.- Wait for the unblocking dialog box
4.- Introduce your PIN

Actual Results:  
The dialog box reappears without unblocking

Expected Results:  
Unblocked sim to get the connection
Comment 1 Lamarque V. Souza 2011-09-21 17:52:12 UTC
Which NetworkManager, ModemManager and Plasma NM do you use? Go to "Manage Connections" -> Other and look for the version string there.

Sim unlock works for me here. The dialog appears again if the unlock process fails.

You did not mentioned the policykit password dialog appearing, it is necessary to unlock the simcard.
Comment 2 Enrique Artal 2011-09-23 08:51:00 UTC
I am working in Fedora 15 with kde 4.7.1 from kde-redhat repo.
Also:
-NetworkManager-0.9.0-1.fc15.x86_64
-ModemManager-0.4.998-1.git20110706.fc15.x86_64
-kde-plasma-networkmanagement-0.9-0.59.20110919git.nm09.fc15.x86_64

No policykit password dialog appear; how can I get it?

(In reply to comment #1)
> Which NetworkManager, ModemManager and Plasma NM do you use? Go to "Manage
> Connections" -> Other and look for the version string there.
> 
> Sim unlock works for me here. The dialog appears again if the unlock process
> fails.
> 
> You did not mentioned the policykit password dialog appearing, it is necessary
> to unlock the simcard.
Comment 3 Lamarque V. Souza 2011-09-23 11:17:24 UTC
(In reply to comment #2)
> I am working in Fedora 15 with kde 4.7.1 from kde-redhat repo.
> Also:
> -NetworkManager-0.9.0-1.fc15.x86_64
> -ModemManager-0.4.998-1.git20110706.fc15.x86_64

I have never tested ModemManger-0.5. If there is a change in its API compared to 0.4 then that explains why it is working.

> 
> No policykit password dialog appear; how can I get it?

NM should trigger the policykit password dialog when it needs the password. Plasma NM does not need to do anything. If it is not asking then there is something wrong somewhere in NM <-> MM communication, unless ModemManager-0.5 has changed the way it handles permissions.
Comment 4 Enrique Artal 2011-09-26 21:06:24 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > I am working in Fedora 15 with kde 4.7.1 from kde-redhat repo.
> > Also:
> > -NetworkManager-0.9.0-1.fc15.x86_64
> > -ModemManager-0.4.998-1.git20110706.fc15.x86_64
> 
> I have never tested ModemManger-0.5. If there is a change in its API compared
> to 0.4 then that explains why it is working.
> 
> > 
> > No policykit password dialog appear; how can I get it?
> 
> NM should trigger the policykit password dialog when it needs the password.
> Plasma NM does not need to do anything. If it is not asking then there is
> something wrong somewhere in NM <-> MM communication, unless ModemManager-0.5
> has changed the way it handles permissions.
I tried with another computer using:
NetworkManager-0.9.0-1.fc15.i686
ModemManager-0.4.998-1.git20110706.fc15.i686
kde-plasma-networkmanagement-0.9-0.54.20110812git.nm09.fc15.i686
A box asking a password appear and it unblocked the sim card. I will tray
again with my laptop.
Comment 5 Lamarque V. Souza 2011-09-26 22:20:31 UTC
Hmmm in August 20 I commited a patch to allow marking GSM Pins as not required. Can you check if in your connection configuration your PIN is marked as "Not required"? Just go to Manage Connections -> Mobile Broadband -> "select your connection" -> Edit. There should be a combobox beside the PIN text edit. In your case the correct configuration is "Always ask". Storing the PIN is allowed but risky since NM will use that same PIN with any SIM card that is in your modem, which may not be the correct one.
Comment 6 Enrique Artal 2011-10-06 14:07:35 UTC
Created attachment 64287 [details]
Crash after trying to unblock sim card.
Comment 7 Enrique Artal 2011-10-06 14:08:50 UTC
Sorry, this message should have come before the attachment.

I tried again without success. The dialog box appears and appears again. This is
I copy the logged messages:

Oct  6 16:03:24 satelite NetworkManager[888]: <warn> (ttyUSB0): failed to look up interface index
Oct  6 16:03:24 satelite NetworkManager[888]: <info> (ttyUSB0): new GSM/UMTS device (driver: 'option1' ifindex: -1)
Oct  6 16:03:24 satelite NetworkManager[888]: <info> (ttyUSB0): exported as /org/freedesktop/NetworkManager/Devices/2
Oct  6 16:03:24 satelite NetworkManager[888]: <info> (ttyUSB0): now managed
Oct  6 16:03:24 satelite NetworkManager[888]: <info> (ttyUSB0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Oct  6 16:03:24 satelite NetworkManager[888]: <info> (ttyUSB0): deactivating device (reason 'managed') [2]
Oct  6 16:03:24 satelite NetworkManager[888]: nm_system_iface_flush_routes: assertion `ifindex > 0' failed
Oct  6 16:03:24 satelite NetworkManager[888]: nm_system_iface_flush_addresses: assertion `ifindex > 0' failed
Oct  6 16:03:24 satelite NetworkManager[888]: <info> (ttyUSB0): device state change: unavailable -> disconnected (reason 'none') [20 30 0]
Oct  6 16:04:12 satelite abrt[6437]: invalid number '/var/spool/abrt'
Comment 8 Lamarque V. Souza 2011-10-12 02:54:28 UTC
Please, is the PIN marked as "Not required" or not?

This crash happens if your Plasma NM was compiled against kde-workspace < 4.7.0 and now is running with kde-workspace >= 4.7.0. Please upgrade Plasma NM or recompile it against kde-workspace >= 4.7.0.
Comment 9 Kevin Kofler 2011-10-12 14:49:43 UTC
> This crash happens if your Plasma NM was compiled against kde-workspace < 4.7.0
> and now is running with kde-workspace >= 4.7.0. Please upgrade Plasma NM or
> recompile it against kde-workspace >= 4.7.0.

Rex, we need a rebuilt kde-plasma-networkmanagement in the kde47 repo.
Comment 10 Enrique Artal 2011-10-14 11:10:53 UTC
(In reply to comment #9)
> > This crash happens if your Plasma NM was compiled against kde-workspace < 4.7.0
> > and now is running with kde-workspace >= 4.7.0. Please upgrade Plasma NM or
> > recompile it against kde-workspace >= 4.7.0.
> 
> Rex, we need a rebuilt kde-plasma-networkmanagement in the kde47 repo.

I did rpmbuild from the src.rpm and now it works. Thanks for all!!