[Ubuntu-BD] connect via bluetooth
Murtoza
murtoza at gmail.com
Thu Aug 13 09:10:42 BST 2009
To configure internet in ubuntu via bluetooth, make sure the bluetooth
device is connected in pc and bluetooth is already turned on in your mobile.
Then open the terminal in ubuntu and do the followings.
First scan for your phone, does Ubuntu detect your phone or not via
bluetooth. It may ask your passwords.
sudo hcitool scan
It should give result like following :
Scanning ...
00:11:34:BO:EE:FF gp
Here *00:11:34:BO:EE:FF* is the Phone's address. It is different according
to mobile. Yours must be different. And gp is the phone name.
Now copy the phone's address and edit etc/bluetooth/rfcomm.conf file.
sudo gedit /etc/bluetooth/rfcomm.conf
Make the file as follows. Just delete the *ADDRESS_OF_YOUR_PHONE* and paste
the phone's address here.
rfcomm0 {
device ADDRESS_OF_YOUR_PHONE; # You should paste the phone's address here.
channel 1;
comment "Write the phone name";
}
Now run the following two commands in terminal.
sudo sdptool add --channel=1 OPUSH
sudo rfcomm bind /dev/rfcomm0 ADDRESS_OF_YOUR_PHONE 1
Now open the /etc/bluetooth/hcid.conf file.
sudo gedit /etc/bluetooth/hcid.conf
Make the file as follows.
options {
autoinit yes;
security auto;
pairing multi;
passkey "1234";
}
device {
name "%h-%d";
class 0x000100;
iscan enable; pscan enable;
discovto 0;
lm accept;
lp rswitch,hold,sniff,park;
}
Now run the following command. It will create a new file named gpinternet in
/etc/ppp/peers location.
sudo gedit /etc/ppp/peers/gpinternet
Make the file as follows.
/dev/rfcomm0 460800 connect '/usr/sbin/chat -v -f /etc/ppp/chat-gpinternet'
crtscts
modem -detach
noccp
defaultroute
usepeerdns
noauth
ipcp-accept-remote
ipcp-accept-local
noipdefault
Then create another file named chat-gpinternet in the /etc/ppp location.
sudo gedit /etc/ppp/chat-gpinternet
And make the file as follows.
'' ATZ OK AT+CGDCONT=1,"IP","gpinternet"
OK "ATD*99***1#"
CONNECT ''
This the configuration file according to your mobile operator. here
gpinternet is the access point and *99***1# is the phone number. This
configuration will only work for the mobile operator "Grameen Phone" of
Bangladesh. If you are using another operator then you have to take the
access point and phone number form the mobile operator.
Every thing is done. Now just run the following command to connect internet
via bluetooth by mobile.
*sudo pppd call gpinternet*
For first time, you need to give pass key both in mobile and pc. Now enjoy
internet.
Every time you wanna connect to internet after reboot the pc, you need to
run the command *sudo pppd call gpinternet* in terminal.
you may also need the following command to reconnect in internet
*sudo rfcomm bind /dev/rfcomm0 ADDRESS_OF_YOUR_PHONE 1*
On Thu, Aug 13, 2009 at 2:54 PM, saeed ahmed <saeed.sas at gmail.com> wrote:
> thanks lenin vai.
>
> i know that for connecting internet via bluetooth. may be you do not
> understand my question. actually may be its for my bad english.
> anyway, let me explain this,
>
> suppose a machine where only one os is running and that is ubuntu. now want
> to connect internet with a nokia bluetooth modem. the modem never detected
> by the machine. so now whats happened? and whats need to do for this
> situations.
>
> i tried this but the modem can't connected. its connected if i first
> connect
> the modem on windows by pc suite in the machine.
>
>
> main thing is i want connect the internet with the phone modem without help
> of windows.
>
> if you try to connect via bluetooth first time on ubuntu then you find this
> kind of error
>
> sudo wvdial
> –> WvDial: Internet dialer version 1.60
> –> Cannot open /dev/rfcomm0: Connection refused
> –> Cannot open /dev/rfcomm0: Connection refused
> –> Cannot open /dev/rfcomm0: Connection refused
>
>
> ----------------------------------------------
> Regards,
> saeed
> rajshahi
> http://saeed05.wordpress.com
> http://twitter.com/saeed05
> ----------------------------------------------
>
>
>
> You meant getting detected on Windows first then use on Linux? :|
> >
> > Well, my friend ferdous wrote an easy article on connecting to bluetooth
> > with Nokia E63 visit his blog at www.dynamicguy.com
> > --
> > Ubuntu Bangladesh | http://ubuntu-bd.org
> > ubuntu-bd at lists.ubuntu.com
> > https://lists.ubuntu.com/mailman/listinfo/ubuntu-bd
> >
> --
> Ubuntu Bangladesh | http://ubuntu-bd.org
> ubuntu-bd at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-bd
>
--
... মুর্তজা ...
S. M. Murtoza Habib
Research Programmer
Center for Research on Bangla Language Processing (CRBLP)
BRAC University
Dhaka, Bangladesh
More information about the ubuntu-bd
mailing list