Custom Search

Sunday, October 4, 2009

howto Airtel Aircel Idea Bsnl MTS Vodafone reliance tata GPRS on Linux via Bluetooth modem

HOWTO Airtel Aircel Idea Bsnl MTS Vodafone reliance tata GPRS on Linux via Bluetooth USB modem

---------------------------------------------Step-1

hcitool ---> is used to configure Bluetooth connections and send some special command to Bluetooth devices.

# hcitool scan --> Scan for remote devices and return MAC address and name of remote device (your phone).

1)

root@priyar:~# hcitool scan

Scanning ...

00:0E:6D:68:0F:F7 Nokia 6600

---------------------------------------------Step-2

Determine the channel used for dial up networking using the MAC address "00:0E:6D:68:0F:F7".

sdptool ---> it provides the interface for performing SDP queries on Bluetooth devices, and administering a local sdpd.

# sdptool browse 00:0E:6D:68:0F:F7 ---> Browse all available services on the device specified by a Bluetooth address as a parameter.

2)

root@priyar:~# sdptool browse 00:0E:6D:68:0F:F7

Browsing 00:0E:6D:68:0F:F7 ...

Service Name: Bluetooth Serial Port

Service Description: Bluetooth Serial Port

Service Provider: Symbian Ltd.

Service RecHandle: 0x10002

Service Class ID List:

"Serial Port" (0x1101)

Protocol Descriptor List:

"L2CAP" (0x0100)

"RFCOMM" (0x0003)

Channel: 2

Language Base Attr List:

code_ISO639: 0x656e

encoding: 0x6a

base_offset: 0x100


Service Name: OBEX File Transfer

Service RecHandle: 0x10003

Service Class ID List:

"OBEX File Transfer" (0x1106)

Protocol Descriptor List:

"L2CAP" (0x0100)

"RFCOMM" (0x0003)

Channel: 10

"OBEX" (0x0008)

Language Base Attr List:

code_ISO639: 0x656e

encoding: 0x6a

base_offset: 0x100

Profile Descriptor List:

"OBEX File Transfer" (0x1106)

Version: 0x0100


Service Name: OBEX Object Push

Service RecHandle: 0x10004

Service Class ID List:

"OBEX Object Push" (0x1105)

Protocol Descriptor List:

"L2CAP" (0x0100)

"RFCOMM" (0x0003)

Channel: 9

"OBEX" (0x0008)

Language Base Attr List:

code_ISO639: 0x656e

encoding: 0x6a

base_offset: 0x100

Profile Descriptor List:

"OBEX Object Push" (0x1105)

Version: 0x0100


Service Name: Handsfree Audio Gateway

Service RecHandle: 0x10005

Service Class ID List:

"Handsfree Audio Gateway" (0x111f)

"Generic Audio" (0x1203)

Protocol Descriptor List:

"L2CAP" (0x0100)

"RFCOMM" (0x0003)

Channel: 3

Language Base Attr List:

code_ISO639: 0x656e

encoding: 0x6a

base_offset: 0x100

Profile Descriptor List:

"Handsfree" (0x111e)

Version: 0x0101


Service Name: Fax

Service RecHandle: 0x10006

Service Class ID List:

"Fax" (0x1111)

"Generic Telephony" (0x1204)

Protocol Descriptor List:

"L2CAP" (0x0100)

"RFCOMM" (0x0003)

Channel: 1

Language Base Attr List:

code_ISO639: 0x656e

encoding: 0x6a

base_offset: 0x100

Profile Descriptor List:

"Fax" (0x1111)

Version: 0x0100


Service Name: Dial-up Networking

Service RecHandle: 0x10007

Service Class ID List:

"Dialup Networking" (0x1103)

"Generic Networking" (0x1201)

Protocol Descriptor List:

"L2CAP" (0x0100)

"RFCOMM" (0x0003)

Channel: 1 <---------------------This channel will be used to configure the bluetooth connection.

Language Base Attr List:

code_ISO639: 0x656e

encoding: 0x6a

base_offset: 0x100

Profile Descriptor List:

"Dialup Networking" (0x1103)

Version: 0x0100

---------------------------------------------Step-3

3)

root@priyar:~# vim /etc/bluetooth/rfcomm.conf

#

# RFCOMM configuration file.

#

rfcomm0 {

# Automatically bind the device at startup

bind yes;

# Bluetooth address of the device

device 00:0E:6D:68:0F:F7; <-------------- MAC address of your phone.

# RFCOMM channel for the connection

channel 1; <-------- Channel used for Dial-up Networking.

# Description of the connection

comment "SAJU Bluetooth Dialup Connection";

}

---------------------------------------------Step-4

Restart bluetooth services

4)

root@priyar:~# /etc/init.d/bluetooth restart

Restarting bluetooth: hcid.

---------------------------------------------Step-5

5)

root@priyar:~# vim /etc/wvdial.conf

[Dialer Defaults]

Modem = /dev/rfcomm0

Init = ATZ

Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

Init3 = AT+CGDCONT=1,"IP","aircelgprs","",0,0 <----Type correct string ( Eg:"aircelgprs" ).

Baud=115200

Modem Type = Bluetooth Modem

Username =''

Password =''

Phone = *99***1#

Stupid Mode = 1

---------------------------------------------Step-6

6)

root@priyar:~# wvdial

--> WvDial: Internet dialer version 1.60

--> Cannot get information for serial port.

--> Initializing modem.

--> Sending: ATZ

OK

--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

OK

--> Sending: AT+CGDCONT=1,"IP","aircelgprs","",0,0

AT+CGDCONT=1,"IP","aircelgprs","",0,0

OK

--> Modem initialized.

--> Sending: ATDT*99***1#

--> Waiting for carrier.

ATDT*99***1#

CONNECT

~[7f]}#@!}!} } }2}#}$@#}!}$}%\}"}&} }*} } g}%~

--> Carrier detected. Starting PPP immediately.

--> Starting pppd at Sat Oct 3 23:57:23 2009

--> Pid of pppd: 3571

--> Using interface ppp0

--> local IP address 10.189.207.99

--> remote IP address 10.6.6.6

--> primary DNS address 192.168.35.199

--> secondary DNS address 192.168.35.200

Note : local IP, remote IP, Primary DNS, Secondary DNS address

When you run this command your mobile should ask you for the Passcode for ComputerName enter the passcode into your phone and now your computer will prompt you to verify your passcode.

---------------------------------------------Step-7

root@priyar:~# ping www.google.com

PING www.l.google.com (209.85.231.104) 56(84) bytes of data.

64 bytes from 209.85.231.104: icmp_seq=6 ttl=52 time=1324 ms

64 bytes from 209.85.231.104: icmp_seq=7 ttl=52 time=1044 ms


OK THANKS

************************************************** FINISHED

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

************************************************** TIPS and TRICKS

---------------------------------------------Tip-1

If wvdial show something like:

--> The PPP daemon has died: A modem hung up the phone (exit code = 16)

--> man pppd explains pppd error codes in more detail.

--> Try again and look into /var/log/messages and the wvdial and pppd man pages for more information.

--> Auto Reconnect will be attempted in 10 seconds

--> Cannot open /dev/rfcomm0: Input/output error

--> Cannot get information for serial port.


Then your APN, username, or password are wrong.

Run "tail /var/log/messages" and redial.


If it's the APN, you can see something like:

Oct 3 19:29:56 priyar pppd[3716]: pppd 2.4.4 started by root, uid 0

Oct 3 19:29:56 priyar pppd[3716]: Using interface ppp0

Oct 3 19:29:56 priyar pppd[3716]: Connect: ppp0 <--> /dev/rfcomm0

Oct 3 19:29:59 priyar pppd[3716]: PAP authentication succeeded

Oct 3 19:30:00 priyar pppd[3716]: LCP terminated by peer

Oct 3 19:30:03 priyar pppd[3716]: Connection terminated.

Oct 3 19:30:03 priyar pppd[3716]: Modem hangup

Oct 3 19:30:03 priyar pppd[3716]: Exit.

In "vim /var/log/messages"

This is because of error in the file /etc/wvdial.conf at line

Init3 = AT+CGDCONT=1,"IP","aircelgprs","",0,0

check you entered correct string "aircelgprs".

---------------------------------------------Tip-2

Init3 = AT+CGDCONT=1,"IP","aircelgprs","",0,0

Init3 = AT+CGDCONT=1,"IP","airtelgprs.com","",0,0

---------------------------------------------Tip-3

1)Install the Bluetooth utilities:

#apt-get install bluez-gnome bluez-utils

2)Install Wvdial

#apt-get install wvdial

---------------------------------------------

root@priyar:~# rfcomm connect 0 00:0E:6D:68:0F:F7 1&

or

root@priyar:~# wvdial

The last number "1" is the Channel found in the previous command.

When you run this command your mobile should ask you for the Passcode for ComputerName enter the passcode into your phone and now your computer will prompt you to verify your passcode

---------------------------------------------

root@priyar:~# rfcomm bind 0 00:0E:6D:68:0F:F7 1&

root@priyar:~# rfcomm

rfcomm0: 00:0E:6D:68:0F:F7 channel 1 connected [tty-attached]

---------------------------------------------

HOWTO Airtel,Aircel,Idea,Bsnl,MTS,Vodafone,reliance,tata internet on Linux via Bluetooth,USB modem

Debian,ubuntu,fedora,suse

---------------------------------------------


No comments:

Post a Comment