Forum     

Go Back   Digit Technology Discussion Forum > Community > Tutorials
Register FAQ Calendar Mark Forums Read

Tutorials This section offers tutorials and How to's on just about anything related to computers and IT. Note: All tutorials are courtesy the posters and not verified by Digit


Closed Thread
 
LinkBack (1) Thread Tools Display Modes
Old 20-02-2008, 12:06 PM   #1 (permalink)
Broken In
 
Join Date: Jan 2006
Posts: 109
Default Gprs Over Linux Via Bluetooth


i found a lot of guides which didnt worked ..so i tried .after 3-4 hours i figured it

here you go guys . enjoy ^^

Quote:
Connecting to the phone via Bluetooth

I assume that you have your Bluetooth device up and running successfully. This can be any kind of Bluetooth transceiver.

You can check if Bluetooth is working try the following:

hciconfig -a

If you see output you have an USB device. If it says "DOWN" then the hcid is probably not running.

Now we will try to find the phone. Set your phone to be visible by everybody for now. Then execute hcitool, this should look somewhat similar to this:

[root@localhost root]# hcitool scan
Scanning ...
00:E0:03:3E:4E:19 Nokia 6230 TN

This is good news. We found the phone. Now we are going to inquire the device and ask it for dialup networking (DUN). This will bring up the pairing process that you have to do once. If your system is configured well (like FC3) you will be asked for the communication PIN that you have to enter the same on the machine and on the phone.
[root@localhost root]# sdptool search DUN
Inquiring ...
Searching for DUN on 00:E0:03:3E:4E:19 ...
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: 1
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Dialup Networking" (0x1103)
Version: 0x0100

Write down the channel you see. You will need it soon. You can now ping the device to see if communication is working:

[root@localhost root]# l2ping 00:E0:03:3E:4E:19
Ping: 00:E0:03:3E:4E:19 from 00:20:E0:7A:15:6F (data size 20) ...
0 bytes from 00:E0:03:3E:4E:19 id 200 time 47.65ms
0 bytes from 00:E0:03:3E:4E:19 id 201 time 36.47ms
0 bytes from 00:E0:03:3E:4E:19 id 202 time 37.44ms
3 sent, 3 received, 0% loss

If that works your are fine. the GRPS connection later.
[root@localhost root]#rfcomm bind 0 00:E0:03:3E:4E:19 1

The 1 at the very end of the line is the channel we noted earlier. You can verify the result with

[root@localhost root]#rfcomm show
rfcomm0: 00:E0:03:3E:4E:19 channel 1 clean

Now you can use minicom or something similar to talk to the phone. Use /dev/rfcomm0 as the device (if you bound to 0 above) you talk to. With my phone 57600 bits/sec and 8-N-1 worked fine. Try typing "at[ENTER]" which should return "OK".

GPRS connection
First we try it the low-tech style. Try a serial minicom session like the following:

at
OK
ate1
OK
at+cgdcont=1,"IP","internet.t-d1.de","",0,0
OK
atdt*99#

This should establish the GRPS connection. Note that you have to replace "internet.t-d1.de" by whatever the access point name (GPRS) is for your service provider.

If this worked you are ready for a more formal way. I will describe this here for Fedora Core 3.

Nice way on Fedora Core 3
First edit /etc/wvdial.conf. Add two sections like the following:

[BluetoothMobile]
Modem = /dev/rfcomm0
Baud = 57600
SetVolume = 0
Dial Command = ATDT
Init1 = ATE1
Init2 = AT+CGDCONT=1,"IP","your Acces point name or APN of your service provider","",0,0
FlowControl = CRTSCTS

[Dialer GPRS]
Phone = *99#
Stupid Mode = 1
Inherits = BluetoothMobile

Replace the APN appropriately as you did above. The number should be the same on all networks. The settings given are for a Nokia 6230 but should also apply to other mobiles.

Now we will create the PPP peers file /etc/ppp/peers/GPRS with the following content:

connect "/usr/bin/wvdial --remotename GPRS --chat 'GPRS'"

The name given here is the name from the dialer section above. Now we create the configuration file so that we can easily establish the connection. Create the file /etc/sysconfig/network-scripts/ifcfg-GPRS with the following content:

ONBOOT=no
USERCTL=yes
PEERDNS=yes
TYPE=Modem
DEVICE=ppp1
BOOTPROTO=dialup
AC=off
BSDCOMP=off
VJCCOMP=off
CCP=off
PC=off
VJ=off
LINESPEED=57600
MODEMPORT=/dev/rfcomm0
PROVIDER=T-Mobile
DEFROUTE=yes
PERSIST=no
PAPNAME='t-d1'
WVDIALSECT=GPRS
MODEMNAME=BluetoothMobile
DEMAND=no
IPV6INIT=no
IDLETIMEOUT=600

A little tweak is needed to get bluetooth and rfcomm started up when it is needed right before the device initialization. The init parameter of pppd cannot be used (pppd won't start if the devcice is not already present). So what we do is create the file /sbin/ifup-pre-local which gets executed before ifup-ppp. This script may look similar to this one:

#!/bin/bash

case "$1" in
ifcfg-GPRS)
/etc/init.d/bluetooth start
/usr/bin/rfcomm bind 0 00:E0:03:3E:4E:19 1
;;
esac

This will do what we want. Replace the address and channel appropriately. Not that on some older versions it may be just "GPRS" instead of "ifcfg-GPRS". You can check this by outputting $1 into a file (add echo $1 > /tmp/GPRS for example).

Now you can establish the connection (the USERCTL=yes will allow you to do this as a normal user) as easy as

/sbin/ifup GPRS



Jabber works just fine over that line and maybe cheaper than SMS with an appropriate plan that includes data transfer.

That's it. Have fun!





Fart like Hatory STing Like Shivaji ^^;

oh n i forgot.. once you reboot . you'll have to do the comands again

for that i suggest make a script


open your terminal and type the following
[root@localhost root]#vi <filename>.sh


now press i

so that it will say insert

type these lines

#!/bin/bash
hciconfig -a
hcitool scan
sdptool search DUN
rfcomm bind 0 00:0a:d9:de:65:3c 1
rfcomm show
/sbin/ifup GPRS

then press Escape
:wq and bam enter


now the nest time you need to dial the conection

open your terminal type

sh <filename you gave>.sh


to disconnect type this at terminal

[root@localhost root]#ifdown GPRS
anonymusneo is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 20-02-2008, 06:02 PM   #2 (permalink)
anarchist
Guest
 
Posts: n/a
Default Re: Gprs Over Linux Via Bluetooth

very long tutorial, what about this:
Quote:
Originally Posted by sariq View Post
what phone are you using?
plug the data cable to pc and run this command:
Code:
tail /var/log/messages
not down where your device is attached. it should be like ttyUSB0 or ttyACM0
to configure the connection use
Code:
sudo pppconfig
i have used airtel as the name of provider. here is final screenshot from pppconfig.

to connect use
Code:
pon airtel
to disconnect use
Code:
poff airtel
to view log use
Code:
plog airtel
add network monitor to panel for indication of sucessfull connection. you can create desktop shortcut (launcher) for connection
 
Old 20-02-2008, 08:36 PM   #3 (permalink)
Fast 'N' Furious
 
topgear's Avatar
 
Join Date: Jul 2006
Location: Geek's Heaven
Posts: 11,169
Default Re: Gprs Over Linux Via Bluetooth

^^ Useful Tricks
__________________
ToPsPeEeD = FaSt BuT StEaDy

AMD Radeon HD 6850 OverClocked to 1 Ghz !!!

Blog : http://topgeartopspeed.wordpress.com/
----------------------------------------------------
Never buy viewsonic products : http://tinyurl.com/ykwx4oa
topgear is offline  
Old 20-02-2008, 10:53 PM   1 links from elsewhere to this Post. Click to view. #4 (permalink)
Broken In
 
Join Date: Jan 2006
Posts: 109
Default Re: Gprs Over Linux Via Bluetooth

i just told what worked for me ^^
anonymusneo is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


LinkBacks (?)
LinkBack to this Thread: http://www.thinkdigit.com/forum/tutorials/80661-gprs-over-linux-via-bluetooth.html
Posted By For Type Date
impostare cell come modem su linux - Telefonino.net Forum Post #0 Refback 17-05-2012 02:38 PM

Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet in Linux via Mobile GPRS thru Bluetooth Pathik Open Source 149 06-10-2008 06:47 AM
Bluetooth gprs connection JohnephSi Mobiles and Tablets 13 04-09-2007 06:06 PM
How to enable GPRS ? is PCI Bluetooth card available? hafees QnA (read only) 7 31-10-2005 03:42 AM
is bluetooth faster or GPRS? Mangal Pandey Mobiles and Tablets 7 15-08-2005 12:33 PM
Cellphone with GPRS/Bluetooth? aliasghark Mobiles and Tablets 14 08-09-2004 11:43 AM

 
Latest Threads
- by chris
- by icebags
- by Tenida

Advertisement




All times are GMT +5.5. The time now is 01:32 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2