GPRS Howto - Ubuntu India
GPRS Howto - Ubuntu India
GPRS Howto - Ubuntu India
Ubuntu India
Main Page
The Team
Projects
Documentation
Events
FAQ
Ubuntu
This page is created to provide instructions for using internet on Ubuntu via GPRS enabled mobiles. Please note not all GPRS enabled phones
can be used as modems.
Currently this page provides instructions only for using Airtel GPRS by over bluetooth or USB.
Contents
1 Prerequisite
2 Configuring device node (rfcomm, bluetooth only)
2.1 Listing Bluetooth devices
2.2 Pairing
2.3 Configuring the rfcomm device
3 Configuring & using GPRS connection
3.1 Peers file
3.2 Chatscript
3.3 Dialing permission
3.4 Using the connection
4 Additional/Alternate Instructions for Configuring Internet Using GPRS via Bluetooth
4.1 Preparing Your Phone and Laptop for Bluetooth Connection
Prerequisite
A GPRS enabled phone which can be used as modem. This phone should have data profile set properly as per instructions provided by the
service provider.
$ hcitool scan
Copy the MAC address (the text with the capital letters, numbers, and ':'s) somewhere convenient. You'll need it many times.
Pairing
You can skip this section if you've already paired your phone with your computer. However, consider the final optional step, as your phone
might otherwise nag you every time you use if for dialup.
If this command doesn't work, try the pairing instructions on other Bluetooth wiki pages on Ubuntu wiki; it seems 5.10 and older have
issues with the PIN wrapper
Enter a numeric code into the dialog box that pops up
Accept the pairing from your phone handset
Enter the same number on your phone
Run the 'hcitool auth your-phone-mac-address' command again if it fails
You can remove your handset's Bluetooth discoverability now
Some phones (notably Samsung) require further authorization for certain Bluetooth activities, including dialup; consult your phone's user
manual to avoid confirming your computer's dialup action on your phone every time
$ sudo vi /etc/bluetooth/rfcomm.conf
Paste the following into the file, replacing your-phone-mac-address and your-phone-rfcomm-channel with appropriate values
rfcomm0 {
bind yes;
device your-phone-mac-address;
channel your-phone-rfcomm-channel;
comment "Bluetooth PPP Connection";
}
$ sudo vi /etc/ppp/peers/BluetoothDialup
Paste the following into the file (the file should start out blank)
debug
noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/BluetoothDialup"
usepeerdns
/dev/rfcomm0 115200
defaultroute
crtscts
lcp-echo-failure 0
NOTE - If you are connecting phone via usb connection then replace /dev/rfcomm0 with something like /dev/ttyACM0. You can find the
exact device node from menu System->Preferences->Device/Hardware Information. I have tested USB connection with Sony Ericsson
phones and there should not be much difference for other phones.
Save and close the BluetoothDialup file
Chatscript
Create a chatscript for the connection
$ sudo vi /etc/chatscripts/BluetoothDialup
Paste the following into the file (the file should start out blank).
Replace your-apn-here with the APN from your data services profile ("airtelgprs.com" for Airtel).
Replace your-data-profile-number-here with the number you stored the profile into on the phone. In my case I replaced *99***your-
data-profile-number-here# with *99#
TIMEOUT 35
ECHO ON
ABORT '\nBUSY\r'
ABORT '\nERROR\r'
ABORT '\nNO ANSWER\r'
ABORT '\nNO CARRIER\r'
ABORT '\nNO DIALTONE\r'
ABORT '\nRINGING\r\n\r\nRINGING\r'
'' \rAT
OK 'AT+CGDCONT=1,"IP","your-apn-here","",0,0'
OK ATD*99***your-data-profile-number-here#
CONNECT ""
Dialing permission
Add the user who wants dialing permission to the 'dialout' group
You can also do this from GUI, System->Administration->Users & Groups. Check for user permissions and make sure that Allow to use
modem checkbox is checked.
$ pon BluetoothDialup
$ poff BluetoothDialup
After pon you can verify if the connection has started using plog command
If you have configured bluetooth succesfully and are looking for the Airtel GPRS connection string, then you can find it below.
These instructions have been tested on a Ubuntu Dapper Drake release with a Dell Latitude D610, connected to a Nokia Series 60 phone over
Airtel GPRS via bluetooth.
This contains information right from checking your bluetooth driver installation to creating the chat scripts for bluetooth dialup using pppd.
The only additional information you need here is the GPRS connection string for your service provider. The connection string for Airtel GPRS
is:
OK 'AT+CGDCONT=1,"IP","airtelgprs.com","",0,0'\
OK ATD*99# \
So, if you are following the instructions given in the link above, then replace the gprs-chat script given there, with the one below.
#!/bin/sh
#this is the matrix setting #
exec chat
\
TIMEOUT 5 \
ECHO ON \
ABORT '\nBUSY\r' \
ABORT '\nERROR\r' \
ABORT '\nNO ANSWER\r' \
ABORT '\nNO CARRIER\r' \
ABORT '\nNO DIALTONE\r' \
ABORT '\nRINGING\r\n\r\nRINGING\r' \
'' \rAT \
TIMEOUT 12 \
SAY "Press CTRL-C to close the connection at any stage!" \
SAY "\ndefining PDP context...\n" \
OK ATH \
OK ATE1 \
OK 'AT+CGDCONT=1,"IP","airtelgprs.com","",0,0'\
OK ATD*99# \
TIMEOUT 22 \
SAY "\nwaiting for connect...\n" \
CONNECT "" \
SAY "\nConnected." \
SAY "\nIf the following ppp negotiations fail,\n" \
SAY "try restarting the phone.\n"
For any other service provider, simply call the customer care and ask them specifically about the GPRS connection string and other GPRS
specific settings (if any).
Thats it. This should get you started on the internet using GPRS. Happy Surfing...:)
Note - I havent copied or uploaded the document that this URL links to, since I am not sure of its copyright status.If you are unable to
access this URL, please feel free to email me for the detailed instructions.
This page was last modified 07:58, 15 October 2007. This page has been accessed 9,748 times.
<div id="header">
<h1>Ubuntu India</h1>
</div>
<ul id="nav-top">
<li id="n-mainpage" class="navMenuItem"><a href="/wiki/Main_Page">Main Page</a></li>
<li id="n-The-Team" class="navMenuItem"><a href="/wiki/The_Team">The Team</a></li>
<li id="n-Projects" class="navMenuItem"><a href="/wiki/Projects">Projects</a></li>
<li id="n-Documentation" class="navMenuItem"><a href="/wiki/Documentation">Documentation</a></li>
<li id="n-Events" class="navMenuItem"><a href="/wiki/Events">Events</a></li>
<li id="n-FAQ" class="navMenuItem"><a href="/wiki/FAQ">FAQ</a></li>
<li id="n-Ubuntu" class="navMenuItem"><a href="http://www.ubuntu.com">Ubuntu</a></li>
</ul>
<div id="content">
<div id="content-body">
<div id="articleBody">
<a name="top" id="contentTop"></a>
<!-- <h2 class="articleTitle">GPRS Howto</h2> -->
<div id="articleContent">
<div id="contentSub"></div>
<p>This page is created to provide
instructions for using internet on Ubuntu via GPRS enabled mobiles. Please note not all GPRS enabled phones can be used
as modems.
</p><p>Currently this page provides instructions only for using Airtel GPRS by over bluetooth or USB.
</p>
<table id='toc' class='toc'><tr><td><div id='toctitle'><h2>Contents</h2></div>
<ul>
<li class='toclevel-1'><a href="#Prerequisite"><span class="tocnumber">1</span> <span class="toctext">Prerequisite</
span></a></li>
<li class='toclevel-1'><a href="#Configuring_device_node_.28rfcomm.2C_bluetooth_only.29"><span class="tocnumber">2</
span> <span class="toctext">Configuring device node (rfcomm, bluetooth only)</span></a>
<ul>
<li class='toclevel-2'><a href="#Listing_Bluetooth_devices"><span class="tocnumber">2.1</span> <span
class="toctext">Listing Bluetooth devices</span></a></li>
<li class='toclevel-2'><a href="#Pairing"><span class="tocnumber">2.2</span> <span class="toctext">Pairing</span></a></
li>
<li class='toclevel-2'><a href="#Configuring_the_rfcomm_device"><span class="tocnumber">2.3</span> <span
class="toctext">Configuring the rfcomm device</span></a></li>
</ul>
</li>
<li class='toclevel-1'><a href="#Configuring_.26_using_GPRS_connection"><span class="tocnumber">3</span> <span
class="toctext">Configuring & using GPRS connection</span></a>
<ul>
<li class='toclevel-2'><a href="#Peers_file"><span class="tocnumber">3.1</span> <span class="toctext">Peers file</
span></a></li>
<li class='toclevel-2'><a href="#Chatscript"><span class="tocnumber">3.2</span> <span class="toctext">Chatscript</
span></a></li>
<li class='toclevel-2'><a href="#Dialing_permission"><span class="tocnumber">3.3</span> <span class="toctext">Dialing
permission</span></a></li>
<li class='toclevel-2'><a href="#Using_the_connection"><span class="tocnumber">3.4</span> <span class="toctext">Using
the connection</span></a></li>
</ul>
</li>
<li class='toclevel-1'><a href="#Additional.2FAlternate_Instructions_for_Configuring_Internet_Using_GPRS_via_
Bluetooth"><span class="tocnumber">4</span> <span class="toctext">Additional/Alternate Instructions for Configuring
Internet Using GPRS via Bluetooth</span></a>
<ul>
<li class='toclevel-2'><a href="#Preparing_Your_Phone_and_Laptop_for_Bluetooth_Connection"><span class="tocnumber">4.1</
span> <span class="toctext">Preparing Your Phone and Laptop for Bluetooth Connection</span></a></li>
</ul>
</li>
</ul>
</td></tr></table>
<p><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide";
showTocToggle(); } </script>
</p>
<a name="Prerequisite"></a><h2> Prerequisite </h2>
<ul><li> A GPRS enabled phone which can be used as modem. This phone should have data profile set properly as per
instructions provided by the service provider.
</li></ul>
<a name="Configuring_device_node_.28rfcomm.2C_bluetooth_only.29"></a><h2> Configuring device node (rfcomm, bluetooth
only) </h2>
<p>If you are going to connect phone via USB cable, please skip this section.
</p>
<a name="Listing_Bluetooth_devices"></a><h3> Listing Bluetooth devices </h3>
<ul><li> Make your phone Bluetooth discoverable.
</li><li> Run the following at a shell prompt:<br /><pre>$ hcitool scan</pre>
</li><li> Copy the MAC address (the text with the capital letters, numbers, and ':'s) somewhere convenient. You'll need
it many times.
</li></ul>
OK ATD*99***your-data-profile-number-here#
CONNECT ""
</pre>
</li><li> Save and close the BluetoothDialup file
</li></ul>
<a name="Dialing_permission"></a><h3> Dialing permission </h3>
<ul><li>Add the user who wants dialing permission to the 'dialout' group
<pre>
$ sudo adduser your-username-here dialout
</pre><br />You can also do this from GUI, System->Administration->Users & Groups. Check for user permissions
and make sure that <b>Allow to use modem</b> checkbox is checked.
</li></ul>
<a name="Using_the_connection"></a><h3> Using the connection </h3>
<ul><li>Start the connection using pon command
<pre>
$ pon BluetoothDialup
</pre>
</li><li>End the connection using poff command
<pre>
$ poff BluetoothDialup
</pre>
</li><li> After <b>pon</b> you can verify if the connection has started using <b>plog</b> command
</li></ul>
<p><br />
</p>
<a name="Additional.2FAlternate_Instructions_for_Configuring_Internet_Using_GPRS_via_Bluetooth"></a><h2> Additional/
Alternate Instructions for Configuring Internet Using GPRS via Bluetooth </h2>
<p>This is an alternate set of instructions/information for configuring internet using GPRS. You can use this
information incase you have tried the instructions above, but are still unable to connect to the Internet.
</p><p>If you have configured bluetooth succesfully and are looking for the Airtel GPRS connection string, then you can
find it below.
</p><p>These instructions have been tested on a Ubuntu Dapper Drake release with a Dell Latitude D610, connected to a
Nokia Series 60 phone over Airtel GPRS via bluetooth.
</p>
<a name="Preparing_Your_Phone_and_Laptop_for_Bluetooth_Connection"></a><h3> Preparing Your Phone and Laptop for
Bluetooth Connection </h3>
<p>A very comprehensive set of instructions for this can be found at <a href="http://y3dips.echo.or.id/ubuntubox/gprs_
bluetooth_matrix_t68i.txt" class='external text' title="http://y3dips.echo.or.id/ubuntubox/gprs bluetooth matrix
t68i.txt" rel="nofollow">this page</a>. <i>Please see note below</i>.
</p><p>This contains information right from checking your bluetooth driver installation to creating the chat scripts
for bluetooth dialup using pppd.
</p><p>The only additional information you need here is the GPRS connection string for your service provider. The
connection string for Airtel GPRS is:
</p><p><b></b>
</p>
<pre> OK 'AT+CGDCONT=1,"IP","airtelgprs.com","",0,0'\
OK ATD*99# \
</pre>
<p><b></b>
</p><p>So, if you are following the instructions given in the link above, then replace the <i> gprs-chat </i> script
given there, with the one below.
</p><p><b></b>
</p>
<pre>#!/bin/sh
#this is the matrix setting #
exec chat
\
TIMEOUT 5 \
ECHO ON \
ABORT '\nBUSY\r' \
ABORT '\nERROR\r' \
ABORT '\nNO ANSWER\r' \
ABORT '\nNO CARRIER\r' \
ABORT '\nNO DIALTONE\r' \
ABORT '\nRINGING\r\n\r\nRINGING\r' \
'' \rAT \
TIMEOUT 12 \
SAY "Press CTRL-C to close the connection at any stage!" \
SAY "\ndefining PDP context...\n" \
OK ATH \
OK ATE1 \
OK 'AT+CGDCONT=1,"IP","airtelgprs.com","",0,0'\
OK ATD*99# \
TIMEOUT 22 \
SAY "\nwaiting for connect...\n" \
CONNECT "" \
SAY "\nConnected." \
SAY "\nIf the following ppp negotiations fail,\n" \
SAY "try restarting the phone.\n"
</pre>
<p><b></b>
</p><p>For any other service provider, simply call the customer care and ask them specifically about the GPRS
connection string and other GPRS specific settings (if any).
</p><p>Thats it. This should get you started on the internet using GPRS. Happy Surfing...:)
</p>
<ul><li> <b> Note </b> - I havent copied or uploaded the document that this URL links to, since I am not sure of its
copyright status.If you are unable to access this URL, please feel free to email me for the detailed instructions.
</li></ul>
<p><a href="/wiki/User:Titashn" title="User:Titashn">Titashn</a> 10:58, 11 September 2006 (BRT)
</p>
<!-- Saved in parser cache with key uin_wiki:pcache:idhash:1516-0!1!0!0!!en!2 and timestamp 20080110203233 -->
<div class="printfooter">
Retrieved from "<a href="http://www.ubuntu-in.org/wiki/GPRS_Howto">http://www.ubuntu-in.org/wiki/GPRS_Howto</a>"</div>
</div>
</div>
<div id="article-info">
This page was last modified 07:58, 15 October 2007. This page has
been accessed 9,748 times. </div>
<ul class="nav-bottom">
<li id="userPages-login"><a href="/index.php?title=Special:Userlogin&returnto=GPRS_
Howto">Create an account or log in</a></li>
</ul>
<ul class="nav-bottom">
<li id="articleActions=nstab-main"><a href="selected"<a href="/wiki/GPRS_Howto">Article</a></
li>
<li id="articleActions=talk"><a href="new"<a href="/index.php?title=Talk:GPRS_
Howto&action=edit">Discussion</a></li>
<li id="articleActions=viewsource"><a href=""<a href="/index.php?title=GPRS_
Howto&action=edit">View source</a></li>
<li id="articleActions=history"><a href=""<a href="/index.php?title=GPRS_
Howto&action=history">History</a></li>
</ul>
<div class="searchForm">
<form id="searchForm" class="searchForm" name="searchForm" action="/wiki/Special:Search">
<input id="searchInput" class="searchInput" name="search" type="text" accesskey="f" value="" /
> <input id="searchGoButton" class="searchButton" type='submit' name="go" value="Go" /> <input
id="searchButton" class="searchButton" type='submit' name="fulltext" value="Search" />
</form>
</div>
<ul class="nav-bottom">
<li id="articleInfo-whatlinkshere"><a href="/wiki/Special:Whatlinkshere/GPRS_Howto">What links
here</a></li>
<li id="articleInfo-recentchanges"><a href="/wiki/Special:Recentchanges">Recent changes</a></
li>
<li id="articleInfo-upload"><a href="/wiki/Special:Upload">Upload file</a></li>
<li id="articleInfo-specialpages"><a href="/wiki/Special:Specialpages">Special pages</a></li>
</ul>
<div class="poweredby">
<span id="footer-poweredbyico"><a href="http://www.mediawiki.org/"><img src="/skins/common/
images/poweredby_mediawiki_88x31.png" alt="MediaWiki" /></a></span>
</div>
<div>
<hr class="clear dotted spacing" />
Copyright © 2006, <a href="http://www.ubuntu-in.org">Ubuntu India</a> | All contents are under <a
href="GFDL">GNU Free Documentation Licence</a> | For queries mail <a href="mailto:webmaster@NOSPAMubuntu-
in.org">webmaster at ubuntu-in.org</a>
</div>
</body>
</html>