# Bluetooth -- no services, but hardware works

## pking

I have bluez-libs and bluez-utils installed, and bluetooth support set to run at startup. A check by ps -afux shows that hcid is running:

```
0:00 /usr/sbin/hcid -s -f /etc/bluetooth/hcid.conf
```

However, there is trouble nearby. For one thing, the output of hciconfig -a suggests that I have no services to speak of:

```
hci0:   Type: USB

        BD Address: 00:16:CE:F4:0C:06 ACL MTU: 1017:8 SCO MTU: 64:8

        UP RUNNING PSCAN

        RX bytes:1240 acl:0 sco:0 events:29 errors:0

        TX bytes:362 acl:0 sco:0 commands:29 errors:0

        Features: 0xff 0xff 0x8d 0xfe 0x9b 0xf9 0x00 0x80

        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3

        Link policy: RSWITCH HOLD SNIFF PARK

        Link mode: SLAVE ACCEPT

        Name: 'BlueZ (0)'

        Class: 0x08010c

        Service Classes: Capturing

        Device Class: Computer, Laptop

        HCI Ver: 2.0 (0x3) HCI Rev: 0x207e LMP Ver: 2.0 (0x3) LMP Subver: 0x4127

        Manufacturer: Broadcom Corporation (15)
```

Under "Service Classes" it lists only "Capturing" -- not "Network" or "File Transfer" or anything else. I tried changing the Local Device Class in /etc/bluetooth/hcid.conf to "class 0x0201c" (which should include networking). That does make hciconfig report "Networking" as a Service Class, but it has no other effect, and at the next restart of hcid it reverts to "Capturing" (and the Device Class is reported in /var/lib/bluetooth/ 00:16:CE:F4:0C:06/config as "class 0x8010c" again, disregarding the setting in /etc/bluetooth/hcid.conf.  Second, even more distressing is the output of hcid -n:

```
hcid[4772]: Bluetooth HCI daemon

hcid[4772]: Parsing /etc/bluetooth/main.conf failed: No such file or directory

hcid[4772]: Unable to get on D-Bus

```

Now /etc/bluetooth/main.conf seems to be what /etc/bluetooth/hcid.conf got renamed when the developers of the Bluez Stack got to version 4 (still not in stable Gentoo yet). Anyhow, other things seem to run fine. But I cannot get on D-Bus, or even know what I'm trying to do, really, when I'm trying to get on D-Bus. Well, put that on hold for the moment.

The surprising thing is that I can manage to connect via Bluetooth. Sort of.    :Question: 

Here's the scenario. A colleague with a MacBook (and a superior attitude) is next to me. I boot the laptop, run hcitool scan to find his computer, which works fine;

I can even get information via hcitool info <btaddr>, or sdptool browse <btaddr>.  His computer can see mine, too, though it reports that I'm offering no services.

Well, if I run hcitool cc <btaddr> we can pair the computers and even set up a link. Ditto with rfcomm. At least, his computer can authenticate to mine (it can

send me the bluetooth pin I put into /etc/bluetooth/hcid.conf). So there is a perfectly good hardware link established.  I can run l2ping between the computers

all day long.

And that's where it all stops. He can't send me anything via OBEX or whatever, since I have no Service Class for that, nor for networking, nor for anything much

else. A run of sdptool browse local turns up services for generic audio, advanced audio, AV remote, and AV target. But nothing useful.

What gives?

All of the relevant options (as far as I can tell) for running Bluetooth are rolled into my kernel. I have RTFM, which is out-of-date and not very useful.  I want to 

know what has gone wrong and why, not just to know what to click. The output of lsusb is not informative about the makeup of my bluetooth chip; since it's by Broadcom

and there are proprietary issues, I downloaded *all* of the Broadcom firmware (in Gentoo that's bluez-bluefw and bluez-firmware). No difference. Installed

openobex, ussb-push, and obex-data-server, not one of which comes with any kind of documentation, and none of which I could get to work. Spent more time than is

reasonable on the Bluez site, reading about dbus-send commands, none of which helped. I'm largely at my wit's end, but I can't shake the feeling that it's

*almost there*. Otherwise, how could the hardware links be working? All it needs is the right configuration. Maybe.

----------

## pking

Tonight I tried unmerging bluez-libs and bluez-utils, and unmasked enough packages to install bluez and blueman. But I couldn't get blueman to work at all, even after altering /etc/dbus-1/system.d/bluetooth.conf in line with the reports on bugzilla, whether trying to run blueman-applet or blueman-manager.  But again, I can't see why -- I can make and establish a link at the hardware level, so the hardware works; it must be something in the software or its configuration...

----------

