Welcome Guest ( Log In | Register )




                Web Hosting Guide

 
Reply to this topicNew Topic
Internet Connection In Linux Through Mobile
borejk
post Sep 6 2008, 02:27 AM
Post #1


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 5
Joined: 6-September 08
Member No.: 32,463


Hi Guys!

I have been successful in connecting my phone to internet on both Ubuntu and openSUSE using BOTH the methods. I am not sure about other distros however they should work.

There are two ways to connect to the internet using a GPRS modem phone. For the phones with BLUETOOTH :

THE BLUETOOTH CONNECTION METHOD:


You need to follow the steps below to connect to the internet using a bluetooth connection:

1: Switch on bluetooth on your phone and the computer. Make both your computer and phone visible to other devices.

2: Do a search from Linux for bluetooth devices near you. For this, you need to follow as:

Open terminal / shell / console (whatever you call it)
switch to root user using the command ' su'.
pass the command ' hcitool scan '

After sometime you will get the list of devices with their device address (also called as MAC address) and the device name. . . It will look something like:

12:12:12:12:12:12 PhoneName

Note down the device address of your phone (it will appear the place of the 12:12:12:12:12:12 , but in a similar format). You will need to use it later.

3: Now, you need to find which channel on your phone is assigned to what service on the phone. For this you will need to browse the device services. To do this, pass the following command:

sdptool browse 12:12:12:12:12:12

NOTE: Replace 12:12:12:12:12:12 with your phone address.

You will get something like this (I am showing the output I get for my phone):
Code:

Browsing 00:18:13:47:13:BE .
Service Description: Sony Ericsson W810
Service RecHandle: 0x10000
Service Class ID List:
"PnP Information" (0x1200)

Service Name: OBEX SyncML Client
Service RecHandle: 0x10001
Service Class ID List:
UUID 128: 00000002-0000-1000-8000-0002ee000002
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 1
"OBEX" (0x0008)

Service Name: Dial-up Networking
Service RecHandle: 0x10002
Service Class ID List:
"Dialup Networking" (0x1103)
"Generic Networking" (0x1201)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 2
Profile Descriptor List:
"Dialup Networking" (0x1103)
Version: 0x0100

Service Name: Serial Port
Service RecHandle: 0x10003
Service Class ID List:
"Serial Port" (0x1101)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 3

Service Name: HF Voice Gateway
Service RecHandle: 0x10004
Service Class ID List:
"Handfree Audio Gateway" (0x111f)
"Generic Audio" (0x1203)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 4
Profile Descriptor List:
"Handsfree" (0x111e)
Version: 0x0101

Service Name: HS Voice Gateway
Service RecHandle: 0x10005
Service Class ID List:
"Headset Audio Gateway" (0x1112)
"Generic Audio" (0x1203)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 5
Profile Descriptor List:
"Headset" (0x1108)
Version: 0x0100

Service Name: OBEX Object Push
Service RecHandle: 0x10006
Service Class ID List:
"OBEX Object Push" (0x1105)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 6
"OBEX" (0x0008)
Profile Descriptor List:
"OBEX Object Push" (0x1105)
Version: 0x0100

Service Name: OBEX File Transfer
Service RecHandle: 0x10007
Service Class ID List:
"OBEX File Transfer" (0x1106)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 7
"OBEX" (0x0008)
Profile Descriptor List:
"OBEX File Transfer" (0x1106)
Version: 0x0100

Service Name: OBEX IrMC Sync Server
Service RecHandle: 0x10008
Service Class ID List:
"IrMC Sync" (0x1104)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 8
"OBEX" (0x0008)
Profile Descriptor List:
"IrMC Sync" (0x1104)
Version: 0x0100

Service Name: NAP service
Service Description: NAP description
Service RecHandle: 0x10009
Service Class ID List:
"Network Access Point" (0x1116)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 15
"BNEP" (0x000f)
Version: 0x0100
SEQ8: 0 6
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Network Access Point" (0x1116)
Version: 0x0100

Service Name: Mouse & Keyboard
Service Description: Remote Control
Service Provider: Sony Ericsson
Service RecHandle: 0x1000a
Service Class ID List:
"Human Interface Device" (0x1124)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 17
"HIDP" (0x0011)
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Human Interface Device" (0x1124)
Version: 0x0100



4: We need to see which channel is assigned to the service "Dial Up networking". Do not be worried by the long output. It is easy to find it. In the above output (in the code box), search for the lines which say "Service Name" and fins the one which says "Dial Up networking". Then follow look through it till you come across another "Service Name". You can see that in the above output, the block below matches our requirements:
Quote:

Service Name: Dial-up Networking
Service RecHandle: 0x10002
Service Class ID List:
"Dialup Networking" (0x1103)
"Generic Networking" (0x1201)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 2
Profile Descriptor List:
"Dialup Networking" (0x1103)
Version: 0x0100



In this entry, the channel number is given. We see that the channel is '2' (as shown by the line Channel : 2).

Note down the channel number. We will need in the next step.

5: Now you have all the required information for the work to be done. Now you need your computer to recognize the phone as the modem. for this, pass the following command:
Code:
00:0D:92:23:FC:25
rfcomm bind 0 12:12:12:12:12:12 2



Remember to replace the address 12:12:12:12:12:12 with your device address and the number '2' at the end with the channel number you will get for YOUR phone.






That was the Bluetooth way. However , if your device is detcted by Linux via Data cable as a modem, things are much easier. You will, in this case have to follow the following steps: Quote:

1: Connect the data cable to the phone.

2: Some phones as for selection of modes e.g. nokia phones ask to select either the data mode or PC suite mode and Sony Phones ask to select either the 'file transfer' mode or 'phone mode'. Select the one which you use on Windows to connect to internet (on nokia it is PC suite mode or Nokia mode and on Sony phones it is 'phone mode'). Wait for 2-3 seconds to get the device detected by Linux.

3: launch the terminal and switch to root by passing the command: su . Enter the password and you will get the # prompt.

4: go to the /dev directory by passing the command: cd /dev

5: Check for the ttyACM devices. issue the command : ls ttyACM*. It should show either ttyACM0 or ttyACM1 as output.

NOTE: If it does not show any output, then your phone is not detected !

6: Note the output which is mostly either ttyACM0 or ttyACM1.




So till now, you have made Linux recognize the phone as a modem either via Bluetooth or via Data cable OR BOTH WAYS. Now you need to dial to connect to the internet. For this you will have to copy the following as save it as /etc/wvdial.conf using the root account:
Code:

[Modem0]
Modem = /dev/rfcomm0
Baud = 230400
SetVolume = 0
DialCommand = ATDT
FlowControl = Hardware(CRTSCTS)

[Modem1]
Modem = /dev/ttyACM0
Baud = 230400
SetVolume = 0
DialCommand = ATDT
FlowControl = Hardware(CRTSCTS)

[Dialer GPRS]
Username = 1
Password = 1
Phone = *99***1#
Mode = 1
Inherits = Modem0

[Dialer DATA]
Username = <>
Password = <>
Phone = *99***1#
Mode = 1
Inherits = Modem1

[Dialer Defaults]
Modem = /dev/rfcomm0
Baud = 230400
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","airtelgprs.com"
ISDN = 0
Modem Type = Analog Modem
Area Code =
Phone = *99***1#
Username = <>
Password = <>
Ask Password = 0
Dial Command = ATDT
Stupid Mode = 1
Compuserve = 0
Force Address =
Idle Seconds = 3600
DialMessage1 =
DialMessage2 =
ISDN = 0
Auto DNS = 1




Now when dialing via Bluetooth, you will have to pass the following command:
Code:
sudo wvdial GPRS



It will ask for the root password. Enter it and it should connect.

For dialing via data cable, you will have to pass the command:
Code:
sudo wvdial DATA



This will also ask for the root password. Enter the password and it should proceed.

If you have a problem with that, you can reply back with the problem.
Go to the top of the page
 
+Quote Post
xboxrulz
post Sep 6 2008, 08:46 PM
Post #2


Colonel Panic
Group Icon

Group: [MODERATOR]
Posts: 3,051
Joined: 25-March 05
From: Toronto, Ontario, Canada
Member No.: 3,233
myCENTs:38.62


My friend was successful in connecting her Macbook to the GPRS on her cellphone I was impressed since she was computer-illiterate to a certain point.

xboxrulz
Go to the top of the page
 
+Quote Post
Zohan
post Sep 7 2008, 02:44 PM
Post #3


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 3
Joined: 7-September 08
Member No.: 32,488


QUOTE(borejk @ Sep 6 2008, 02:27 AM) [snapback]127987[/snapback]
Hi Guys!

I have been successful in connecting my phone to internet on both Ubuntu and openSUSE using BOTH the methods. I am not sure about other distros however they should work.

There are two ways to connect to the internet using a GPRS modem phone. For the phones with BLUETOOTH :

THE BLUETOOTH CONNECTION METHOD:
You need to follow the steps below to connect to the internet using a bluetooth connection:

1: Switch on bluetooth on your phone and the computer. Make both your computer and phone visible to other devices.

2: Do a search from Linux for bluetooth devices near you. For this, you need to follow as:

Open terminal / shell / console (whatever you call it)
switch to root user using the command ' su'.
pass the command ' hcitool scan '

After sometime you will get the list of devices with their device address (also called as MAC address) and the device name. . . It will look something like:

12:12:12:12:12:12 PhoneName

Note down the device address of your phone (it will appear the place of the 12:12:12:12:12:12 , but in a similar format). You will need to use it later.

3: Now, you need to find which channel on your phone is assigned to what service on the phone. For this you will need to browse the device services. To do this, pass the following command:

sdptool browse 12:12:12:12:12:12

NOTE: Replace 12:12:12:12:12:12 with your phone address.

You will get something like this (I am showing the output I get for my phone):
Code:

Browsing 00:18:13:47:13:BE .
Service Description: Sony Ericsson W810
Service RecHandle: 0x10000
Service Class ID List:
"PnP Information" (0x1200)

Service Name: OBEX SyncML Client
Service RecHandle: 0x10001
Service Class ID List:
UUID 128: 00000002-0000-1000-8000-0002ee000002
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 1
"OBEX" (0x0008)

Service Name: Dial-up Networking
Service RecHandle: 0x10002
Service Class ID List:
"Dialup Networking" (0x1103)
"Generic Networking" (0x1201)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 2
Profile Descriptor List:
"Dialup Networking" (0x1103)
Version: 0x0100

Service Name: Serial Port
Service RecHandle: 0x10003
Service Class ID List:
"Serial Port" (0x1101)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 3

Service Name: HF Voice Gateway
Service RecHandle: 0x10004
Service Class ID List:
"Handfree Audio Gateway" (0x111f)
"Generic Audio" (0x1203)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 4
Profile Descriptor List:
"Handsfree" (0x111e)
Version: 0x0101

Service Name: HS Voice Gateway
Service RecHandle: 0x10005
Service Class ID List:
"Headset Audio Gateway" (0x1112)
"Generic Audio" (0x1203)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 5
Profile Descriptor List:
"Headset" (0x1108)
Version: 0x0100

Service Name: OBEX Object Push
Service RecHandle: 0x10006
Service Class ID List:
"OBEX Object Push" (0x1105)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 6
"OBEX" (0x0008)
Profile Descriptor List:
"OBEX Object Push" (0x1105)
Version: 0x0100

Service Name: OBEX File Transfer
Service RecHandle: 0x10007
Service Class ID List:
"OBEX File Transfer" (0x1106)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 7
"OBEX" (0x0008)
Profile Descriptor List:
"OBEX File Transfer" (0x1106)
Version: 0x0100

Service Name: OBEX IrMC Sync Server
Service RecHandle: 0x10008
Service Class ID List:
"IrMC Sync" (0x1104)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 8
"OBEX" (0x0008)
Profile Descriptor List:
"IrMC Sync" (0x1104)
Version: 0x0100

Service Name: NAP service
Service Description: NAP description
Service RecHandle: 0x10009
Service Class ID List:
"Network Access Point" (0x1116)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 15
"BNEP" (0x000f)
Version: 0x0100
SEQ8: 0 6
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Network Access Point" (0x1116)
Version: 0x0100

Service Name: Mouse & Keyboard
Service Description: Remote Control
Service Provider: Sony Ericsson
Service RecHandle: 0x1000a
Service Class ID List:
"Human Interface Device" (0x1124)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 17
"HIDP" (0x0011)
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Human Interface Device" (0x1124)
Version: 0x0100
4: We need to see which channel is assigned to the service "Dial Up networking". Do not be worried by the long output. It is easy to find it. In the above output (in the code box), search for the lines which say "Service Name" and fins the one which says "Dial Up networking". Then follow look through it till you come across another "Service Name". You can see that in the above output, the block below matches our requirements:
Quote:

Service Name: Dial-up Networking
Service RecHandle: 0x10002
Service Class ID List:
"Dialup Networking" (0x1103)
"Generic Networking" (0x1201)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 2
Profile Descriptor List:
"Dialup Networking" (0x1103)
Version: 0x0100
In this entry, the channel number is given. We see that the channel is '2' (as shown by the line Channel : 2).

Note down the channel number. We will need in the next step.

5: Now you have all the required information for the work to be done. Now you need your computer to recognize the phone as the modem. for this, pass the following command:
Code:
00:0D:92:23:FC:25
rfcomm bind 0 12:12:12:12:12:12 2
Remember to replace the address 12:12:12:12:12:12 with your device address and the number '2' at the end with the channel number you will get for YOUR phone.
That was the Bluetooth way. However , if your device is detcted by Linux via Data cable as a modem, things are much easier. You will, in this case have to follow the following steps: Quote:

1: Connect the data cable to the phone.

2: Some phones as for selection of modes e.g. nokia phones ask to select either the data mode or PC suite mode and Sony Phones ask to select either the 'file transfer' mode or 'phone mode'. Select the one which you use on Windows to connect to internet (on nokia it is PC suite mode or Nokia mode and on Sony phones it is 'phone mode'). Wait for 2-3 seconds to get the device detected by Linux.

3: launch the terminal and switch to root by passing the command: su . Enter the password and you will get the # prompt.

4: go to the /dev directory by passing the command: cd /dev

5: Check for the ttyACM devices. issue the command : ls ttyACM*. It should show either ttyACM0 or ttyACM1 as output.

NOTE: If it does not show any output, then your phone is not detected !

6: Note the output which is mostly either ttyACM0 or ttyACM1.
So till now, you have made Linux recognize the phone as a modem either via Bluetooth or via Data cable OR BOTH WAYS. Now you need to dial to connect to the internet. For this you will have to copy the following as save it as /etc/wvdial.conf using the root account:
Code:

[Modem0]
Modem = /dev/rfcomm0
Baud = 230400
SetVolume = 0
DialCommand = ATDT
FlowControl = Hardware(CRTSCTS)

[Modem1]
Modem = /dev/ttyACM0
Baud = 230400
SetVolume = 0
DialCommand = ATDT
FlowControl = Hardware(CRTSCTS)

[Dialer GPRS]
Username = 1
Password = 1
Phone = *99***1#
Mode = 1
Inherits = Modem0

[Dialer DATA]
Username = <>
Password = <>
Phone = *99***1#
Mode = 1
Inherits = Modem1

[Dialer Defaults]
Modem = /dev/rfcomm0
Baud = 230400
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","airtelgprs.com"
ISDN = 0
Modem Type = Analog Modem
Area Code =
Phone = *99***1#
Username = <>
Password = <>
Ask Password = 0
Dial Command = ATDT
Stupid Mode = 1
Compuserve = 0
Force Address =
Idle Seconds = 3600
DialMessage1 =
DialMessage2 =
ISDN = 0
Auto DNS = 1
Now when dialing via Bluetooth, you will have to pass the following command:
Code:
sudo wvdial GPRS
It will ask for the root password. Enter it and it should connect.

For dialing via data cable, you will have to pass the command:
Code:
sudo wvdial DATA
This will also ask for the root password. Enter the password and it should proceed.

If you have a problem with that, you can reply back with the problem.


Wow thanks for this, i'm using Ubuntu, no problems here smile.gif
Go to the top of the page
 
+Quote Post
borejk
post Sep 8 2008, 01:51 PM
Post #4


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 5
Joined: 6-September 08
Member No.: 32,463


QUOTE(Zohan @ Sep 7 2008, 02:44 PM) [snapback]128047[/snapback]
Wow thanks for this, i'm using Ubuntu, no problems here smile.gif

First of all welcome to Astahost. And it really feels great if I am giving something to the commuity.... smile.gif
Go to the top of the page
 
+Quote Post
iGuest
post Nov 5 2008, 11:14 AM
Post #5


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869


wvdial wont work
Internet Connection In Linux Through Mobile

Hi
Everything works until I have to fix with my wvdial.
I first copied yours and tried and I only get Cannot open /dev/rfcomm0: Host is down

I googled a bit for the wvdial but it did not work either.

Thanks for the great howto btw


-question by Andreas
Go to the top of the page
 
+Quote Post
iGuest
post Oct 30 2009, 07:55 PM
Post #6


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869


Suse problem
Internet Connection In Linux Through Mobile

I m using suse 11.0 since 1 year but till I didnt see a movie and I'm not able to download any codec or plugin for my gnome desk.I use my pc without internet connection and codecs may be directly installed so thats why I m trying to connect my phone .I am working since 4 month to connect with data cable but thats not working .Always I try to install mplayer,vlc and others but not installing so Please any body show how to connect bluetooth or data cable because bluetooth is not working on my pc by given method or if somebody have any player or codec pack or rpm noarch file then Please send on my e id -reply by Rossen helfin
Go to the top of the page
 
+Quote Post
iGuest
post Nov 19 2009, 05:49 PM
Post #7


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869


but i got an error
Internet Connection In Linux Through Mobile

I followed all the same procedure as u said, but I got this message as error:

"Using interface ppp0
--> pppd: �BL[08]
--> pppd: �BL[08]
--> pppd: �BL[08]
--> pppd: �BL[08]
--> pppd: �BL[08]
--> pppd: �BL[08]
--> Disconnecting at Thu Nov 19 23:04:50 2009
--> 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. "

 

Can u say, what's the problem?

Thnks

-question by vishwanath

 

Go to the top of the page
 
+Quote Post

Reply to this topicNew Topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No new 37 muksimp 7,135 20th November 2009 - 06:53 PM
Last post by: starscream
No New Posts   1 lemen 34 17th November 2009 - 07:54 AM
Last post by: MJboy
No New Posts   12 ejfetters 5,499 16th November 2009 - 01:07 AM
Last post by: iG-Andre
No New Posts   1 magickay 23 12th November 2009 - 11:23 PM
Last post by: yordan
No New Posts   14 kanade 4,260 12th November 2009 - 07:55 PM
Last post by: iG-Ram
No New Posts   3 sunny152 887 12th November 2009 - 05:46 PM
Last post by: iG-Anil Sarwal
No New Posts   1 FirefoxRocks 109 5th November 2009 - 11:39 PM
Last post by: HannahI
No New Posts 7 efrain_aguilar 4,465 5th November 2009 - 05:14 AM
Last post by: iG-ant
No New Posts   8 ruijie 1,483 28th October 2009 - 09:05 AM
Last post by: fermin25
No New Posts   15 tansqrx 273 27th October 2009 - 08:41 PM
Last post by: tansqrx
No New Posts   1 zzyjetty 44 27th October 2009 - 01:22 PM
Last post by: yordan
No New Posts   11 www.jbi.in 473 23rd October 2009 - 10:35 PM
Last post by: yordan
No New Posts   7 WeaponX 5,752 19th October 2009 - 03:52 AM
Last post by: iG-sandra
No New Posts   5 soleimanian 2,872 16th October 2009 - 06:56 PM
Last post by: iG-Jerry
No New Posts 10 tennorhornist 7,264 14th October 2009 - 06:59 AM
Last post by: iG-ming


Web Hosting Powered by ComputingHost.com.