Ubuntu – WWAN-modem disabeling by itself, Ubuntu 14.10, Lenovo T440s, Sierra Wireless EM7345 4G LTE

14.10lenovonetworkingwirelesswwan

I have had my Lenovo for quite some time now, and tried looking arround for solutions to my problem with the WWAN.

I can enable the WWAN both through the GUI and the terminal, and connect via my network provider. But after some time the net drops out and the modem disables it selfs. It is the same network that my phone uses and there is no problem with that one.

I can not seem to find the correct log to figure out with the problem is. So I hope that there is some one here that can help me or have some ideas where to look for the problem.

I have the following output from the terminal that I think could be helpful, all this is when the wwan is connected to the network:

  1. lsb_release -a:

    Distributor ID: Ubuntu
    Description: Ubuntu 14.10
    Release: 14.10
    Codename: utopic

  2. uname -a:

    Linux cbobach-ThinkPad-T440s 3.16.0-031600-generic #201408031935 SMP Sun Aug 3 23:36:11 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

  3. usb-devices:

    T: Bus=02 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#= 7 Spd=480 MxCh= 0
    D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
    P: Vendor=1199 ProdID=a001 Rev=17.29
    S: Manufacturer=Sierra Wireless Inc.
    S: Product=Sierra Wireless EM7345 4G LTE
    S: SerialNumber=013937001863610
    C: #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=100mA
    I: If#= 0 Alt= 1 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
    I: If#= 1 Alt= 2 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
    I: If#= 2 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=01 Driver=cdc_acm
    I: If#= 3 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm

  4. nmcli dev list:

    GENERAL.DEVICE: cdc-wdm1
    GENERAL.TYPE: gsm
    GENERAL.VENDOR: —
    GENERAL.PRODUCT: —
    GENERAL.DRIVER: cdc_mbim, cdc_acm
    GENERAL.DRIVER-VERSION:
    GENERAL.FIRMWARE-VERSION:
    GENERAL.HWADDR: (unknown)
    GENERAL.STATE: 100 (connected)
    GENERAL.REASON: 0 (No reason given)
    GENERAL.UDI: /org/freedesktop/ModemManager1/Modem/54
    GENERAL.IP-IFACE: wwan0
    GENERAL.NM-MANAGED: yes
    GENERAL.AUTOCONNECT: yes
    GENERAL.FIRMWARE-MISSING: no
    GENERAL.CONNECTION: /org/freedesktop/NetworkManager/ActiveConnection/15
    CAPABILITIES.CARRIER-DETECT: no
    CAPABILITIES.SPEED: unknown
    CONNECTIONS.AVAILABLE-CONNECTION-PATHS: /org/freedesktop/NetworkManager/Settings/{2}
    CONNECTIONS.AVAILABLE-CONNECTIONS[1]: d710afac-2f41-4778-9861-83cc4a272b31 | 3 BredbÄnd (standard)
    IP4.ADDRESS[1]: ip = 109.56.85.37/24, gw = 0.0.0.0
    IP4.DNS[1]: 95.209.200.69
    IP4.DNS[2]: 95.209.200.70

  5. ifconfig:

    wwan0 Link encap:Ethernet HWaddr da:5a:85:51:96:5b
    inet addr:109.56.32.124 Bcast:109.56.32.255 Mask:255.255.255.0
    inet6 addr: ::d85a:85ff:fe51:965b/64 Scope:Global
    inet6 addr: ::adf4:9e24:ff95:f33/64 Scope:Global
    inet6 addr: fe80::d85a:85ff:fe51:965b/64 Scope:Link
    UP BROADCAST RUNNING NOARP MULTICAST MTU:1500 Metric:1
    RX packets:1 errors:0 dropped:0 overruns:0 frame:0
    TX packets:49 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:88 (88.0 B) TX bytes:8045 (8.0 KB)

  6. syslog:

    https://dl.dropboxusercontent.com/u/14778527/syslog

Please write if you think if anything that could cast light on the problem.

Best Answer

I had the same issue on Ubuntu 14.04 on a Lenovo Thinkpad W541 with a Sierra Wireless EM7345 4G LTE with firmware: FIH7160_V1.2_WW_01.1415.07

I read in the EM7345 firmware 1.1 Changelog that the issue of random disconnects and then failing to reconnect has been fixed in 1.2. I can confirm that the issue still persists in 1.2 and there aren't any updates for Lenovo W541.

The solution is to cut power to the integrated Sierra Wireless EM7345 modem (which is technically an USB device), to force a hard restart. I tried absolutely every soft restart possible until I stumbled onto the possibility of cutting power to an USB port completely without shutting down my laptop.

Follow these steps:

1. find out the bus path of your Sierra Wireless EM7345 modem with:

$ lsusb -t

search for "cdc" in the output, here's mine:

/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/15p, 480M
    |__ Port 5: Dev 2, If 0, Class=Chip/SmartCard, Driver=usbfs, 12M
    |__ Port 6: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 6: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 6: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 7: Dev 4, If 0, Class=Vendor Specific Class, Driver=, 12M
    |__ Port 10: Dev 14, If 0, Class=Communications, Driver=cdc_mbim, 480M
    |__ Port 10: Dev 14, If 1, Class=CDC Data, Driver=cdc_mbim, 480M
    |__ Port 10: Dev 14, If 2, Class=Communications, Driver=cdc_acm, 480M
    |__ Port 10: Dev 14, If 3, Class=CDC Data, Driver=cdc_acm, 480M
    |__ Port 12: Dev 7, If 0, Class=Video, Driver=uvcvideo, 480M
    |__ Port 12: Dev 7, If 1, Class=Video, Driver=uvcvideo, 480M

here you can see that in Bus 01 Port 10 there is a cdc device (the Sierra Wireless EM7345 modem), this means its path is: 1-10

2. send the modem into a soft restart:

$ sudo modem-cmd /dev/ttyACM0 AT+CFUN=16

there will be no output if its successful. this command does not close itself, so CTRL+C kill it

3. shut off power to the modem (you need to be root):

$ echo '1-10' |sudo tee /sys/bus/usb/drivers/usb/unbind

wait for a few second until the device is shut down, when there is no activity in /var/log/syslog

4. turn power back on to the modem:

$ echo '1-10' |sudo tee /sys/bus/usb/drivers/usb/bind

After that it will take 1..2 seconds for the modem to start, its done when there is no activity in syslog

5. tick Enable Mobile Broadband in NetworkManagers tray icon right click menu.

6. connect to your chosen Mobile Broadband connection like usual

Or use this script:

I wrote a small bash script to do all this, which I start with gksudo:

#!/bin/bash
# run this with root!!
# if this doesnt work, check if the bus path is correct with:
# lsusb -t (search for cdc)

modem-cmd /dev/ttyACM0 AT+CFUN=16 &
sleep 1
killall modem-cmd
echo '1-10' |tee /sys/bus/usb/drivers/usb/unbind
sleep 2
echo '1-10' |tee /sys/bus/usb/drivers/usb/bind

Appendum

here's my syslog for SEO purposes:

Every time I suspend my laptop or disconnect the Mobile Broadband connection or when the Mobile Broadband connection dies by itself (happens sometimes):
Also, the modem sometimes disconnects on its own:
Nov  6 02:19:44 L4 avahi-daemon[1075]: Interface wwan0.IPv6 no longer relevant for mDNS.
Nov  6 02:19:44 L4 avahi-daemon[1075]: Leaving mDNS multicast group on interface wwan0.IPv6 with address fe80::d8a3:4fff:fec9:d56e.
Nov  6 02:19:44 L4 avahi-daemon[1075]: Interface wwan0.IPv4 no longer relevant for mDNS.
Nov  6 02:19:44 L4 avahi-daemon[1075]: Leaving mDNS multicast group on interface wwan0.IPv4 with address 10.144.34.75.
Nov  6 02:19:44 L4 kernel: [258309.296360] usb 1-10: USB disconnect, device number 13
Nov  6 02:19:44 L4 kernel: [258309.296416] cdc_mbim 1-10:1.0 wwan0: unregister 'cdc_mbim' usb-0000:00:14.0-10, CDC MBIM
Nov  6 02:19:44 L4 NetworkManager[1024]:    SCPlugin-Ifupdown: devices removed (path: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10:1.0/net/wwan0, iface: wwan0)
Nov  6 02:19:44 L4 ModemManager[982]: <info>  (net/wwan0): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb1/1-10
Nov  6 02:19:44 L4 avahi-daemon[1075]: IP_DROP_MEMBERSHIP failed: No such device
Nov  6 02:19:44 L4 avahi-daemon[1075]: Withdrawing address record for fe80::d8a3:4fff:fec9:d56e on wwan0.
Nov  6 02:19:44 L4 avahi-daemon[1075]: Withdrawing address record for 10.144.34.75 on wwan0.
Nov  6 02:19:44 L4 avahi-daemon[1075]: Withdrawing workstation service for wwan0.
Nov  6 02:19:44 L4 ModemManager[982]: [/dev/cdc-wdm0] unexpected port hangup!
Nov  6 02:19:44 L4 ModemManager[982]: <info>  (usbmisc/cdc-wdm0): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb1/1-10
Nov  6 02:19:44 L4 kernel: [258309.319654] cdc_acm 1-10:1.2: failed to set dtr/rts
Nov  6 02:19:44 L4 ModemManager[982]: <info>  (tty/ttyACM0): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb1/1-10
Nov  6 02:19:44 L4 NetworkManager[1024]: <info> (cdc-wdm0): device state change: activated -> unmanaged (reason 'removed') [100 10 36]
Nov  6 02:19:44 L4 NetworkManager[1024]: <info> (cdc-wdm0): deactivating device (reason 'removed') [36]
Nov  6 02:19:44 L4 NetworkManager[1024]: <warn> (12) failed to find interface name for index
Nov  6 02:19:44 L4 NetworkManager[1024]: nm_system_iface_flush_routes: assertion 'iface != NULL' failed
Nov  6 02:19:44 L4 NetworkManager[1024]: <warn> (12) failed to find interface name for index
Nov  6 02:19:44 L4 NetworkManager[1024]: <warn> (12) failed to find interface name for index
Nov  6 02:19:44 L4 NetworkManager[1024]: nm_system_iface_flush_routes: assertion 'iface != NULL' failed
Nov  6 02:19:44 L4 NetworkManager[1024]: <warn> (12) failed to find interface name for index
Nov  6 02:19:44 L4 NetworkManager[1024]: <info> Writing DNS information to /sbin/resolvconf
Nov  6 02:19:44 L4 NetworkManager[1024]: <info> (cdc-wdm0): cleaning up...
Nov  6 02:19:44 L4 NetworkManager[1024]: <info> (cdc-wdm0): taking down device.
Nov  6 02:19:44 L4 NetworkManager[1024]: <info> Unmanaged Device found; state CONNECTED forced. (see http://bugs.launchpad.net/bugs/191889)
Nov  6 02:19:44 L4 dbus[956]: [system] Activating service name='org.freedesktop.nm_dispatcher' (using servicehelper)
Nov  6 02:19:44 L4 NetworkManager[1024]: <warn> (cdc-wdm0) failed to disconnect modem: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface 'org.freedesktop.ModemManager1.Modem.Simple' on object at path /org/freedesktop/ModemManager1/Modem/3
Nov  6 02:19:44 L4 dbus[956]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Nov  6 02:19:44 L4 dbus[956]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Nov  6 02:19:45 L4 kernel: [258309.563672] usb 1-10: new high-speed USB device number 14 using xhci_hcd
Nov  6 02:19:45 L4 kernel: [258309.699555] usb 1-10: New USB device found, idVendor=1199, idProduct=a001
Nov  6 02:19:45 L4 kernel: [258309.699558] usb 1-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Nov  6 02:19:45 L4 kernel: [258309.699559] usb 1-10: Product: Sierra Wireless EM7345 4G LTE
Nov  6 02:19:45 L4 kernel: [258309.699560] usb 1-10: Manufacturer: Sierra Wireless Inc.
Nov  6 02:19:45 L4 kernel: [258309.699561] usb 1-10: SerialNumber: 013937005331614
Nov  6 02:19:45 L4 kernel: [258309.720394] cdc_mbim 1-10:1.0: setting rx_max = 16384
Nov  6 02:19:45 L4 kernel: [258309.720903] cdc_mbim 1-10:1.0: cdc-wdm0: USB WDM device
Nov  6 02:19:45 L4 kernel: [258309.721035] cdc_mbim 1-10:1.0 wwan0: register 'cdc_mbim' at usb-0000:00:14.0-10, CDC MBIM, da:a3:4f:c9:d5:6e
Nov  6 02:19:45 L4 kernel: [258309.721963] cdc_acm 1-10:1.2: ttyACM0: USB ACM device
Nov  6 02:19:45 L4 mtp-probe: checking bus 1, device 14: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-10"
Nov  6 02:19:45 L4 mtp-probe: bus: 1, device: 14 was not an MTP device
Nov  6 02:19:45 L4 NetworkManager[1024]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10:1.0/net/wwan0, iface: wwan0)
Nov  6 02:19:45 L4 NetworkManager[1024]:    SCPlugin-Ifupdown: device added (path: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10:1.0/net/wwan0, iface: wwan0): no ifupdown configuration found.
Nov  6 02:19:46 L4 ntpd[23035]: Deleting interface #5 wwan0, fe80::d8a3:4fff:fec9:d56e#123, interface stats: received=0, sent=0, dropped=0, active_time=2433 secs
Nov  6 02:19:46 L4 ntpd[23035]: Deleting interface #3 wwan0, 10.144.34.75#123, interface stats: received=144, sent=144, dropped=0, active_time=2433 secs
Nov  6 02:19:46 L4 ntpd[23035]: 91.189.94.4 interface 10.144.34.75 -> (none)
Nov  6 02:19:46 L4 ntpd[23035]: 212.7.1.132 interface 10.144.34.75 -> (none)
Nov  6 02:19:46 L4 ntpd[23035]: 193.40.0.5 interface 10.144.34.75 -> (none)
Nov  6 02:19:46 L4 ntpd[23035]: 5.101.116.20 interface 10.144.34.75 -> (none)
Nov  6 02:19:46 L4 ntpd[23035]: 46.22.223.220 interface 10.144.34.75 -> (none)
Nov  6 02:19:46 L4 ntpd[23035]: peers refreshed
Nov  6 02:19:48 L4 ModemManager[982]: [/dev/cdc-wdm0] Queried max control message size: 512
Nov  6 02:19:48 L4 ModemManager[982]: <info>  Creating modem with plugin 'Generic' and '3' ports
Nov  6 02:19:48 L4 ModemManager[982]: <info>  Modem for device at '/sys/devices/pci0000:00/0000:00:14.0/usb1/1-10' successfully created
Nov  6 02:19:48 L4 ModemManager[982]: [/dev/cdc-wdm0] Queried max control message size: 512
Nov  6 02:19:49 L4 ModemManager[982]: <info>  Modem: state changed (unknown -> disabled)
Nov  6 02:19:49 L4 NetworkManager[1024]: <warn> (cdc-wdm0): failed to look up interface index
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> WWAN now disabled by management service
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> (cdc-wdm0): new Broadband device (driver: 'cdc_mbim, cdc_acm' ifindex: 0)
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> (cdc-wdm0): exported as /org/freedesktop/NetworkManager/Devices/6
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> (cdc-wdm0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> (cdc-wdm0): deactivating device (reason 'managed') [2]
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> NetworkManager state is now DISCONNECTED
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> (cdc-wdm0): device state change: unavailable -> disconnected (reason 'none') [20 30 0]
Nov  6 02:19:46 L4 ntpd[23035]: Deleting interface #5 wwan0, fe80::d8a3:4fff:fec9:d56e#123, interface stats: received=0, sent=0, dropped=0, active_time=2433 secs
Nov  6 02:19:46 L4 ntpd[23035]: Deleting interface #3 wwan0, 10.144.34.75#123, interface stats: received=144, sent=144, dropped=0, active_time=2433 secs
Nov  6 02:19:46 L4 ntpd[23035]: 91.189.94.4 interface 10.144.34.75 -> (none)
Nov  6 02:19:46 L4 ntpd[23035]: 212.7.1.132 interface 10.144.34.75 -> (none)
Nov  6 02:19:46 L4 ntpd[23035]: 193.40.0.5 interface 10.144.34.75 -> (none)
Nov  6 02:19:46 L4 ntpd[23035]: 5.101.116.20 interface 10.144.34.75 -> (none)
Nov  6 02:19:46 L4 ntpd[23035]: 46.22.223.220 interface 10.144.34.75 -> (none)
Nov  6 02:19:46 L4 ntpd[23035]: peers refreshed
Nov  6 02:19:48 L4 ModemManager[982]: [/dev/cdc-wdm0] Queried max control message size: 512
Nov  6 02:19:48 L4 ModemManager[982]: <info>  Creating modem with plugin 'Generic' and '3' ports
Nov  6 02:19:48 L4 ModemManager[982]: <info>  Modem for device at '/sys/devices/pci0000:00/0000:00:14.0/usb1/1-10' successfully created
Nov  6 02:19:48 L4 ModemManager[982]: [/dev/cdc-wdm0] Queried max control message size: 512
Nov  6 02:19:49 L4 ModemManager[982]: <info>  Modem: state changed (unknown -> disabled)
Nov  6 02:19:49 L4 NetworkManager[1024]: <warn> (cdc-wdm0): failed to look up interface index
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> WWAN now disabled by management service
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> (cdc-wdm0): new Broadband device (driver: 'cdc_mbim, cdc_acm' ifindex: 0)
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> (cdc-wdm0): exported as /org/freedesktop/NetworkManager/Devices/6
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> (cdc-wdm0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> (cdc-wdm0): deactivating device (reason 'managed') [2]
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> NetworkManager state is now DISCONNECTED
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> (cdc-wdm0): device state change: unavailable -> disconnected (reason 'none') [20 30 0]



after that I can no longer reconnect:
Aug 26 16:45:03 L4 NetworkManager[965]: <info> Activation (cdc-wdm1) starting connection 'EE Elisa Any'
Aug 26 16:45:03 L4 NetworkManager[965]: <info> (cdc-wdm1): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Aug 26 16:45:03 L4 NetworkManager[965]: <info> Activation (cdc-wdm1) Stage 1 of 5 (Device Prepare) scheduled...
Aug 26 16:45:03 L4 NetworkManager[965]: <info> Activation (cdc-wdm1) Stage 1 of 5 (Device Prepare) started...
Aug 26 16:45:03 L4 NetworkManager[965]: <info> Activation (cdc-wdm1) Stage 1 of 5 (Device Prepare) complete.
Aug 26 16:45:03 L4 ModemManager[923]: <info>  Simple connect started...
Aug 26 16:45:03 L4 ModemManager[923]: <info>  Simple connect state (4/8): Wait to get fully enabled
Aug 26 16:45:03 L4 ModemManager[923]: <info>  Simple connect state (5/8): Register
Aug 26 16:45:03 L4 ModemManager[923]: <info>  Simple connect state (6/8): Bearer
Aug 26 16:45:03 L4 ModemManager[923]: <info>  Simple connect state (7/8): Connect
Aug 26 16:45:03 L4 ModemManager[923]: <info>  Modem /org/freedesktop/ModemManager1/Modem/12: state changed (registered -> connecting)
Aug 26 16:45:03 L4 NetworkManager[965]: <info> (cdc-wdm1) modem state changed, 'registered' --> 'connecting' (reason: user-requested)
Aug 26 16:45:03 L4 ModemManager[923]: <info>  Modem /org/freedesktop/ModemManager1/Modem/12: state changed (connecting -> registered)
Aug 26 16:45:03 L4 NetworkManager[965]: <info> (cdc-wdm1) modem state changed, 'connecting' --> 'registered' (reason: user-requested)
Aug 26 16:45:03 L4 NetworkManager[965]: <warn> (cdc-wdm1) failed to connect modem: Failure
Aug 26 16:45:03 L4 NetworkManager[965]: <info> (cdc-wdm1): device state change: prepare -> failed (reason 'unknown') [40 120 1]
Aug 26 16:45:03 L4 NetworkManager[965]: <info> Marking connection 'EE Elisa Any' invalid.
Aug 26 16:45:03 L4 NetworkManager[965]: <warn> Activation (cdc-wdm1) failed for connection 'EE Elisa Any'
Aug 26 16:45:03 L4 NetworkManager[965]: <info> (cdc-wdm1): device state change: failed -> disconnected (reason 'none') [120 30 0]
Aug 26 16:45:03 L4 NetworkManager[965]: <info> (cdc-wdm1): deactivating device (reason 'none') [0]
Related Question