Sabtu, 03 Oktober 2009

OpenSUSE: Setting Motorola W362 as a Modem

Motorola W362 is a phone that can be used as a modem. This phone uses CDMA technology in the 800MHz frequency. You can see the detail specifications of this phone in the Motorola site.

In this paper, I will explain some steps to set the phone so that the W362 can be used as a modem. At this writing, I'm using OpenSUSE 11.1. Simply, let us begin our experiment ..

In Motorola W362

To be able to use the modem feature on this phone, we need to regulate access to the phone as a USB modem to access memory not Card. The following steps are performed on Mototola W362 phone. Here are the steps:

1. Going to the Settings menu> Connection> USB Settings
2. In the Default Connection option, select Data Connection
3. Done. Now we live to do the configuration on our computers.

In Computer

After the configuration of the phone, now we continue on the configuration of the computer. The core of this process is to introduce this W362 phone as a USB modem. Here are the steps:

1. Connect the W362 mobile phone with a computer using the included USB cable
2. Open Terminal in the Application Browser. This terminal is located in the Group System.
3. In Terminal, type the following command:
view source
print?
1.lsusb

This command allows you to display a list of connected USB devices in our computers. Here are the results:
view source
print?
1.Bus 005 Device 001: ID 1d6b: 0002 Linux Foundation 2.0 root hub
2.Bus 004 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hub
3.Bus 003 Device 004: ID 22b8: 2cf2 Motorola PCS
4.Bus 003 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hub
5.Bus 002 Device 003: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader
6.Bus 002 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hub
7.Bus 001 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hub

The above list is a list of USB in my computer. The contents of this list may be different to that shown on your computer. In the third row we get what we want to device configuration, namely Motorola PCS 22b8 vendor number and product number 2cf2.
Furthermore, still in Terminal, type the following command:
view source
print?
1.sudo modprobe usbserial vendor = 0x22b8 product = 0x2cf2

Command on the intention to add modules into the kernel usbserial with vendor numbers and product numbers that we get from the previous command. If you find a response like below:
view source
print?
1.bash: modprobe: command not found

modprobe is not in the execution PATH. To find a location where modprobe, we can use the following command:
view source
print?
1.whereis modprobe

This command will show the location where the modprobe. The following more or less the result:
view source
print?
1.modprobe: / sbin / modprobe / etc / modprobe.conf / etc / modprobe.d / usr/share/man/man8/modprobe.8.gz

From the results it can be concluded that modprobe is located in the directory / sbin. So to execute modprobe program, we use the following command:
view source
print?
1.sudo / sbin / modprobe usbserial vendor = 0x22b8 product = 0x2cf2
4. Furthermore, to check whether the phone has been successfully recognized by the kernel, we use the command dmesg. Type in the terminal as follows:
view source
print?
1.sudo dmesg

The results showed that the phone successfully identified are as follows:
view source
print?
1 ....
2.usb 3-1: new full speed USB device using uhci_hcd and address 4
3.usb 3-1: configuration # 1 chosen from 1 choice
4.usb 3-1: New USB device found, idVendor = 22b8, idProduct = 2cf2
5.usb 3-1: New USB device strings: Mfr = 1, Product = 2, SerialNumber = 0
6.usb 3-1: Product: Motorola W362
7.usb 3-1: Manufacturer: Motorola, Incorporated
8 ....
5. If you are confused to find the device because dmesg messages are too much, you can directly use the following ways to detect it. We will use wvdial to dial-up ISP. In OpenSUSE 11.1, the program is usually already installed wvdial. First of all we will do the initial configuration for wvdial.Pada Terminal, type the following command:
view source
print?
1.sudo wvdialconf / etc / wvdial.conf

Wvdialconf command will detect the existing modem and write configuration in / etc / wvdial.conf. Here are the responses given:
view source
print?
01.Modem Port Scan <* 1>: S0 S1 S2 S3 S4 S5 S6 S7
02.WvModem <* 1>: Can not get information for serial port.
03.ttyUSB0 <* 1>: ATQ0 V1 E1 - OK
04.ttyUSB0 <* 1>: ATQ0 V1 E1 Z - OK
05.ttyUSB0 <* 1>: ATQ0 V1 E1 S0 = 0 - OK
06.ttyUSB0 <* 1>: ATQ0 V1 E1 S0 = 0 & C1 - OK
07.ttyUSB0 <* 1>: ATQ0 V1 E1 S0 = 0 & C1 & D2 - OK
08.ttyUSB0 <* 1>: ATQ0 V1 E1 S0 = 0 & C1 & D2 + FCLASS = 0 - OK
09.ttyUSB0 <* 1>: Modem Identifier: ATI - Manufacturer: QUALCOMM Incorporated
10.ttyUSB0 <* 1>: Speed 9600: AT - OK
11.ttyUSB0 <* 1>: Max speed is 9600; that should be safe.
12.ttyUSB0 <* 1>: ATQ0 V1 E1 S0 = 0 & C1 & D2 + FCLASS = 0 - OK
13.WvModem <* 1>: Can not get information for serial port.
14.ttyUSB1 <* 1>: ATQ0 V1 E1 - failed with 2400 baud, next try: 9600 baud
15.ttyUSB1 <* 1>: ATQ0 V1 E1 - failed with 9600 baud, next try: 9600 baud
16.ttyUSB1 <* 1>: ATQ0 V1 E1 - and failed too at 115200, giving up.
17.ttyUSB0: Speed 9600; init "ATQ0 V1 E1 S0 = 0 & C1 & D2 + FCLASS = 0"

From the response above the bold, we know that the W362 mobile phone was detected as a modem.
6. The next step is to enter our ISP details into wvdial.conf configuration file. At the terminal, we type the following command:
view source
print?
1.sudo gedit / etc / wvdial.conf

In the above command, we use gedit to open and modify the file wvdial.conf.
7. In gedit, add detail in accordance with the ISP that we use. In this case, I use Mobi, following more or less the content of my wvdial.conf:
view source
print?
01. [Dialer Defaults]
02.Init1 = ATZ
03.Init2 = ATQ0 V1 E1 S0 = 0 & C1 & D2 + FCLASS = 0
04. 'Dial Command = ATDT
05. 'Ask Password = 0
06.Modem Type = Analog Modem
07.Stupid Mode = yes
08.Baud = 9600
09.New PPPD = yes
10. ' Idle Seconds = 300
11.Modem = / dev/ttyUSB0
12. 'CompuServe = 0
13.ISDN = 0
14.Phone = # 777
15.Username = m8
16.Password = m8

The third bold line is the detail that I add the ISP. Keep the file.
8. Next, we will add the IP address of our ISP's DNS in the resolv.conf file. This file is located in the directory / etc. In Terminal, type the following:
view source
print?
1.sudo gedit / etc / resolv.conf

Furthermore, in gedit, we add the IP address from our ISP's DNS.
If we do not know, we can use a variety of ways to get it. One easy way is to use other operating systems like Windows. In Windows, use the same ISP (in my case using the Mobi) to do dial-up. Once successfully connected, the Windows Command Prompt type the command:
view source
print?
1.ifconfig / all

Then, find the address on the ppp control. Record the address. For more information how to get DNS addresses can be seen in the reference section at the end of this paper. Here's a sample resolv.conf file:
view source
print?
1.nameserver 10.88.77.6

Number is the address 10.88.77.6 DNS Mobi.
9. Finally we come to the step waiting for: to dial-up. In Terminal, type the following command:
view source
print?
1.sudo wvdial

Here is the response generated on my computer:
view source
print?
01 .--> WvDial: Internet dialer version 1.60
02 .--> Can not get information for serial port.
03 .--> Initializing modem.
04 .--> Sending: ATZ
05.ATZ
06.OK
07 .--> Sending: ATQ0 V1 E1 S0 = 0 & C1 & D2 + FCLASS = 0
08.ATQ0 V1 E1 S0 = 0 & C1 & D2 + FCLASS = 0
09.OK
10 .--> Modem initialized.
11 .--> Sending: ATDT # 777
12 .--> Waiting for carrier.
13.ATDT # 777
14.CONNECT
15 .--> Carrier detected. Starting PPP immediately.
16 .--> Starting pppd at Sun Oct 1 18:07:42 2009
17 .--> Pid of pppd: 4324
18 .--> Using interface ppp0
19 .--> pppd: [7f] [0b] 8 [06] [08] ([06] [08]
20 .--> pppd: [7f] [0b] 8 [06] [08] ([06] [08]
21 .--> pppd: [7f] [0b] 8 [06] [08] ([06] [08]
22 .--> pppd: [7f] [0b] 8 [06] [08] ([06] [08]
23 .--> local IP address xxx.xxx.xxx.xxx
24 .--> pppd: [7f] [0b] 8 [06] [08] ([06] [08]
25 .--> remote IP address xxx.xxx.xxx.xxx
26 .--> pppd: [7f] [0b] 8 [06] [08] ([06] [08]
27 .--> primary DNS address 10.88.77.6
28 .--> pppd: [7f] [0b] 8 [06] [08] ([06] [08]
29 .--> secondary DNS address 202.147.192.4
30 .--> pppd: [7f] [0b] 8 [06] [08] ([06] [08]
31 .--> Script / etc / ppp / ip-up run successful
32 .--> Default route Ok.
33 .--> Nameserver (DNS) Ok.
34 .--> Connected ... Press Ctrl-C to disconnect
35 .--> pppd: [7f] [0b] 8 [06] [08] ([06] [08]

Bold lines indicate that we have successfully connected to the Internet.
10. Next to check, we can use the ifconfig or ping to one is an example situs.Berikut checking with ifconfig:
view source
print?
1.sudo / sbin / ifconfig

Produces the following response:
view source
print?
01 ....
02.ppp0 Link encap: Point-to-Point Protocol
03. inet addr: xxx.xxx.xxx.xxx PtP: 10.21.9.13 Mask: 255,255,255,255
04. Pointopoint NOARP UP RUNNING MULTICAST MTU: 1500 Metric: 1
05. RX packets: 6549 errors: 1 dropped: 0 overruns: 0 frame: 0
06. TX packets: 7319 errors: 0 dropped: 0 overruns: 0 carrier: 0
07. collisions: 0 txqueuelen: 3
08. RX bytes: 2183882 (2.0 Mb) TX bytes: 836283 (816.6 Kb)
09 ....

Bold lines indicate that we've got computers IP from ISP (sorry, censored its IP address). Next, we try to check by using the ping to google.com.
view source
print?
1.ping google.com

If we get a response like the following:
view source
print?
1.PING google.com (74,125,127,100) 56 (84) bytes of data.
2.64 bytes from pz-in-f100.google.com (74,125,127,100): icmp_seq = 1 ttl = 50 time = 499 ms
3.64 bytes from pz-in-f100.google.com (74,125,127,100): icmp_seq = 2 ttl = 50 time = 496 ms
4.64 bytes from pz-in-f100.google.com (74,125,127,100): icmp_seq = 3 ttl = 50 time = 472 ms
5 ....

means we have successfully connected to the Internet. Hooray!

Tidak ada komentar:

Poskan Komentar