Penguin
Note: You are viewing an old revision of this page. View the current version.

Notes for getting USB Bluetooth setup on a Ubuntu 10.04.1 LTS Server Install


The aim is to be able to dump files from cellphone to server via bluetooth (without any direct Server access required), then access sent files over the ethernet network via a secondary computer for sorting/renaming etc to correct folder.


NOTE: All commands issued as 'root' user


NOTE: BT is abbreviation for bluetooth, but not where it is needed for an actual command - full syntax will be used


1. Install bluetooth drivers/config-files/etc

"apt-get install bluez bluez-utils btscanner bluez-hcidump libpam-blue"


2. Check to see if your USB Bluetooth Dongle is attached and recognised

"lsusb" - should show 'Bus 004 Device 001: ID 1d6b:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)'


3. Once installed, restart bluetooth daemon - unsure if this is necessary - documentation I read suggested it was...

"/etc/init.d/bluetooth restart"


4.0 Check to see if our BT adapter is installed and what its capabilities are

"hciconfig -a" Should give something similar to

hci0: Type: USB
BD Address: 00:10:60:32:3A:93 ACL MTU: 384:8 SCO MTU: 64:8
UP RUNNING PSCAN
RX bytes:6448 acl:0 sco:0 events:270 errors:0
TX bytes:1309 acl:0 sco:0 commands:125 errors:0
Features: 0xff 0xff 0x8f 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: 'xxxxxx-0' HostName removed for security reasons
Class: 0x4a0100
Service Classes: Networking, Capturing, Telephony
Device Class: Computer, Uncategorized
HCI Ver: 2.0 (0x3) HCI Rev: 0x7a6 LMP Ver: 2.0 (0x3) LMP Subver: 0x7a6
Manufacturer: Cambridge Silicon Radio (10)

4.1 Check our BT adapters hardware MAC Address and see if the bluez BT system has done any configuring with it

"hciconfig version"

hci0: Type: USB

BD Address: 00:10:60:32:3A:93 ACL MTU: 384:8 SCO MTU: 64:8
UP RUNNING PSCAN
RX bytes:961 acl:0 sco:0 events:27 errors:0
TX bytes:361 acl:0 sco:0 commands:27 errors:0

Check in /var/lib/bluetooth/00:10:60:32:3A:93 NOTE These numbers/colons constitute a MAC Address - note the fact that the MAC address is the same in 4.1 as it is in 4.0


5. Configure 'main.conf' in /etc/bluetooth - these appear to be the new location for BlueZ config

'Default adapter name' is used to label your BT adapter, so when you do a BT search on other BT devices, this is the name your Computer shows up as
Normally the default 'Name = %h-%d' uses your Computers HostName for the BT adapters name - recommend leaving as-is.


'Default device class'
"0x4a0100"
NOTE: this is from what "hciconfig -a" gave us - find 'Class' and copy the similar 0x0xxxx hex? code into your main.conf - my main.conf had 0x000100 as the default value


5.1 Make your BT adapter discoverable when you do a BT search from other BT devices

"hciconfig hci0 piscan" - Check back to 'hciconfig' command - note it has a 'UP RUNNING PSCAN' section in it - re-run the (hciconfig) command, note it now has 'UP RUNNING PSCAN ISCAN ' in it - this must be what makes the BT adapter discoverable (i.e. viewable)


6. "tail -f /var/log/daemon.log" - Constantly outputs any info from daemons (server processes eg dhcpd, bluetoothd, sambad) to screen

6.1 Stop the service called 'dbus' and 'bluetooth' - restart both making sure 'dbus' is started BEFORE 'bluetooth'

Do "/etc/init.d/bluetooth stop" and "/etc/init.d/dbus stop" and /etc/init.d/dbus start" and "/etc/init.d/bluetooth start"

6.2 So far we have tried to do some configuring - now lets see if anything works

Try to do a search for new devices 'Pair New Device' is what I tried on my cellphone.

w00P! - I found my computer 'xxxxxx-0'

Doing the 'tail -f ...daemon.log' command, and trying to connect to my computer gives me

' bluetoothd8643?: pin_code_request (sba=00:10:60:32:3A:93, dba=00:18:0F:DE:98:8D)
bluetoothd8643?: No agent available for 0 request

'

bluetoothd8643?: pin_code_request (sba=00:10:60:32:3A:93, dba=00:18:0F:DE:98:8D)

Nov 7 18:54:12 bluetoothd8643?: No agent available for 0 request


7. Unplugging, waiting a few seconds and then re-plugging my USB BT adapter

bluetoothd8154?: Adapter /org/bluez/8153/hci0 has been disabled
bluetoothd8154?: Stopping security manager 0
bluetoothd8154?: HCI dev 0 unregistered
bluetoothd8154?: Unregister path: /org/bluez/8153/hci0
bluetoothd8154?: HCI dev 0 registered
bluetoothd8154?: HCI dev 0 up
bluetoothd8154?: Starting security manager 0
bluetoothd8154?: Adapter /org/bluez/8153/hci0 has been enabled


8.


9.


Misc notes to self

'bluetoothd' is the bluetooth daemon - config files are located in '/etc/default/bluetooth' - this appears to be where BT mice/keyboards are configured.


Check man page for 'bluetooth-agent' and what it does


Unsure of how the BTd is activated to be ON as a service full-time.


'/var/lib/bluetooth/device-MAC???-address/linkkeys' appears to be the folder (and file 'linkkeys') where the devices 'Pairing' key or 'linkkey' is kept...


Check out the scripts "./simple-agent" (dot-slash to execute) hidden in '/usr/share/doc/bluez/examples/'


Appears to be a 'libpam-blue' module under Apt/Dpkg for authenticating Bluetooth devices... ref: PAM


Helpful Links

http://www.ubuntugeek.com/howto-setup-bluetooth-keyboard-and-mouse-in-ubuntu.html


https://help.ubuntu.com/community/BluetoothSetup


http://www.linuxquestions.org/questions/debian-26/bluetooth-problems-715839/


http://digitalcommons.calpoly.edu/cpesp/20/ - Click on 'Download' for more info on what she was researching



BlueTooth

lib/BlockParser.php:505: Notice: Undefined property: _tight_top