Tuesday, May 24, 2016

networking - Ubuntu 12.04 LTS does not recognize Vodafone Mobile Broadband K3765-Z (ZTE) on USB3



A K3765-Z mobile broadband pen is working fine on other laptops/other distros (including Ubuntu 13.10), but is not being recognized on a cold boot on my new Clevo P150SM (which only has USB3 slots - the ones with a blue insert).




$ uname -a
Linux khaki 3.11.0-17-generic #31~precise1-Ubuntu SMP Tue Feb 4 21:25:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux


On a cold boot, /var/log/syslog shows:



Feb 22 02:37:29 khaki kernel: [   54.056601] usb 3-1: new high-speed USB device number 5 using xhci_hcd
Feb 22 02:37:30 khaki kernel: [ 54.492356] usb 3-1: New USB device found, idVendor=19d2, idProduct=2000
Feb 22 02:37:30 khaki kernel: [ 54.492360] usb 3-1: New USB device strings: Mfr=3, Product=2, SerialNumber=4
Feb 22 02:37:30 khaki kernel: [ 54.492362] usb 3-1: Product: Vodafone Mobile Broadband K3765-Z

Feb 22 02:37:30 khaki kernel: [ 54.492363] usb 3-1: Manufacturer: Vodafone (ZTE)
Feb 22 02:37:30 khaki kernel: [ 54.492364] usb 3-1: SerialNumber: P673A1VDF_MS
Feb 22 02:37:30 khaki mtp-probe: checking bus 3, device 5: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-1"
Feb 22 02:37:30 khaki mtp-probe: bus: 3, device: 5 was not an MTP device
Feb 22 02:37:30 khaki kernel: [ 54.512728] usb-storage 3-1:1.0: USB Mass Storage device detected
Feb 22 02:37:30 khaki kernel: [ 54.512768] scsi6 : usb-storage 3-1:1.0
Feb 22 02:37:30 khaki kernel: [ 54.512818] usbcore: registered new interface driver usb-storage
Feb 22 02:37:31 khaki kernel: [ 55.514481] scsi 6:0:0:0: CD-ROM Vodafone USB SCSI CD-ROM USB PQ: 0 ANSI: 2
Feb 22 02:37:31 khaki kernel: [ 55.526321] sr1: scsi-1 drive
Feb 22 02:37:31 khaki kernel: [ 55.526491] sr 6:0:0:0: Attached scsi CD-ROM sr1

Feb 22 02:37:31 khaki kernel: [ 55.526566] sr 6:0:0:0: Attached scsi generic sg3 type 5
Feb 22 02:37:31 khaki usb_modeswitch: switching device 19d2:2000 on 003/005


But nothing more happens. There are no /dev/ttyUSB devices setup, and network manager does not detect the pen.



If I use the pen under Windows, and do a hot-reboot to Ubuntu, it gets to the point where the network manager detects the pen (but I have still been unable to successfully establish a connection using the same parameters that I used on other laptops).



/var/log/syslog following a hot reboot shows:




...
Feb 22 02:47:50 khaki kernel: [ 1.377343] usb 3-1: new high-speed USB device number 2 using xhci_hcd
Feb 22 02:47:50 khaki kernel: [ 1.408517] usb 3-1: New USB device found, idVendor=19d2, idProduct=2002
Feb 22 02:47:50 khaki kernel: [ 1.408521] usb 3-1: New USB device strings: Mfr=4, Product=3, SerialNumber=5
Feb 22 02:47:50 khaki kernel: [ 1.408523] usb 3-1: Product: Vodafone Mobile Broadband K3765-Z
Feb 22 02:47:50 khaki kernel: [ 1.408524] usb 3-1: Manufacturer: Vodafone (ZTE)
Feb 22 02:47:50 khaki kernel: [ 1.408525] usb 3-1: SerialNumber: P673A1VDF_MS
Feb 22 02:47:50 khaki kernel: [ 1.416532] usb-storage 3-1:1.5: USB Mass Storage device detected
Feb 22 02:47:50 khaki kernel: [ 1.416614] scsi6 : usb-storage 3-1:1.5
Feb 22 02:47:50 khaki kernel: [ 1.416674] usbcore: registered new interface driver usb-storage

...
Feb 22 02:47:50 khaki kernel: [ 2.294704] usbcore: registered new interface driver usbserial
Feb 22 02:47:50 khaki kernel: [ 2.294715] usbcore: registered new interface driver usbserial_generic
Feb 22 02:47:50 khaki kernel: [ 2.294724] usbserial: USB Serial support registered for generic
Feb 22 02:47:50 khaki kernel: [ 2.295727] iwlwifi 0000:06:00.0: loaded firmware version 18.168.6.1 op_mode iwldvm
Feb 22 02:47:50 khaki kernel: [ 2.299668] usbcore: registered new interface driver cdc_wdm
Feb 22 02:47:50 khaki kernel: [ 2.300672] usbcore: registered new interface driver option
Feb 22 02:47:50 khaki kernel: [ 2.300681] usbserial: USB Serial support registered for GSM modem (1-port)
Feb 22 02:47:50 khaki kernel: [ 2.300735] option 3-1:1.0: GSM modem (1-port) converter detected
Feb 22 02:47:50 khaki kernel: [ 2.300867] usb 3-1: GSM modem (1-port) converter now attached to ttyUSB0

Feb 22 02:47:50 khaki kernel: [ 2.300909] option 3-1:1.1: GSM modem (1-port) converter detected
Feb 22 02:47:50 khaki kernel: [ 2.300953] usb 3-1: GSM modem (1-port) converter now attached to ttyUSB1
Feb 22 02:47:50 khaki kernel: [ 2.300989] option 3-1:1.2: GSM modem (1-port) converter detected
Feb 22 02:47:50 khaki kernel: [ 2.301031] usb 3-1: GSM modem (1-port) converter now attached to ttyUSB2
Feb 22 02:47:50 khaki kernel: [ 2.301067] option 3-1:1.3: GSM modem (1-port) converter detected
Feb 22 02:47:50 khaki kernel: [ 2.301113] usb 3-1: GSM modem (1-port) converter now attached to ttyUSB3
...
Feb 22 02:47:50 khaki kernel: [ 2.361761] qmi_wwan 3-1:1.4: cdc-wdm0: USB WDM device
Feb 22 02:47:50 khaki kernel: [ 2.361939] qmi_wwan 3-1:1.4 wwan0: register 'qmi_wwan' at usb-0000:00:14.0-1, WWAN/QMI device, d2:1c:65:8c:b2:21
Feb 22 02:47:50 khaki kernel: [ 2.361988] usbcore: registered new interface driver qmi_wwan

...
Feb 22 02:47:51 khaki NetworkManager[1343]: SCPlugin-Ifupdown: devices added (path: /sys/devices/pci0000:00/0000:00:14.0/usb3/3-1/3-1:1.4/net/wwan0, iface: wwan0)
Feb 22 02:47:51 khaki NetworkManager[1343]: SCPlugin-Ifupdown: device added (path: /sys/devices/pci0000:00/0000:00:14.0/usb3/3-1/3-1:1.4/net/wwan0, iface: wwan0): no ifupdown configuration found.
...
Feb 22 02:47:51 khaki NetworkManager[1343]: Loaded plugin ifupdown: (C) 2008 Canonical Ltd. To report bugs please use the NetworkManager mailing list.
Feb 22 02:47:51 khaki NetworkManager[1343]: Loaded plugin keyfile: (c) 2007 - 2010 Red Hat, Inc. To report bugs please use the NetworkManager mailing list.
Feb 22 02:47:51 khaki NetworkManager[1343]: Ifupdown: get unmanaged devices count: 0
Feb 22 02:47:51 khaki NetworkManager[1343]: SCPlugin-Ifupdown: (10521392) ... get_connections.
Feb 22 02:47:51 khaki NetworkManager[1343]: SCPlugin-Ifupdown: (10521392) ... get_connections (managed=false): return empty list.
Feb 22 02:47:51 khaki NetworkManager[1343]: keyfile: parsing Vodafone Default ...

Feb 22 02:47:51 khaki NetworkManager[1343]: keyfile: read connection 'Vodafone Default'
...
Feb 22 02:47:52 khaki modem-manager[1306]: (ttyUSB1) closing serial port...
Feb 22 02:47:52 khaki modem-manager[1306]: (ttyUSB1) serial port closed
Feb 22 02:47:52 khaki modem-manager[1306]: (ZTE): GSM modem /sys/devices/pci0000:00/0000:00:14.0/usb3/3-1 claimed port ttyUSB1
...
Feb 22 02:47:53 khaki modem-manager[1306]: (ttyUSB3) closing serial port...
Feb 22 02:47:53 khaki modem-manager[1306]: (ttyUSB3) serial port closed
Feb 22 02:47:53 khaki modem-manager[1306]: (ttyUSB3) opening serial port...
Feb 22 02:47:53 khaki modem-manager[1306]: (ZTE): GSM modem /sys/devices/pci0000:00/0000:00:14.0/usb3/3-1 claimed port ttyUSB3

Feb 22 02:47:53 khaki modem-manager[1306]: (ZTE): GSM modem /sys/devices/pci0000:00/0000:00:14.0/usb3/3-1 claimed port wwan0
...
Feb 22 02:48:23 khaki modem-manager[1306]: (ttyUSB0) closing serial port...
Feb 22 02:48:23 khaki modem-manager[1306]: (ttyUSB0) serial port closed
Feb 22 02:48:23 khaki modem-manager[1306]: (ttyUSB0) opening serial port...
Feb 22 02:48:23 khaki modem-manager[1306]: (ttyUSB2) closing serial port...
Feb 22 02:48:23 khaki modem-manager[1306]: (ttyUSB2) serial port closed
Feb 22 02:48:23 khaki modem-manager[1306]: (ttyUSB2) opening serial port...
Feb 22 02:48:26 khaki modem-manager[1306]: (ttyUSB0) closing serial port...
Feb 22 02:48:26 khaki modem-manager[1306]: (ttyUSB0) serial port closed

Feb 22 02:48:26 khaki modem-manager[1306]: (ZTE): GSM modem /sys/devices/pci0000:00/0000:00:14.0/usb3/3-1 claimed port ttyUSB0
Feb 22 02:48:29 khaki modem-manager[1306]: (ttyUSB2) closing serial port...
Feb 22 02:48:29 khaki modem-manager[1306]: (ttyUSB2) serial port closed
Feb 22 02:48:29 khaki NetworkManager[1343]: (wwan0): new GSM/UMTS device (driver: 'option1' ifindex: 3)
Feb 22 02:48:29 khaki NetworkManager[1343]: (wwan0): exported as /org/freedesktop/NetworkManager/Devices/3
Feb 22 02:48:29 khaki NetworkManager[1343]: (wwan0): now managed
Feb 22 02:48:29 khaki NetworkManager[1343]: (wwan0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Feb 22 02:48:29 khaki NetworkManager[1343]: (wwan0): bringing up device.
Feb 22 02:48:29 khaki NetworkManager[1343]: (wwan0): deactivating device (reason 'managed') [2]
Feb 22 02:48:29 khaki NetworkManager[1343]: (wwan0): device state change: unavailable -> disconnected (reason 'none') [20 30 0]

...
Feb 22 02:49:06 khaki NetworkManager[1343]: Activation (wwan0) starting connection 'Vodafone Default'
Feb 22 02:49:06 khaki NetworkManager[1343]: (wwan0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Feb 22 02:49:06 khaki NetworkManager[1343]: Activation (wwan0) Stage 1 of 5 (Device Prepare) scheduled...
Feb 22 02:49:06 khaki NetworkManager[1343]: Activation (wwan0) Stage 1 of 5 (Device Prepare) started...
Feb 22 02:49:06 khaki NetworkManager[1343]: Activation (wwan0) Stage 1 of 5 (Device Prepare) complete.
Feb 22 02:49:06 khaki modem-manager[1306]: (ttyUSB3) opening serial port...
Feb 22 02:49:06 khaki modem-manager[1306]: Modem /org/freedesktop/ModemManager/Modems/0: state changed (disabled -> enabling)
Feb 22 02:49:06 khaki modem-manager[1306]: (ttyUSB1) opening serial port...
Feb 22 02:49:06 khaki modem-manager[1306]: (ttyUSB3): using text mode for SMS

Feb 22 02:49:06 khaki modem-manager[1306]: Modem /org/freedesktop/ModemManager/Modems/0: state changed (enabling -> enabled)
Feb 22 02:49:06 khaki NetworkManager[1343]: WWAN now enabled by management service
Feb 22 02:49:06 khaki modem-manager[1306]: Modem /org/freedesktop/ModemManager/Modems/0: state changed (enabled -> registered)
Feb 22 02:49:07 khaki modem-manager[1306]: Modem /org/freedesktop/ModemManager/Modems/0: state changed (registered -> connecting)
Feb 22 02:49:07 khaki modem-manager[1306]: Modem /org/freedesktop/ModemManager/Modems/0: state changed (connecting -> connected)
Feb 22 02:49:07 khaki NetworkManager[1343]: Activation (wwan0) Stage 2 of 5 (Device Configure) scheduled...
Feb 22 02:49:07 khaki NetworkManager[1343]: Activation (wwan0) Stage 2 of 5 (Device Configure) starting...
Feb 22 02:49:07 khaki NetworkManager[1343]: (wwan0): device state change: prepare -> config (reason 'none') [40 50 0]
Feb 22 02:49:07 khaki NetworkManager[1343]: Activation (wwan0) Stage 2 of 5 (Device Configure) successful.
Feb 22 02:49:07 khaki NetworkManager[1343]: Activation (wwan0) Stage 3 of 5 (IP Configure Start) scheduled.

Feb 22 02:49:07 khaki NetworkManager[1343]: Activation (wwan0) Stage 2 of 5 (Device Configure) complete.
Feb 22 02:49:07 khaki NetworkManager[1343]: Activation (wwan0) Stage 3 of 5 (IP Configure Start) started...
Feb 22 02:49:07 khaki NetworkManager[1343]: (wwan0): device state change: config -> ip-config (reason 'none') [50 70 0]
Feb 22 02:49:07 khaki NetworkManager[1343]: starting PPP connection
Feb 22 02:49:07 khaki NetworkManager[1343]: pppd started with pid 2911
...
Feb 22 02:49:07 khaki NetworkManager[1343]: Activation (wwan0) Stage 4 of 5 (IPv6 Configure Timeout) scheduled...
Feb 22 02:49:07 khaki NetworkManager[1343]: Activation (wwan0) Stage 3 of 5 (IP Configure Start) complete.
Feb 22 02:49:07 khaki NetworkManager[1343]: Activation (wwan0) Stage 4 of 5 (IPv6 Configure Timeout) started...
Feb 22 02:49:07 khaki NetworkManager[1343]: Activation (wwan0) Stage 4 of 5 (IPv6 Configure Timeout) complete.

Feb 22 02:49:07 khaki pppd[2911]: unrecognized option 'wwan0'
Feb 22 02:49:07 khaki NetworkManager[1343]: pppd pid 2911 exited with error: pppd options error
Feb 22 02:49:07 khaki NetworkManager[1343]: Activation (wwan0) Stage 4 of 5 (IPv4 Configure Timeout) scheduled...
Feb 22 02:49:07 khaki NetworkManager[1343]: Activation (wwan0) Stage 4 of 5 (IPv4 Configure Timeout) started...
Feb 22 02:49:07 khaki NetworkManager[1343]: (wwan0): device state change: ip-config -> failed (reason 'ip-config-unavailable') [70 120 5]
Feb 22 02:49:07 khaki NetworkManager[1343]: Activation (wwan0) failed.
Feb 22 02:49:07 khaki NetworkManager[1343]: Activation (wwan0) Stage 4 of 5 (IPv4 Configure Timeout) complete.
Feb 22 02:49:07 khaki modem-manager[1306]: Modem /org/freedesktop/ModemManager/Modems/0: state changed (connected -> disconnecting)
Feb 22 02:49:07 khaki NetworkManager[1343]: (wwan0): device state change: failed -> disconnected (reason 'none') [120 30 0]
Feb 22 02:49:07 khaki NetworkManager[1343]: (wwan0): deactivating device (reason 'none') [0]

Feb 22 02:49:10 khaki NetworkManager[1343]: Auto-activating connection 'Vodafone Default'.
Feb 22 02:49:10 khaki NetworkManager[1343]: Activation (wwan0) starting connection 'Vodafone Default'
Feb 22 02:49:10 khaki NetworkManager[1343]: (wwan0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Feb 22 02:49:10 khaki NetworkManager[1343]: Activation (wwan0) Stage 1 of 5 (Device Prepare) scheduled...
Feb 22 02:49:10 khaki NetworkManager[1343]: Activation (wwan0) Stage 1 of 5 (Device Prepare) started...
Feb 22 02:49:10 khaki NetworkManager[1343]: Activation (wwan0) Stage 1 of 5 (Device Prepare) complete.
Feb 22 02:49:11 khaki modem-manager[1306]: Modem /org/freedesktop/ModemManager/Modems/0: state changed (disconnecting -> registered)
Feb 22 02:49:31 khaki NetworkManager[1343]: GSM connection failed: (32) Serial command timed out
...



Any ideas on how to get the pen working ? (Without booting into windows 1st :-)



Update:
Regarding the suggestion of adding file /etc/udev/rules.d/90-zte.rules with:



SUBSYSTEM=="block",SUBSYSTEM=="scsi",ATTRS{model}=="USB Storage FFE9",ACTION=="add",RUN+="/sbin/modprobe usbserial vendor=0x19d2 product=0x2000"


and then performing (after pen insertion)




# modprobe usbserial vendor=0x19d2 product=0x2000


/var/log/syslog shows:



Feb 22 12:24:35 khaki kernel: [  361.013336] usbcore: registered new interface driver usbserial
Feb 22 12:24:35 khaki kernel: [ 361.013367] usbcore: registered new interface driver usbserial_generic
Feb 22 12:24:35 khaki kernel: [ 361.013398] usbserial: USB Serial support registered for generic
Feb 22 12:24:35 khaki kernel: [ 361.013421] usbserial_generic 3-1:1.0: The "generic" usb-serial driver is only for testing and one-off prototypes.

Feb 22 12:24:35 khaki kernel: [ 361.013425] usbserial_generic 3-1:1.0: Tell linux-usb@vger.kernel.org to add your device to a proper driver.
Feb 22 12:24:35 khaki kernel: [ 361.013429] usbserial_generic 3-1:1.0: generic converter detected
Feb 22 12:24:35 khaki kernel: [ 361.013612] usb 3-1: generic converter now attached to ttyUSB0
Feb 22 12:24:35 khaki modem-manager[1210]: (ttyUSB0) opening serial port...
Feb 22 12:25:07 khaki modem-manager[1210]: (ttyUSB0) closing serial port...
Feb 22 12:25:37 khaki modem-manager[1210]: (ttyUSB0) serial port closed
Feb 22 12:25:37 khaki modem-manager[1210]: (ttyUSB0) opening serial port...
Feb 22 12:25:43 khaki modem-manager[1210]: (ttyUSB0) closing serial port...



and no usable /dev/ttyUSB0 device remains.



Update: Maybe this is a sort-of-duplicate of Ubuntu 12.04 - USB3 issue with mobile broadband usb sticks
Once I get the time to investigate, I will post more details.



In case it helps someone that searchs for a similar problem, here is what I did:



1 - solution to the problem of not seeing /dev/ttyUSBn when the pen is connected on USB3



Create a file




$ sudo gedit /etc/modprobe.d/usb-storage.conf


and add to that file:



# Increase the default delay to avoid conflict with usb_modeswitch
options usb-storage delay_use=4



Save the file. Unplug and plug the pen (no reboots or restarts needed), and after a few seconds, the /dev/ttyUSBn devices will be setup, and the device will properly be recognized by NetworkManager.



2 - solution to the problem of NetworkManager failing to connect while reporting on syslog "pppd[2911]: unrecognized option 'wwan0'"



Well, the nearest thing I've found to this problem was
https://answers.launchpad.net/ubuntu/+source/gnome-nettool/+question/226355
and
https://bugzilla.redhat.com/show_bug.cgi?id=835153



I adapted the workaround mentioned in the latest to:




$ sudo gedit /etc/modprobe.d/blacklist.conf


and appended the line



# NetworkManager not running pppd through my ZTE K3765-Z properly
blacklist qmi_wwan



Then rebooted, and it all worked fine.
NetworkManager dialed-out and established internet connection.



PS: I have tryed with success Prasad's suggestion of using wvdial as a workaround.
My /etc/wvdial.conf (for Vodafone Portugal) is:



[Dialer Defaults]
;Init1 = AT+CPIN="NNNN"
Init3 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

Init4 = AT+CGDCONT=1,"IP","net2.vodafone.pt"
Modem Type = Analog Modem
Phone = *99#
ISDN = 0
Username = MYMSISDN
Password = MYMSISDN
Modem = /dev/ttyUSB3
Baud = 115200
Stupid Mode = 1
Dial Attempts = 0



You will need to replace "NNNN" with your PIN and "MYMSISDN" with your SIM card phone number, and "net2.vodafone.pt" with your provider's APN.
Uncomment Init1 only for the 1st run (if NetworkManager is not running, of it did not already done it of you).



(I still prefere NetworkManager to wvdial, because when using wvdail I cannot use NetworkManager to start a PPTP VPN)


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...