Network-Manager-Applet asks for PUK and PIN of only up to 4 digits long while these codes can be up to 8 digits long

Bug #318265 reported by AM on 2009-01-17
88
This bug affects 13 people
Affects Status Importance Assigned to Milestone
Network Manager Applet
In Progress
Medium
network-manager-applet (Ubuntu)
High
Unassigned
Nominated for Jaunty by Mika Korhonen
Nominated for Karmic by Mika Korhonen
Nominated for Lucid by Uwe

Bug Description

The seriousness of this bug can be discussed. Besides preventing the device to function, the SIM card will lock up and become unsable after several unlock attempts (10) with a wrong private unlock key (PUK).

The PIN and PUK keys seem to be entered and handled the same place in the source code, as far I can see the executable and source the entry field is limited to 4 digits:

Fragment of code found in applet-device-gsm.c
...
 *out_secret_entry = GTK_ENTRY (w);
 gtk_entry_set_max_length (GTK_ENTRY (w), 4);
 gtk_entry_set_width_chars (GTK_ENTRY (w), 4);
...

I discovered this problem since my mobile broadband pccard Huawei E600 cannot be used with network-manager 0.7 although it otherwise works in GNU-Linux.

AM (macchi) on 2009-01-17
description: updated
description: updated
Mads Chr. Olesen (shiyee) wrote :

As a work-around you can use the SIM card in a mobile phone enter the PUK-code there, and set a new PIN-code, then use the SIM card without problems.

Changed in network-manager-applet:
status: Unknown → New
Changed in network-manager-applet:
status: New → Confirmed
Alexander Sack (asac) on 2009-09-18
Changed in network-manager-applet (Ubuntu):
status: New → Triaged
assignee: nobody → Alexander Sack (asac)
importance: Undecided → High
mlx (myxal-mxl) wrote :

One can also "enter" the PIN manually (once every time the modem is connected to the computer), assuming you know the serial port used for configuration and that the modem supports standard AT commands:

echo -e AT+CPIN=\"####\"\\r > /dev/ttyUSB$

where #### is your PIN and $ is the number of the corresponding port. On my Huawei E1550, it's always the first port.

Looking at this, it seems to me like PINs longer than 4 characters should now be supported in network-manager 0.8 (lucid and later). Could someone please confirm this works for them so we can close this bug? Thanks!

Wolfgang Silbermayr (silwol) wrote :

On my lucid installation (with proposed and backports repositories disabled and everything updated) it is still only possible to enter 4 characters. Mathieu, do you have proposed or backports enabled? Is the change in an update that is delivered there?

My Lucid installation with NetworkManager version 0.8 still only allows 4 character PIN.

A workaround, for reference follows.

I was able to reset the SIM card using the PUK by doing the following:

> sudo dbus-send --system --print-reply --type=method_call --dest=org.freedesktop.ModemManager /org/freedesktop/ModemManager/Modems/0 org.freedesktop.ModemManager.Modem.Gsm.Card.SendPuk string:"########" string:"####"

where the '--print-reply' is not strictly necessary, and I'm not sure if I needed the '--type=method_call' either. I guessed as the '--dest' to send to and verified by using '.GetImsei' to see when it worked.

The path was taken from the /var/log/syslog message where the modem was initialized. The method is from the spec.html document provided as docs with NetworkManager.

Once I sent this message, I was able to use the modem with the PIN again.

Whew!
MIke
#%^P

Changed in network-manager-applet:
importance: Unknown → Medium
status: Confirmed → In Progress
Martin Pitt (pitti) on 2011-01-07
Changed in network-manager-applet (Ubuntu):
assignee: Alexander Sack (asac) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.