Rabu, 28 Oktober 2009

openSUSE 11.2 RC1: ZTE HSDPA/3G Modem

http://farm4.static.flickr.com/3250/2986484259_c3a66f72ea.jpg


I’ve been using this HSDPA USB modem since it was openSUSE 11.1 (and it’s tested also on openSUSE 11.2 Milestone 8), no other easy way except through wvdial. Hopefully it will be easier using KnetworkManager-KDE4 on openSUSE 11.2 in final release stage. [updated: October 28] It is now OK to use KNetworkManager as mobile Internet connection manager (i did not know when this feature’s announced for the first time tough).

It’s said here nicely how to use it on openSUSE 11.1, now I’m just taking a little workaround on openSUSE 11.2 RC1.

Here are the steps to make an Internet connection with this ZTE MF626 Mobile USB modem on openSUSE 11.2 RC1:

Plug it to your USB interface

Just to make sure that it is detected well by the kernel (tail -f /var/log/messages, see my complete log here):

[   94.324031] usb 1-3: new high speed USB device using ehci_hcd and address 3
[   94.450274] usb 1-3: New USB device found, idVendor=19d2, idProduct=2000
[   94.450286] usb 1-3: New USB device strings: Mfr=2, Product=1, \
SerialNumber=0
[   94.450296] usb 1-3: Product: ZTE CDMA Technologies MSM
[   94.450303] usb 1-3: Manufacturer: ZTE,Incorporated
[   94.450454] usb 1-3: configuration #1 chosen from 1 choice
[   94.452491] scsi2 : SCSI emulation for USB Mass Storage devices
[   94.474102] usb-storage: device found at 3
[   94.474106] usb-storage: waiting for device to settle before scanning
[   95.477571] scsi 2:0:0:0: CD-ROM  ZTE  USB SCSI CD-ROM  2.31 PQ: 0 ANSI: 2
[   95.498640] sr1: scsi-1 drive
[   95.499839] sr 2:0:0:0: Attached scsi CD-ROM sr1
[   95.500442] sr 2:0:0:0: Attached scsi generic sg2 type 5
[   95.501517] usb-storage: device scan complete

It’s detected as an optical device (bolt), not a HSDPA modem. Here’s other properties of the device (through lsusb command):

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 19d2:2000 ONDA Communication S.p.A.
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 058f:9254 Alcor Micro Corp. Hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Then we can see KDE 4 Device Notifier tells us a new device is coming:

From openSUSE


Change It to Be a Modem Seen by The Kernel

Because openSUSE (its kernel) does not recognize well[*] that it is a modem, so we have to let the kernel knows it. The usual way is to convert it to be a serial device interface through usb_modeswitch command.

Before we proceed, we have to make sure that we have the proper configuration: usb_modeswitch.conf (copy the file to /etc ).

[*] The kernel should handle it without problem (grep MF626 /usr/src/linux-2.6.31.3-1/drivers/usb/serial/option.c):

#define ZTE_PRODUCT_MF626                       0x0031
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF626, \
0xff, 0xff, 0xff) },

Looks like it is a bug(?).

Then run usb_modeswitch on CLI by using user root (the usb_modswitch package is already installed, at least I’ve seen it since openSUSE 11.1). You can see the output below.

* usb_modeswitch: tool for controlling "flip flop" mode USB devices
* Version 0.9.6 (C) Josua Dietze 2009
* Works with libusb 0.1.12 and probably other versions
Looking for target devices
No target device found
Looking for default devices
Found default devices (1)
Prepare switching, accessing latest device
Looking for active default driver to detach it
OK, driver found ("dummy")
OK, Driver "dummy" successfully detached
Setting up communication with device
Trying to send the message
OK, message successfully sent.
-> See /proc/bus/usb/devices (or call lsusb) for changes. Bye

And it’s detected as an modem (through lsusb: bolt), not an optical device anymore:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 19d2:0031 ONDA Communication S.p.A.
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 058f:9254 Alcor Micro Corp. Hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Here’s my quoted log (end here’s the understandable/complete one):

[  316.366571] usb 1-3: USB disconnect, address 3
[  321.347125] usb 1-3: new high speed USB device using ehci_hcd and address 4
[  321.473268] usb 1-3: New USB device found, idVendor=19d2, idProduct=0031
[  321.473294] usb 1-3: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[  321.473313] usb 1-3: Product: ZTE CDMA Technologies MSM
[  321.473327] usb 1-3: Manufacturer: ZTE,Incorporated
[  321.473564] usb 1-3: configuration #1 chosen from 1 choice
[  321.490892] scsi3 : SCSI emulation for USB Mass Storage devices
[  321.496939] usb-storage: device found at 4
[  321.496943] usb-storage: waiting for device to settle before scanning
[  321.504619] usbcore: registered new interface driver usbserial
[  321.504654] USB Serial support registered for generic
[  321.504717] usbcore: registered new interface driver usbserial_generic
[  321.504727] usbserial: USB Serial Driver core
[  321.509814] USB Serial support registered for GSM modem (1-port)
[  321.509898] option 1-3:1.0: GSM modem (1-port) converter detected
[  321.510389] usb 1-3: GSM modem (1-port) converter now attached to ttyUSB0
[  321.510431] option 1-3:1.1: GSM modem (1-port) converter detected
[  321.510516] usb 1-3: GSM modem (1-port) converter now attached to ttyUSB1
[  321.510556] option 1-3:1.3: GSM modem (1-port) converter detected
[  321.510672] usb 1-3: GSM modem (1-port) converter now attached to ttyUSB2
[  321.510706] usbcore: registered new interface driver option
[  321.510716] option: v0.7.2:USB Driver for GSM modems
modem-manager: (ttyUSB0) opening serial device...
modem-manager: (ttyUSB0): probe requested by plugin 'ZTE'
[  322.499620] scsi 3:0:0:0: Direct-Access  ZTE   MMC Storage   2.31 PQ: 0 ANSI: 2
[  322.500050] sd 3:0:0:0: Attached scsi generic sg2 type 0
[  322.504673] usb-storage: device scan complete
[  322.510917] sd 3:0:0:0: [sdb] Attached SCSI removable disk
(ttyUSB2) opening serial device...
(ttyUSB2): probe requested by plugin 'ZTE'
(ttyUSB1) opening serial device...
(ttyUSB1): probe requested by plugin 'ZTE'
Got failure code 100: Unknown error
Got failure code 100: Unknown error
(ttyUSB2) closing serial device...
(ZTE): GSM modem /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-3 claimed port ttyUSB2
Added modem /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-3
signal "completed" (from "Completed") exported but not found in object class "MMModemZte"
Exported modem /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-3 as /org/freedesktop/ModemManager/Modems/0
(ttyUSB1) closing serial device...
(ZTE): GSM modem /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-3 claimed port ttyUSB1
(ttyUSB0) closing serial device...

and the NetworkManager’s log says it found the modem, although nm-tool says some strange issues(?). Fortunately, the good news is KNetworkManager knows it’s a modem exists on the system:

From openSUSE

It will be a lot easier to setup it through KNetworkManager, even it failed (i’ll tell you further on next post).

Dial it up!

[updated: October 28] The easiest way (GUI) to do this is by using KNetworkManager, as i told earlier (first paragraph) on this post.

Because KnetworkManager-kde4 could not brings the connection properly, so i choose wvdial instead (here’s the example configuration file, APN=indosatm2). Remember that this file will be different with your needs (depends on what ISP, APN, username and password used, and other stuffs). The safety way is to use wvdialconf tool.

Make sure that the line has:

Modem = /dev/ttyUSB2

My wvdial’s log:

--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2
ATQ0 V1 E1 S0=0 &C1 &D2
OK
--> Sending: AT+CGDCONT=1,"IP","indosatm2"
AT+CGDCONT=1,"IP","indosatm2"
OK
--> Modem initialized.
--> Idle Seconds = 300, disabling automatic reconnect.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Mon Oct 19 09:58:43 2009
--> Pid of pppd: 5174
--> Using interface ppp0
--> pppd: (�[06][08]
--> pppd: (�[06][08]
--> pppd: (�[06][08]
--> pppd: (�[06][08]
--> pppd: (�[06][08]
--> local  IP address 114.58.125.84
--> pppd: (�[06][08]
--> remote IP address 10.64.64.64
--> pppd: (�[06][08]
--> primary   DNS address 202.155.0.10
--> pppd: (�[06][08]
--> secondary DNS address 202.155.0.15
--> pppd: (�[06][08]
--> Script /etc/ppp/ip-up run successful
--> Default route Ok.
--> Nameserver (DNS) Ok.
--> Connected... Press Ctrl-C to disconnect
--> pppd: (�[06][08]

And finally, use name server IP’s provided from the log to be used by /etc/resolve.conf file. Mine is:

search ns3.indosat.net.id
nameserver 202.155.0.10
nameserver 202.155.0.15

then?

http://andi.opensuse-id.org/2009/10/19/opensuse-11-2-rc1-zte-hsdpa3g-modem/

Tidak ada komentar:

Posting Komentar