Wednesday, October 2, 2013

Bluetooth USB Desktop with VOIP

I'm running as a guinea pig for the corporate office, helping to set up a software-based phone (no VoIP hardware).  That means that I needed to set up a wireless headseat, which forced an interaction with Bluetooth on my CentOS workstation.  I bought a Sabrent BT-USBT 2.0 adapter (small, which is good, you can find one on overstock.com's website).

I got the adapter fairly quickly, and plugged it into the workstation, and did an lsusb to see what I had :
    [username@hostname video]$ lsusb|grep -i bluetooth
    Bus 003 Device 040: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
    [username@hostname video]$
    
It looks like it's a re-badged device, but that also means that it it can communicate with the USB system.

In preparation, ensure you have the right tools for this :
    yum install bluez-alsa bluez bluez-compat
    
You will first need to enable the bluetooth services.  The first thing to do (before you forget) is to enable the bluetooth service at startup (the first command following this paragraph).  The second thing is to actually start the bluetooth service.  The commands :
    [root@hostname video]# chkconfig bluetooth on
    [root@hostname video]# service bluetooth start
    Enabling Bluetooth devices:
    [root@hostname video]#
    
Next, you will need to pair a device to your new bluetooth connection.  This is done fairly easily through the GUI (if you needed this faster than a crazed admin with a site down).  In gnome, click "System" from your menu, then "Preferences", then "Bluetooth". e.g. :


This should present a window with courses of action - a check box entitled "Make computer discoverable", and a button to "Set up new device".  The "Make computer discoverable" is to use the computer as the peripheral device, while the other will add a device to your computer.

For a bluetooth wireless device, click on "Set up new device".

However, I never work through the GUI unless it is imperative.  The tool for you command-line folks to use is "hcitool".  First, run an "hcitool scan" (to look for your device), followed by an "hcitool info" (get more information on the specific device) :
    [root@hostname video]# hcitool scan
    Scanning ...
     60:33:4B:07:15:49 appletv
     50:3D:E5:7D:62:FD CP-8945
    [root@hostname video]# hcitool info 60:33:4B:07:15:49
    Requesting information ...
     BD Address:  60:33:4B:07:15:49
     OUI Company: Apple, Inc. (60-33-4B)
     Device Name: appletv
     LMP Version: 2.1 (0x4) LMP Subversion: 0x422a
     Manufacturer: Broadcom Corporation (15)
     Features page 0: 0xff 0xff 0xcf 0xfe 0x9b 0xff 0x79 0x83
    ...snipped...
     Features page 1: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    [root@hostname video]#
    
This should give you most basic information, but to pair it up, simply run (where XX:XX:XX:XX:XX:XX is the device hardware address from above) :
    hidd --connect XX:XX:XX:XX:XX:XX
For example :
    [root@hostname video]# hidd --connect 60:33:4B:07:15:49
    [root@hostname video]#
And then you can configure the device as needed through the normal methods.

No comments:

Post a Comment