# Bluetooth/cellphone connection error [fixed]

## Taki

wassup.

I have been trying to connect my sharp GX15 to my box using my bluetooth usb dongle. I followed the gentoo manual howto and the wiki howto and it seems everything is fine. The problem is I cannot seem to pair my ps with my phone using

 *Quote:*   

> # hcitool cc <btaddr>

 

I get the following error message:

 *Quote:*   

> cannot create connection: input/output error:

 

I even tried using rfcomm to create a device node to rfcomm0 but I get:

 *Quote:*   

> no route to host

 

or something to thst effect.

The thing is, I use my phone as a gprs modem and it work fine in windows. Every time i wan't  emerge stuff i must first download it in windows. The is also the erritating little programmes in windows that are forever waisting bandwidth.

help please!  :Sad: 

----------

## jomen

Hi!

I had a similar problem just until yesterday - and was also about to ask here - but got it solved now.

Maybe this will help you...

Apparently there can be only one (as always...) - 

Bluetooth-Adaptor-Name -- Bluetooth-Adaptor-Address combination be stored in the Phone.

In linux, the Name for the BT-adaptor is stored in /etc/bluetooth/hcid.conf - the standard name there

is "BlueZ (%d)"

In Windows this same adaptor gets a different name (some crypticletter combination),

when going with the defaults, that you get offered while naming and pairing your phone 

with the computer/BT-dongle...

If you paired it in Windows (with some name) - it will not work in Linux (where it gets another) then 

- and vice versa.

What I did was this:

I reset my phone (could not find a way to just erase the already paired BT-adaptor) - this might be 

different for you - I'm using a Motorola A835 and have no manuals - so I just reset the whole thing

It then has a standard (factory-set) name and no paired devices.

Next I erased the entrys in the bluetooth-subsystem, where my phone - (all the bluetooth-devices) - 

are stored by their name-address pair and the corresponding link-keys.

This is in: /var/lib/bluetooth/

Then I restarted the bluetooth-subsystem: /etc/init.d/bluetooth restart

and paired them again - do this while in an X Session, because the standard pin-helper is /usr/bin/bluepin 

- which is an X-programm. There are other ways in case you are not in X 

(there is a pin-helper in /etc/bluetooth/pin-helper - which can be used to do it whithout X 

or any interaction on your part)

I have not doube-checked this by going back to windows and giving my BT-adaptor the same name as in Linux,

but I'm happy that it is working now - was using Windows only to do research on the issue - 

but I'm quite sure that was causing these problems

This is what a failed attempt to connect to the phone looks like in the logs 

- when when the link-keys dont match (caused by name-adress combination as described above)

Jan  6 00:34:43 sam pppd[9704]: pppd 2.4.2 started by root, uid 0

Jan  6 00:34:44 sam hcid[9455]: link_key_request (sba=00:02:72:B0:00:26, dba=00:0A:28:BA:AE:BD)

Jan  6 00:34:45 sam pppd[9704]: Failed to open /dev/rfcomm0: Permission denied

Jan  6 00:34:45 sam pppd[9704]: Exit.

btw: I used a diffrent procedure to get the devices paired (something like this):

hciconfig hci0 up

hcitool scan 00:0A:28:BA:AE:BD		this is the adress of my phone

sdptool search DUN			that was the point, where my phone wanted authentication

hope that helped you!

Cheers

----------

## Taki

You are the man.

I had been deleting the paired device profile from the phone every time I tried to connect. When I deleted all the files from /var/lib/bluetooth, it just started working magically.

All I need to do now is set up a gprs/umts modem via bluetooth and I will never have to see windows again.

Thank a Lot.  :Very Happy: 

----------

## jomen

Thanks for that...

glad I could help - after I had struggled to find out, there came the opportunity to share my new wisdom...

Cheers

edit: just in case setup of gprs/umts-modem should give trouble

I use wvdial to connect - here is the file /etc/wvdial.conf

```
[Dialer Defaults]

Modem = /dev/rfcomm0

Baud = 921600

Stupid Mode = 1

DialCommand = ATDT

Init1 = AT&FE0V1&D2&C1S0=0

Init2 = ATS7=60L0M1X3

Init3 = AT+CGDCONT=1,"IP","internet.eplus.de"

Phone = *99***1#

Username = eplus

Password = gprs
```

----------

