# Bluetooth - no route to host - rfcomm

## oniboy

I picked up a Buffalo BMH-B01S/SV [0a5c:200a] monaural headset yesterday, my first bluetooth dev   :Very Happy: 

I followed the "Gentoo Linux Bluetooth Guide" http://www.gentoo.org/doc/en/bluetooth-guide.xml and everything was going great, I got the kernel reconfigured & the modules loaded ok it seemed :

 *Quote:*   

> 
> 
> lsmod
> 
> Module                  Size  Used by
> ...

 

I emergeed bluez-libs ,bluez-utils and bluez-firmware.  Started & checked bluetooth :

 *Quote:*   

> 
> 
> /etc/init.d/bluetooth start
> 
> * Starting Bluetooth ...
> ...

 

Edited /etc/bluetooth/hcid.conf

 *Quote:*   

> 
> 
> #
> 
> # HCI daemon configuration file.
> ...

 

Edited /etc/bluetooth/pin. Restarted bluetooth & checked it was up & running ok

 *Quote:*   

> 
> 
> ps -ae | grep hcid
> 
> 29723 ?        00:00:00 hcid
> ...

 

Then I tried setting up rfcomm   :Sad:   I edited /etc/bluetooth/rfcomm.conf

 *Quote:*   

> 
> 
> #
> 
> # RFCOMM configuration file.
> ...

 

Then tried to connect :

 *Quote:*   

> 
> 
> rfcomm connect 0
> 
> Can't connect RFCOMM socket: No route to host
> ...

 

I also tried :

 *Quote:*   

> 
> 
> l2ping 00:10:60:B1:23:9E
> 
> Can't connect: No route to host
> ...

 

Anyone have any idea where ive gone wrong ? Thanks for any help or ideas you might have   :Smile: 

----------

## thesnowman

The bluetooth address in rfcomm.conf should be the address of the device you want to connect to, not your local device.

You can find the address of your headset by making it discoverable and the using

```
# hcitool scan
```

Once you have it's address then use l2ping to see if they can communicate.  Once you have confirmed they can talk to each other using l2ping then try and create a connection using hcitool:

```
# hcitool cc [bdaddr]
```

[bdaddr] should be the address of your headset as discovered by the scan with hcitool.

At this point the two devices should attempt to authenticate each other.  The pin in /etc/bluetooth/pin should match the one hardcoded to your headset.

When the two are paired you need to find the channel number on your headset that corresponds to the service you wish to connect to.  Use

```
# sdptool browse [bdaddr]
```

 to find all of the services provided by your headset.

Also have a look at this guide which should get you up and running:

https://forums.gentoo.org/viewtopic-t-238510-highlight-bluetooth+headset.html

----------

## oniboy

Thanks for the great reply thesnowman. Its helped a bit but im still not quite there. Maybe this isnt going to work    :Sad: 

If I hold down the power button until it enters what I think is the pairing mode then hcitool scan works:

```
> hcitool scan

Scanning ...

        00:10:60:0A:3C:90       BlueEar

```

hcitool inq also worked in that mode:

```
> hcitool inq

Inquiring ...

        00:10:60:0A:3C:90       clock offset: 0x0717    class: 0x200404

```

Then I tried l2ping which gave mixed results:

```
> l2ping 00:10:60:0A:3C:90

Can't connect: Connection timed out

 > l2ping 00:10:60:0A:3C:90

Can't connect: Function not implemented

```

So of course hcitool cc 00:10:60:0A:3C:90 failed too.

Any thoughts where I can go from here ?

----------

## thesnowman

Some devices won't reply to l2ping unless they are paired, maybe that's why your headset is not replying.

As hcitool cc is not working try hcitool auth which requests authentication.  Make sure you check the system log to see if the authentication request succeeds.

----------

## oniboy

I managed to get it to connect once despite not having seen the /etc/bluetooth/link_key file appear. I even got the alsa thing partly working ie. the device was selectable in xmms but when I tried to play some music it wouldnt work, although it sounded like something was comming throught the ear piece, like a faint carrier tone ( this was not a volume issue ) eventhough the time on the music file wasnt advancing.

Ive been using kbluetoothd, the one time I got it to kind of work there were services under the blueear device & the connection info window even showed signel strength. Now nothing. Everytime I try to connect I usualy get an LMP response timeout error reported by kbluetoothd.

So close yet so far ..... This seems to be a pairing issue but I have no idea what im doing wrong.....   :Crying or Very sad: 

----------

## thesnowman

 *oniboy wrote:*   

> I managed to get it to connect once despite not having seen the /etc/bluetooth/link_key file appear.

 

That file is no longer used.  Look in /var/lib/bluetooth/[bdaddr]/linkkeys where [bdaddr] is the address of your bluetooth adapter.

Your not using your headset with a phone as well are you?  I've found that my headset only likes being paired with one device at a time.  So if I've been using it with my phone I then have to re-pair it with my PC to be able to use it.  It was too much of a pain so I just bought a USB headset which is a LOT less hassle.  Not wireless of course though...  Keep trying - you'll get there.

----------

