Bug 349414 - Configured modem won't show up under available connections
Summary: Configured modem won't show up under available connections
Status: RESOLVED UNMAINTAINED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Networking in general (other bugs)
Version First Reported In: master
Platform: Kubuntu Linux
: NOR major
Target Milestone: 1.0
Assignee: Lukáš Tinkl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-20 12:28 UTC by Paul Konecny
Modified: 2024-12-23 18:23 UTC (History)
3 users (show)

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


Attachments
Screenshot showing the Problem (1.66 MB, image/png)
2015-06-20 12:30 UTC, Paul Konecny
Details
Modem Settings (PIN, etc.) (74.31 KB, image/png)
2015-06-21 09:11 UTC, Paul Konecny
Details
Screencast (3.31 MB, video/webm)
2015-06-27 12:28 UTC, Paul Konecny
Details
Arch Screencast - SIM stays locked (2.88 MB, video/webm)
2015-06-28 13:54 UTC, Paul Konecny
Details
Journald grep'ed for modem - Archlinux (30.69 KB, text/x-log)
2015-06-28 16:03 UTC, Paul Konecny
Details
Screencast - restarting kded5 (2.20 MB, video/webm)
2015-06-28 16:57 UTC, Paul Konecny
Details
Journald after restarting kded5 (492.48 KB, text/x-log)
2015-06-28 16:58 UTC, Paul Konecny
Details
Journald after restarting kded5 - take 2 (579.74 KB, text/x-log)
2015-06-28 17:37 UTC, Paul Konecny
Details
Gnome also can't unlock the SIM card without consolekit (163.16 KB, text/x-log)
2015-06-29 14:39 UTC, Paul Konecny
Details
Arch with Gnome and PIN enabled can't unlock SIM (163.16 KB, text/x-log)
2015-06-29 15:28 UTC, Paul Konecny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Konecny 2015-06-20 12:28:51 UTC
I just switched my father in law to kubuntu 15.04 with backports enabled. I configured his 3G modem in the network settings, but I can't enable it as it won't show up under the available connections in the tray widget.
At first I believed this to be a kubuntu specific issue so I tried it on my notebook running Arch with the latest Plasma installed and I get the same behaviour (see attached screenshot)
Any ideas? 
Thanks!

Reproducible: Always

Steps to Reproduce:
1. Plug in modem 
2. Configure Modem using the Network / Connections KCM
3. Connection doesn't show up under KCM but not the tray widget
4. Can't click "Connect" as a result

Actual Results:  
No WWAN connection under the available connections.

Expected Results:  
Configured WWAN connection should show in the tray widget.

Modem Huawei E160
OS: Kubuntu 15.04 with Backports and up-to-date-Arch on my notebook.
Comment 1 Paul Konecny 2015-06-20 12:30:44 UTC
Created attachment 93259 [details]
Screenshot showing the Problem
Comment 2 Lamarque V. Souza 2015-06-20 17:57:00 UTC
It looks like your modem has not been detected by ModemManager. What does the command below return?

# nmcli device

It should return something similar to
ttyACM0  gsm       disconnected  --

If nothing with "gsm" appears then your modem has not been detected. Maybe you need to use usb_modeswitch to change modem's default configuration from "pendrive" to "modem":

http://ubuntuforums.org/showthread.php?t=1473228&page=2

Here is some documentation about how usb_modeswitch works:

http://www.draisberghof.de/usb_modeswitch/
Comment 3 Paul Konecny 2015-06-20 18:11:47 UTC
Hi Lamarque!
This is the Output of my Arch notebook. It shows both my modems as unavailable. (One integrated LTE and the dongle of my father in law)
[paul@HP-EliteBook-850-G1 ~]$ LANG=C nmcli device
DEVICE             TYPE      STATE         CONNECTION 
wlo1               wifi      connected   XXXXXXXXX
XXXXXXXX     bt        disconnected  --         
XXXXXXXX  bt        disconnected  --         
enp0s25            ethernet  unavailable   --         
cdc-wdm0           gsm       unavailable   --         
ttyUSB5            gsm       unavailable   --         
lo                 loopback  unmanaged     --     

I can't reproduce on the kubuntu machine anymore as I unfortunately had to reinstall windows because the input method switcher didn't work with Plasma 5 (He needs Bulgarian and German).

On a side note: I never got the LTE modem to show up under Plasma 5. If I try to configure a connection it only gives me "generic device". 
Under Gnome it shows as "Quallcomm 4G device" and I can see the IMEI. (I don't have a SIM card for that modem at the moment so I can't tell what's the problem there. Should I file a bug anyway?)
Thanks!
Comment 4 Lamarque V. Souza 2015-06-20 23:49:07 UTC
Is your sim card locked with a PIN?
Comment 5 Paul Konecny 2015-06-21 09:09:04 UTC
Yes, but I entered it in the connection settings, told it to save the PIN and checked "Make connection available for all users" so that I don't have kwallet involved. (see next attachment)
Comment 6 Paul Konecny 2015-06-21 09:11:10 UTC
Created attachment 93274 [details]
Modem Settings (PIN, etc.)
Comment 7 Lamarque V. Souza 2015-06-21 13:29:57 UTC
Does it work if you disable sim card lock? If it does then there is something wrong in the modemmanager-qt's code that unlock the sim card.
Comment 8 Paul Konecny 2015-06-21 19:15:30 UTC
Yes, disabling the PIN query gave me an instant connection. Seems we're getting closer to a solution.
Comment 9 Jan Grulich 2015-06-22 12:45:54 UTC
Sounds like this bug in NetworkManager, see [1].

[1] - https://bugzilla.gnome.org/show_bug.cgi?id=740966
Comment 10 Lamarque V. Souza 2015-06-22 13:53:13 UTC
Jan, maybe that is the problem Paul is facing, but I have NetworkManager 1.0.2 installed and as far as I can tell it contains the fix for the bug you mentioned. I can say that because my old connections are listed without problems, but sim unlocking does not work here. When I type the correct PIN into the unlock dialog and I get a failed unlock message afterwards. Maybe it is a different bug. When I get home I will debug this problem, I do not have ModemManager installed in my work computer.
Comment 11 Lamarque V. Souza 2015-06-26 17:45:09 UTC
I have tested it here and after a fresh boot ModemManager::Sim::sendPin() always returns with error (an error dialog appears). If I restart kded5 then it works. Probably Paul's problem is related to https://bugzilla.gnome.org/show_bug.cgi?id=740966 and not this last problem. Paul, which NetworkManager version do you use?
Comment 12 Paul Konecny 2015-06-27 12:28:41 UTC
Created attachment 93363 [details]
Screencast

Hello Lamarque, 
On my Kubuntu machine I have v0.9.10 and on my arch installation I've got 1.0.2-4.
One strange thing though: In this attached screencast you can see that the PIN prompt now shows on Kubuntu and that a new window popped up that didn't show with the other modem nor on the other installation saying that the system policies prevent unlocking the broadband device and that I should enter my sudo password. After that the modem unlocked sucessfully. I'll try it with the huawei again soon. After adding the connection I get the overview. The strange thing there is, that it says that a PIN is not necessary. After that kwallet prevents me form making a connection. This however can be worked around by deleting the connection and re-adding it with "Allow all users to use this connection". I'm not at home at the moment so I don't have access to my swap-out disk containing arch. I can probably test this there on monday again.
Comment 13 Paul Konecny 2015-06-27 12:38:00 UTC
Hello Lamarque, 
I can confirm that the culprit seems to be the systems-policy window that didn't show up on Arch and the other Kubuntu installation. Unlocking the huawei modem now works as expected. The only thing that makes me curious now is why network manager thinks a PIN is not necessary as it clearly is.
Comment 14 Paul Konecny 2015-06-28 13:54:32 UTC
Created attachment 93384 [details]
Arch Screencast - SIM stays locked

Hello Lamarque, 
I tested again on my arch box now fully updated as of today. networkmanager v 1.0.2-4, modemmanager 1.4.8-2.
The old connections showed up without issue, so I'm not affected by the gnome bug mentioned. I can confirm however, that the systems policy window does not show up and I guess as a result the SIM unlock is not successful. You can see the behaviour in the attached screencast. I plug the modem in, the PIN query pops up, I enter the pin and go to my connection editor to add a new connection. Trying to add one only gives me "generic GSM device". Shortly after that, the PIN query pops up again.
Comment 15 Lamarque V. Souza 2015-06-28 14:47:22 UTC
Probably you are facing the same problem as I am, for some reason pin unlocking only works after restarting kded5. It's odd that no error dialog appears in your screencast after you type the pin, one appears here. Another odd thing is that no root password dialog appears here, which should happen in your setup too. Does your Arch Linux use systemd/logind or consolekit?
Comment 16 Paul Konecny 2015-06-28 15:01:39 UTC
My Arch is resumably running systemd/logind. According to this https://wiki.archlinux.org/index.php/ConsoleKit consolekit is not part of Arch's main repos anymore. I'd have to install it via AUR. On my Kubuntu box consolekit is installed.
Comment 17 Lamarque V. Souza 2015-06-28 15:32:59 UTC
I use consolekit here, so I cannot test systemd/logind configuration. Usually ModemManager should add configuration to allow ModemManager::Sim::sendPin() method to run without asking for root password. In my Gentoo there are those the lines below in /etc/dbus-1/system.d/org.freedesktop.ModemManager1.conf:

    <allow send_destination="org.freedesktop.ModemManager1"
           send_interface="org.freedesktop.ModemManager1.Sim"
           send_member="SendPin"/>

That allows Plasma NM to use SendPin without root password.

I am not sure if you the problem you have is sendPin() failing or PolicyKit denying access to using sendPin() even with the correct root password. Can you send me your journald's log so I can check it?
Comment 18 Paul Konecny 2015-06-28 16:03:47 UTC
Created attachment 93385 [details]
Journald grep'ed for modem - Archlinux

Here's my journald output. I had to grep it for "modem" as it is full of baloo messages and totals to 48,6 MB if not filtered.
Comment 19 Lamarque V. Souza 2015-06-28 16:14:05 UTC
The log indicates pin unlocking is failing like here. Can you restart kded5 and check if it solves this problem? You can do it like this:

killall kded5; sleep 2; kdeinit5_wrappler kded5
Comment 20 Paul Konecny 2015-06-28 16:57:16 UTC
Created attachment 93388 [details]
Screencast - restarting kded5

I restarted kdek5, but I edited your command to wrapper.
Still no luck. Journald output follows right away
Comment 21 Paul Konecny 2015-06-28 16:58:09 UTC
Created attachment 93389 [details]
Journald after restarting kded5
Comment 22 Paul Konecny 2015-06-28 17:00:19 UTC
Heureka! It just showed up. Seems it needs some time after restart. 
I'll gather information and will be right back.
Comment 23 Paul Konecny 2015-06-28 17:37:53 UTC
Created attachment 93390 [details]
Journald after restarting kded5 - take 2

The huawei did show instead of "Generic GSM device" but after I configured a connection it wouldn't show up in the tray widget so I could not connect. Journald attached. 
(Screencast is too large to attach 4,2 MB)
Comment 24 Lamarque V. Souza 2015-06-29 01:02:47 UTC
Have you unplugged your modem at time Jun 28 18:40:34? If not then it looks like your USB port is not working properly.
Comment 25 Lamarque V. Souza 2015-06-29 01:03:04 UTC
Git commit 0eb8b9972b6555b5975417e593c0ab1feeb422e5 by Lamarque V. Souza.
Committed on 29/06/2015 at 00:46.
Pushed by lvsouza into branch '0.9.3'.

Fix updating item when gsm network mode changes.

M  +1    -1    libs/models/networkmodel.cpp

http://commits.kde.org/plasma-nm/0eb8b9972b6555b5975417e593c0ab1feeb422e5
Comment 26 Paul Konecny 2015-06-29 10:25:52 UTC
Yes, I unplugged it to go through the whole PIN unlocking from the start to see if there would be changes after restarting kded5.
Comment 27 Paul Konecny 2015-06-29 14:39:15 UTC
Created attachment 93396 [details]
Gnome also can't unlock the SIM card without consolekit

Trying to test the connections for you regarding the qualcomm modem under Gnome, I noticed that if the PIN lock is active on the SIM card, i can see the IMEI but no connection can be made. I don't even get a PIN query like I do in plasma. Journalctl output is attached. There definitely seems to be a problem with unlocking on systems not using consolekit. 
I'll deactivate the query and get back to you on the qualcomm issue.
Comment 28 Paul Konecny 2015-06-29 15:28:33 UTC
Created attachment 93405 [details]
Arch with Gnome and PIN enabled can't unlock SIM
Comment 29 Lamarque V. Souza 2015-06-30 17:26:18 UTC
This line is strange:

Jun 29 16:28:11 HP-Elitebook-850-G1 gnome-session[500]: ** (gnome-shell:598): CRITICAL **: nma_mobile_providers_database_lookup_cdma_sid: assertion 'sid > 0' failed

it looks like Gnome's applet searched for a cdma provider even though your modem is gsm. Anyway, some lines later there is this:

Jun 29 16:28:13 HP-Elitebook-850-G1 ModemManager[209]: <info>  Creating modem with plugin 'Generic' and '1' ports
Jun 29 16:28:13 HP-Elitebook-850-G1 ModemManager[209]: <warn>  Could not grab port (tty/ttyS0): 'Cannot add port 'tty/ttyS0', unhandled serial type'
Jun 29 16:28:13 HP-Elitebook-850-G1 ModemManager[209]: <warn>  Couldn't create modem for device at '/sys/devices/pci0000:00/0000:00:16.3': Failed to find primary AT port

That looks like driver or hardware issue.
Comment 30 Paul Konecny 2015-07-02 10:21:22 UTC
Do you think I'm facing the same problem as him? https://krivokuca.net/2012/08/hp-8560p-gobi-3000-qcserial-and-gobiserial-blues/
Comment 31 Lamarque V. Souza 2015-07-02 17:23:25 UTC
(In reply to Paul Konecny from comment #30)
> Do you think I'm facing the same problem as him?
> https://krivokuca.net/2012/08/hp-8560p-gobi-3000-qcserial-and-gobiserial-
> blues/

Probably.
Comment 32 Jan Grulich 2016-07-19 13:47:17 UTC
Closing this bug as it is reported for already unmaintained version. Re-open it please if you are still able to reproduce it with latest Plasma 5.
Comment 33 Ben Cooksley 2024-12-23 18:23:39 UTC
Bulk transfer as requested in T17796