# Bluetooth in Ubuntu



## adit_sen (Aug 24, 2006)

Hi,

Ubuntu managed to dectect my bluetooth USB dongle without any problems, and following the instructions at *ubuntuforums.org/showthread.php?t=75978&highlight=kbluetoothd. It set up beautifully, and even deteced my phone. But when I try to connect to my phone I get a message 'Error: bluetooth pairing not allowed'.

Any help?

Cheers
Aditya


----------



## mehulved (Aug 24, 2006)

Try to pair from your phone. It will ask for pin on the computer.Enter the same pin on both. 
PS - I have observed, at least on my PC, that the pin dialog box on my computer pops up in the background, so just minimise all the windows running, if you don't see the dialog box popping up.


----------



## adit_sen (Aug 25, 2006)

Well the pin does pop up for the phone, but not on the pc. All I get is the 'pairing not allowed' message. My guess would be I would have to enable pairing from somewhere in the settings on the comp. But how?


----------



## JGuru (Aug 25, 2006)

There is one package available for GNOME & KDE for bluetooth connectivity.
 Let me search & tell you. Please be patient.


----------



## adit_sen (Aug 25, 2006)

I've tried the gnome client. Its called 'Gnome Bluetooth'. But there isnt any config options available for that. There are no settings, no pairing etc. That way I do know that KDE client, kbluetoothd, works fine. It detects my phone properly, but its just that I cant seem to pair the two devices.


----------



## mehulved (Aug 25, 2006)

adit_sen did you try pairing from phone to the PC? I mean search, the PC from phone and then send pairing request from the phone.


----------



## adit_sen (Aug 25, 2006)

yeah. tried that too. it detects the pc, but nothin pops up in ubuntu to ask for the pin.


----------



## adit_sen (Sep 1, 2006)

anyone?? ANYONE??


----------



## mehulved (Sep 1, 2006)

Just check your /etc/bluetooth/hcid.conf. If the pin helper is 

```
pin_helper /usr/bin/pinwrapper
```
and that file exists in /usr/bin.
Or just for experimenting change security to none from auto in hcid.conf and see if that helps.


----------



## Yamaraj (Sep 1, 2006)

You may want to uncomment the lines in /etc/bluetooth/rfcomm.conf file.


----------



## mehulved (Sep 5, 2006)

Try if these commands work

```
sudo hcitool con <device address>
sudo hcitool auth <device address>
```


----------



## adit_sen (Sep 6, 2006)

Just an update. I checked the /etc/bluetooth/hcid.conf file and have set the pin_helper to /usr/bin/pinwrapper. The pinwrapper file also exists. Now like I said,  my phone is detected in ubuntu, but i just cant seem to pair it. I tried from the comp to send a file to the phone using OBEX file transfer in the bluetooth utilities. On doing so, on my phone i get a prompt to enter the pin (yay!!), but I don't know what the pin is!! I've tried the usual 1234 / 0000 etc but they are all rejected. Now the questin is, what is the pin?

cheers
aditya


----------



## JGuru (Sep 6, 2006)

@Adit Sen, you may read this.
 Contains Info on Bluetooth phone connection in Linux.
 Try *12345* as PIN number. Also you can disable PIN code query from the phone.
 You'll find the option for it in the Bluetooth menu, where connection pairings
 are listed.Selecting a connection gives another menu where you can select
 whether PIN code query is used for connection.


----------



## mehulved (Sep 6, 2006)

There's no such no. Just enter a pin on your computer then again enter the same on your cell. The pin should only be numbers, alphabets don't work.
Still if this does not work check the pin in /etc/bluetooth/pin and enter it in your phone.


----------



## adit_sen (Sep 6, 2006)

Hmm. Still no luck.
@JGuru: 12345 is not accepted. My phone does not support pairing without a pin, so that's also not an option

@tech: the /etc/bluetooth/pin file contains '1234'. But 1234 is not being accepted as a valid pin

cheers
aditya


----------



## sariq (Sep 6, 2006)

I deleted all paired devices on phone, searched new device, it found "ubuntu-0", i paired it from phone, it asked pin on phone, i entered 1234. Device was paired, no popup on pc during entire process.
No used following, Here is screenshot

```
aaa@ubuntu:~$ sudo hcitool cc 00:13:70:98:0E:4E
aaa@ubuntu:~$ sudo hcitool con 00:13:70:98:0E:4E
<ACL 00:13:70:98:0E:4E handle 1 state 1 lm MASTER
aaa@ubuntu:~$ hcitool auth 00:13:70:98:0E:4E
HCI authentication request failed: Operation not permitted
aaa@ubuntu:~$ sudo hcitool auth 00:13:70:98:0E:4E
Password:
aaa@ubuntu:~$
```
<edited> i have used actual address at terminal. replaced with <btaddr> for posting here. it doesnt do anything.
Hey! How can i edit rfcomm.conf file? It shows "you dont have permissions.,"


----------



## mehulved (Sep 6, 2006)

sariq you will have to replace <btaddr> with 00:13:70:98:0E:4E.


----------



## GNUrag (Sep 6, 2006)

sariq said:
			
		

> Hey! How can i edit rfcomm.conf file? It shows "you dont have permissions.,"




```
$ sudo gedit /etc/bluetooth/rfcomm.conf
```


----------

