Page 1 of 1

GPRS on linux connect to GPRS from your GSM mobile phones in linux Rate Topic: -----

#1 devangnegandhi  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 40
  • Joined: 23-January 06

Posted 14 September 2007 - 04:55 AM

METHOD FOR ENABLING A NET CONNECTION USING GPRS CONNECTION ON LINUX ( MAINLY FEDORA)


PREREQUISITES
-> u shud have a USB cable to connect ur phone to the laptop/system
-> u shud know the product ID(PID) and the vendor ID(VID) of ur phone ,
(for newbies ,as was the case with me ,a good method to do this is to check it out in some other OS like windows).
-> check whether ur phone shows the USB connected symbol on connecting.....


FIRST STEP:
run the command :wvdialconf create , on the terminal , it will show the output as following,

[root@localhost ~]# wvdialconf create
Scanning your serial ports for a modem.

Port Scan<*1>: S0 S1 S2 S3
WvModem<*1>: Cannot get information for serial port.
ttyACM0<*1>: ATQ0 V1 E1 -- OK
ttyACM0<*1>: ATQ0 V1 E1 Z -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyACM0<*1>: Modem Identifier: ATI -- Nokia
ttyACM0<*1>: Speed 4800: AT -- OK
ttyACM0<*1>: Speed 9600: AT -- OK
ttyACM0<*1>: Speed 19200: AT -- OK
ttyACM0<*1>: Speed 38400: AT -- OK
ttyACM0<*1>: Speed 57600: AT -- OK
ttyACM0<*1>: Speed 115200: AT -- OK
ttyACM0<*1>: Speed 230400: AT -- OK
ttyACM0<*1>: Speed 460800: AT -- OK
ttyACM0<*1>: Max speed is 460800; that should be safe.
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK

Found an USB modem on /dev/ttyACM0.
Modem configuration written to create.
ttyACM0<Info>: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
//COPY THE INIT SCRIPT FOR FUTURE USE
now this shows that i have a modem connected on the port /dev/ttyACM0
now use this and substitute in the script in second step , ..........


SECOND STEP:
PASTE THE BELOW SCRIPT IN THE FILE etc/wvdial.conf ( delete any earlier existing scripts)and .........

[Dialer Defaults]
Modem = <the modem port recognised on running the command: wvdialconf create , on the terminal>
Baud = 230400
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
//THIS IS GOT FROM STEP 1
ISDN = 0
Modem Type = Analog Modem
Phone = *99***1#
//THIS WAS THE NUMBER FOR CONNECTING TO MY GPRS..... CHECK WITH YOUR OPERATOR WHAT YOUR NUMBER IS
Username = user
Password = user
//THIS IS USUALLY THE CASE FOR MOST GPRS CONNECTIONS WHICH DO NOT NEED A USERNAME AND PASSWORD.
Stupid Mode = 1


THIRD STEP:
open terminal with root permissions and run the command : wvdial.

the output for a successfull connection shud be as follows :


[root@localhost ~]# wvdial
--> WvDial: Internet dialer version 1.54.0
--> Warning: section [Dialer bg] does not exist in wvdial.conf.
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
~[7f]}#@!}!} } }2}#}$@#}!}$}%\}"}&} }*} } g}%~
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Mon May 21 09:44:10 2007
--> pid of pppd: 3748
--> Using interface ppp0
--> pppd: Modem
--> pppd: Modem
--> pppd: Modem
--> local IP address 10.154.32.5
--> pppd: Modem
--> remote IP address 10.6.6.6
--> pppd: Modem
--> primary DNS address 202.56.250.5
--> pppd: Modem
--> secondary DNS address 202.56.250.6
--> pppd: Modem



now u shud be able to connect with 75 % certainity, and i think u can get help for the remaining 25 % from some of the forums........

ALTERNATE METHOD:
If you think all this is too confusing, then I have a better way to do it without using the terminal itself...... I have tested this only in Fedora 6 and 7 so I don't guarantee it working in other distribution..... just follow the following steps

- First open up System->Administration->Network on your system
- Then click on Hardware and add New
- In The Hardware Type choose Modem and click Next
- In Modem Device type /dev/ttyACM0
- Choose Baud Rate as 460800
- Choose flow Of Control as Hardware(CRTSCTS) and click OK
- Then go to Device and click on new here too
- Choose Modem Connection from the list and click Forward
- Type in Phone No as *99# (Check with your network operator for what your number is)
- Give any suitable name in the Providers Name
- Give both Username and Password as "user" even if you think it is not needed
- Once the Device is included in the list Select it and click on Edit
- In the Modem Initialization String enter The Init String from step 1 above


THATS IT!! now click on your connection from the Device list and Activate and you are done.....


NOTE:
THE CONFIGURATION I USED WAS

laptop: Dell Inspiron 6400
Linux Distribution: Fedora Core 6 and Fedora 7
phone: NOKIA N70

Is This A Good Question/Topic? 0
  • +

Page 1 of 1