As you may recall, I am currently the owner of a Plantronics M510 Bluetooth headset. I also have a Cables Unlimited 100M Bluetooth dongle that I plug into my laptop and/or desktop. Tonight, I wanted to use the desktop to play audio through the dongle.
Hah…
I learned many things about BT on Linux and elsewhere. Unfortunately, none of them got me where I wanted to go.
Step 1: Get the BT dongle to work. Unfortunately, as I reported earlier, the dongle works only sporadic through a hub; my desktop box is located in a different room from my USB hub, and the hub is connected via a mini-USB cable, so it's awkward to direct connect. Besides, I only have two working USB HS ports. It turns out the issue is known, so it's not just me, but there's no known fix. I finally just gave up and got the hub out of the way for now.
Step 2: Get the headset and the dongle to pair. This requires pairing from the dongle side, since the headset has no real way to do it. There are a lot of HOWTOs out there about this. Unfortunately, they're all quite stale.
The biggest problem is how to get the headset PIN to hcid. Almost all HOWTOs refer to the "pin_helper" field of hcid.conf. Great idea, except that this field has been eliminated now. Further investigation reveals that the only way to communicate a PIN is via DBus: there is no pin helper program invocation anymore. A Debian user would then naturally try installing the bluez-pin package and invoking bluez-pin with the "--dbus" argument. Then they would find out that it doesn't work, and with persistence might find out why.
It turns out that the right solution is to
echo 0000 | /usr/lib/bluetooth/add-passkey 00:01:02:03:04:05 &
(with the obvious substitutions for PIN and MAC). It's so beautiful. Go ﺕ Linux. Now you can just use "hcitool cc 00:01:02:03:04:05" and "hcitool auth 00:01:02:03:04:05" as per normal.
Step 3: Get BT audio software going. Fortunately, btsco is an open source ALSA driver that talks to BT devices, with really nice documentation. It even worked for someone with my headset. It even has a Debian package.
Step 4: Try it. Had various results. The consistent one seemed to be crashing my headset. At this point, I decided to call it a night. I could think of 15 things to try, and zero I wanted to.
But hey, I learned some stuff. (B)