Network Manager can't connect with Mediatek UMTS Stick

I am trying to connect my notebook to the internet by a Mediatek UMTS Stick Model S4222.
OS is Leap 42.1
Desktop is Plasma 5.5.5 (plasma-nm5 5.5.5-9.1)
Network Manager is 1.0.6-10.3
USB-Modeswitch is 2.2.5-3.8

The stick is found by network manager, however when trying to connect there are status messages:
“Preparing connection”
“receiving IP-address”
but finally no connection is established with the following errors:
“connection deactivated”
“IP-configuration not available”

SIM card and APN configuration are ok, were successfully tested with a HAWEI E303 stick. I checked for usb_modeswitch doing its work, the results were confusing:

> lsusb
Bus 008 Device 030: ID 0e8d:00a5 MediaTek Inc.

>
so usb_modeswitch seems to operate, see file /usr/share/usb_modeswitch/0e8d:0002:uPr=Product

Output of dmesg:

[344616.360098] usb 8-1: new high-speed USB device number 29 using ehci-pci
[344616.497417] usb 8-1: New USB device found, idVendor=0e8d, idProduct=0002
[344616.497422] usb 8-1: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[344616.497426] usb 8-1: Product: Product
[344616.497428] usb 8-1: Manufacturer: MediaTek Inc
[344616.497431] usb 8-1: SerialNumber: 683694202082390
[344616.497952] usb-storage 8-1:1.0: USB Mass Storage device detected
[344616.498082] scsi host18: usb-storage 8-1:1.0
[344617.496713] scsi 18:0:0:0: CD-ROM MEDIATEK FLASH DISK 6225 PQ: 0 ANSI: 0 CCS
[344617.498060] sr 18:0:0:0: [sr1] scsi3-mmc drive: 0x/0x caddy
[344617.498538] sr 18:0:0:0: Attached scsi CD-ROM sr1
[344617.498641] sr 18:0:0:0: Attached scsi generic sg2 type 5
[344618.045910] usb 8-1: USB disconnect, device number 29
[344618.812093] usb 8-1: new high-speed USB device number 30 using ehci-pci
[344618.945214] usb 8-1: New USB device found, idVendor=0e8d, idProduct=00a5
[344618.945219] usb 8-1: New USB device strings: Mfr=9, Product=10, SerialNumber=0
[344618.945222] usb 8-1: Product: Product
[344618.945225] usb 8-1: Manufacturer: MediaTek Inc
[344618.966865] cdc_mbim 8-1:1.0: cdc-wdm0: USB WDM device
[344618.967087] cdc_mbim 8-1:1.0 wwan0: register ‘cdc_mbim’ at usb-0000:00:1d.7-1, CDC MBIM, 06:07:bb:ca:4a:e1
[344618.967629] option 8-1:1.2: GSM modem (1-port) converter detected
[344618.967732] usb 8-1: GSM modem (1-port) converter now attached to ttyUSB0
[344618.968076] option 8-1:1.3: GSM modem (1-port) converter detected
[344618.968906] usb 8-1: GSM modem (1-port) converter now attached to ttyUSB1
[344618.969164] option 8-1:1.4: GSM modem (1-port) converter detected
[344618.969287] usb 8-1: GSM modem (1-port) converter now attached to ttyUSB2
[344618.969504] option 8-1:1.5: GSM modem (1-port) converter detected
[344618.969601] usb 8-1: GSM modem (1-port) converter now attached to ttyUSB3
[344618.969870] usb-storage 8-1:1.6: USB Mass Storage device detected
[344618.970076] scsi host19: usb-storage 8-1:1.6
[344619.968794] scsi 19:0:0:0: Direct-Access MEDIATEK FLASH DISK 6225 PQ: 0 ANSI: 0 CCS
[344619.969489] sd 19:0:0:0: Attached scsi generic sg2 type 0
[344619.981867] sd 19:0:0:0: [sdb] Test WP failed, assume Write Enabled
[344619.982982] sd 19:0:0:0: [sdb] Asking for cache data failed
[344619.982987] sd 19:0:0:0: [sdb] Assuming drive cache: write through
[344619.984477] sd 19:0:0:0: [sdb] Attached SCSI removable disk

Output of usb-devices:

T: Bus=08 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 30 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=0e8d ProdID=00a5 Rev=03.00
S: Manufacturer=MediaTek Inc
S: Product=Product
C: #Ifs= 7 Cfg#= 1 Atr=a0 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=02 Prot=01 Driver=option
I: If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I: If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I: If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I: If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

Why does the network connection fail?

Best regards
Thomas

So, perhaps the following will yield more info about why the connection is failing? Open terminal

sudo journalctl -f |egrep 'NetworkManager|ModemManager'

then try initiating a connection with this device. Observe/capture any relevant output.

Hi Deano,

thanks for the valuable hint, it helped me to solve the problem.
The key line was:

Okt 19 18:34:04 benno.hejze.at ModemManager[2491]: <warn>  Couldn't initialize PDP context with our APN: 'Serial command timed out' 

Turned out that the APN was wrong.

Nevertheless, I will post some of the output of that command here, because there were a lot of warnings and “cannots”.
Regards,
Thomas

 
Okt 19 18:30:05 benno.hejze.at ModemManager[2491]: <warn>  (ttyUSB2): port attributes not fully set
Okt 19 18:30:05 benno.hejze.at ModemManager[2491]: <warn>  (ttyUSB3): port attributes not fully set
Okt 19 18:30:05 benno.hejze.at ModemManager[2491]: <warn>  (ttyUSB1): port attributes not fully set
Okt 19 18:30:05 benno.hejze.at ModemManager[2491]: <warn>  (ttyUSB0): port attributes not fully set
Okt 19 18:30:05 benno.hejze.at ModemManager[2491]: opening device...
Okt 19 18:30:05 benno.hejze.at ModemManager[2491]: cannot connect to proxy: Could not connect: Connection refused
Okt 19 18:30:05 benno.hejze.at ModemManager[2491]: spawning new mbim-proxy (try 1)...
Okt 19 18:30:05 benno.hejze.at ModemManager[2491]: cannot connect to proxy: Could not connect: Connection refused
Okt 19 18:30:05 benno.hejze.at ModemManager[2491]: spawning new mbim-proxy (try 2)...
Okt 19 18:30:06 benno.hejze.at ModemManager[2491]: cannot connect to proxy: Could not connect: Connection refused
Okt 19 18:30:06 benno.hejze.at ModemManager[2491]: spawning new mbim-proxy (try 3)...
Okt 19 18:30:06 benno.hejze.at ModemManager[2491]: [/dev/cdc-wdm0] Read max control message size from descriptors file: 512
Okt 19 18:30:06 benno.hejze.at ModemManager[2491]: <warn>  (Plugin Manager) (cdc-wdm0): plugin mismatch error (expected: 'MTK', got: 'Generic')
Okt 19 18:30:15 benno.hejze.at ModemManager[2491]: <info>  Creating modem with plugin 'MTK' and '6' ports
Okt 19 18:30:15 benno.hejze.at ModemManager[2491]: <warn>  Could not grab port (net/wwan0): 'unsupported subsystem: 'net''
Okt 19 18:30:15 benno.hejze.at ModemManager[2491]: <warn>  Could not grab port (usbmisc/cdc-wdm0): 'unsupported subsystem: 'usbmisc''
Okt 19 18:30:15 benno.hejze.at ModemManager[2491]: <warn>  Could not grab port (tty/ttyUSB3): 'Cannot add port 'tty/ttyUSB3', unhandled serial type'
Okt 19 18:30:15 benno.hejze.at ModemManager[2491]: <warn>  Could not grab port (tty/ttyUSB2): 'Cannot add port 'tty/ttyUSB2', unhandled serial type'
Okt 19 18:30:15 benno.hejze.at ModemManager[2491]: <warn>  (ttyUSB0): port attributes not fully set
Okt 19 18:30:15 benno.hejze.at ModemManager[2491]: <info>  Modem for device at '/sys/devices/pci0000:00/0000:00:1d.7/usb8/8-1' successfully created
Okt 19 18:30:18 benno.hejze.at ModemManager[2491]: <warn>  couldn't load SIM identifier: 'Invalid ICCID response size (was 18, expected 20)'
Okt 19 18:30:18 benno.hejze.at ModemManager[2491]: <warn>  couldn't load Operator identifier: 'SIM returned malformed response '''
Okt 19 18:30:18 benno.hejze.at ModemManager[2491]: mm_charset_gsm_unpacked_to_utf8: assertion 'len < 4096' failed
Okt 19 18:30:18 benno.hejze.at ModemManager[2491]: <info>  Modem: state changed (unknown -> disabled)
Okt 19 18:30:18 benno.hejze.at NetworkManager[2550]: <info>  (ttyUSB0): modem state changed, 'disabled' --> 'enabling' (reason: user preference)
Okt 19 18:30:18 benno.hejze.at NetworkManager[2550]: <info>  (ttyUSB0): new Broadband device (carrier: UNKNOWN, driver: 'option1, cdc_mbim', ifindex: 0)
Okt 19 18:30:18 benno.hejze.at NetworkManager[2550]: <info>  (ttyUSB0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Okt 19 18:30:18 benno.hejze.at NetworkManager[2550]: <info>  (ttyUSB0): modem state 'enabling'
Okt 19 18:30:18 benno.hejze.at NetworkManager[2550]: <info>  (ttyUSB0): device state change: unavailable -> disconnected (reason 'none') [20 30 0]
Okt 19 18:30:18 benno.hejze.at NetworkManager[2550]: <info>  Auto-activating connection 'HOT'.
Okt 19 18:30:18 benno.hejze.at NetworkManager[2550]: <info>  (ttyUSB0): Activation: starting connection 'HOT' (13974d5c-675c-4d03-83b5-d123b4b95c24)
Okt 19 18:30:18 benno.hejze.at NetworkManager[2550]: <info>  (ttyUSB0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Okt 19 18:30:18 benno.hejze.at ModemManager[2491]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: state changed (disabled -> enabling)
Okt 19 18:30:18 benno.hejze.at ModemManager[2491]: <warn>  (ttyUSB0): port attributes not fully set
Okt 19 18:30:18 benno.hejze.at ModemManager[2491]: <warn>  (ttyUSB1): port attributes not fully set
Okt 19 18:30:18 benno.hejze.at ModemManager[2491]: <info>  Simple connect started...
Okt 19 18:30:18 benno.hejze.at ModemManager[2491]: <info>  Simple connect state (4/8): Wait to get fully enabled
Okt 19 18:30:18 benno.hejze.at ModemManager[2491]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (unknown -> registering)
Okt 19 18:30:19 benno.hejze.at ModemManager[2491]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (registering -> roaming)
Okt 19 18:30:19 benno.hejze.at ModemManager[2491]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: state changed (enabling -> registered)
Okt 19 18:30:19 benno.hejze.at ModemManager[2491]: <info>  Simple connect state (5/8): Register
Okt 19 18:30:19 benno.hejze.at ModemManager[2491]: <info>  Simple connect state (6/8): Bearer
Okt 19 18:30:19 benno.hejze.at ModemManager[2491]: <info>  Simple connect state (7/8): Connect
Okt 19 18:30:19 benno.hejze.at ModemManager[2491]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: state changed (registered -> connecting)
Okt 19 18:30:19 benno.hejze.at NetworkManager[2550]: <info>  (ttyUSB0): modem state changed, 'enabling' --> 'registered' (reason: user-requested)
Okt 19 18:30:19 benno.hejze.at NetworkManager[2550]: <info>  (ttyUSB0): modem state changed, 'registered' --> 'connecting' (reason: user-requested)
Okt 19 18:30:19 benno.hejze.at ModemManager[2491]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connecting -> connected)
Okt 19 18:30:19 benno.hejze.at ModemManager[2491]: <info>  Simple connect state (8/8): All done
Okt 19 18:30:19 benno.hejze.at NetworkManager[2550]: <info>  (ttyUSB0): modem state changed, 'connecting' --> 'connected' (reason: user-requested)
Okt 19 18:30:19 benno.hejze.at NetworkManager[2550]: <warn>  (ttyUSB0): failed to look up interface index
Okt 19 18:30:19 benno.hejze.at NetworkManager[2550]: <info>  (ttyUSB0): device state change: prepare -> config (reason 'none') [40 50 0]
Okt 19 18:30:19 benno.hejze.at NetworkManager[2550]: <info>  (ttyUSB0): device state change: config -> ip-config (reason 'none') [50 70 0]
Okt 19 18:30:19 benno.hejze.at NetworkManager[2550]: <warn>  (ttyUSB0): interface ttyUSB0 not up for IP configuration
Okt 19 18:30:19 benno.hejze.at NetworkManager[2550]: <info>  (ttyUSB0): using modem-specified IP timeout: 20 seconds
Okt 19 18:30:19 benno.hejze.at NetworkManager[2550]: <info>  starting PPP connection
Okt 19 18:30:19 benno.hejze.at NetworkManager[2550]: <info>  pppd started with pid 4349
Okt 19 18:30:19 benno.hejze.at NetworkManager[2550]: Plugin /usr/lib64/pppd/2.4.7/nm-pppd-plugin.so loaded.
Okt 19 18:30:19 benno.hejze.at NetworkManager[2550]: nm-pppd-plugin-Message: nm-ppp-plugin: (plugin_init): initializing
Okt 19 18:30:19 benno.hejze.at NetworkManager[2550]: nm-pppd-plugin-Message: nm-ppp-plugin: (nm_phasechange): status 3 / phase 'serial connection'
Okt 19 18:30:19 benno.hejze.at NetworkManager[2550]: <info>  (ppp0): new Generic device (carrier: UNKNOWN, driver: 'unknown', ifindex: 5)
Okt 19 18:30:19 benno.hejze.at NetworkManager[2550]: Using interface ppp0
Okt 19 18:30:19 benno.hejze.at NetworkManager[2550]: Connect: ppp0 <--> /dev/ttyUSB0
Okt 19 18:30:19 benno.hejze.at NetworkManager[2550]: nm-pppd-plugin-Message: nm-ppp-plugin: (nm_phasechange): status 5 / phase 'establish'
Okt 19 18:30:19 benno.hejze.at NetworkManager[2550]: nm-pppd-plugin-Message: nm-ppp-plugin: (nm_phasechange): status 6 / phase 'authenticate'
Okt 19 18:30:19 benno.hejze.at NetworkManager[2550]: nm-pppd-plugin-Message: nm-ppp-plugin: (get_credentials): passwd-hook, requesting credentials...
Okt 19 18:30:19 benno.hejze.at NetworkManager[2550]: nm-pppd-plugin-Message: nm-ppp-plugin: (get_credentials): got credentials from NetworkManager
Okt 19 18:30:19 benno.hejze.at NetworkManager[2550]: PAP authentication succeeded
Okt 19 18:30:19 benno.hejze.at NetworkManager[2550]: nm-pppd-plugin-Message: nm-ppp-plugin: (nm_phasechange): status 8 / phase 'network'
Okt 19 18:30:38 benno.hejze.at NetworkManager[2550]: LCP terminated by peer
Okt 19 18:30:38 benno.hejze.at NetworkManager[2550]: nm-pppd-plugin-Message: nm-ppp-plugin: (nm_phasechange): status 5 / phase 'establish'
Okt 19 18:30:39 benno.hejze.at NetworkManager[2550]: <warn>  pppd timed out or didn't initialize our dbus module
Okt 19 18:30:39 benno.hejze.at NetworkManager[2550]: Terminating on signal 15
Okt 19 18:30:39 benno.hejze.at NetworkManager[2550]: nm-pppd-plugin-Message: nm-ppp-plugin: (nm_phasechange): status 10 / phase 'terminate'
Okt 19 18:30:40 benno.hejze.at NetworkManager[2550]: nm-pppd-plugin-Message: nm-ppp-plugin: (nm_phasechange): status 11 / phase 'disconnect'
Okt 19 18:30:40 benno.hejze.at NetworkManager[2550]: Connection terminated.
Okt 19 18:30:40 benno.hejze.at NetworkManager[2550]: <info>  (ttyUSB0): device state change: ip-config -> failed (reason 'ip-config-unavailable') [70 120 5]
Okt 19 18:30:40 benno.hejze.at NetworkManager[2550]: <warn>  (ttyUSB0): Activation: failed for connection 'HOT'

Glad that helped you identify the cause of the connection problem. :slight_smile: