version 44, including all changes.
.
| Rev |
Author |
# |
Line |
| 39 |
ElroyLiddington |
1 |
!! Notes for getting USB Bluetooth setup on a Ubuntu 10.04.1 LTS Server Install |
| |
|
2 |
|
| |
|
3 |
|
| |
|
4 |
<br> |
| |
|
5 |
|
| |
|
6 |
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. |
| |
|
7 |
|
| |
|
8 |
|
| |
|
9 |
<br> |
| |
|
10 |
|
| |
|
11 |
! NOTE: All commands issued as 'root' user |
| |
|
12 |
|
| |
|
13 |
<br> |
| |
|
14 |
|
| |
|
15 |
! NOTE: BT is abbreviation for bluetooth, but not where it is needed for an actual command - full syntax will be used |
| |
|
16 |
|
| |
|
17 |
|
| |
|
18 |
<br> |
| |
|
19 |
|
| |
|
20 |
! 1. Install bluetooth drivers/config-files/etc |
| |
|
21 |
|
| 43 |
ElroyLiddington |
22 |
"apt-get install bluez bluez-utils btscanner bluez-hcidump libpam-blue obexpushd obexfs libobexftp0 obexftp ussp-push python-gobject python-dbus" |
| 39 |
ElroyLiddington |
23 |
|
| |
|
24 |
<br> |
| |
|
25 |
|
| |
|
26 |
! 2. Check to see if your USB Bluetooth Dongle is attached and recognised |
| |
|
27 |
|
| |
|
28 |
"lsusb" - should show 'Bus 004 Device 001: ID 1d6b:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)' |
| |
|
29 |
|
| |
|
30 |
<br> |
| |
|
31 |
|
| |
|
32 |
! 3. Once installed, restart bluetooth daemon - unsure if this is necessary - documentation I read suggested it was... |
| |
|
33 |
|
| |
|
34 |
"/etc/init.d/bluetooth restart" |
| |
|
35 |
|
| |
|
36 |
<br> |
| |
|
37 |
|
| |
|
38 |
! 4.0 Check to see if our BT adapter is installed and what its capabilities are |
| |
|
39 |
|
| |
|
40 |
"hciconfig -a" Should give something _similar_ to |
| |
|
41 |
|
| |
|
42 |
hci0: Type: USB <br> |
| |
|
43 |
BD Address: 00:10:60:32:3A:93 ACL MTU: 384:8 SCO MTU: 64:8<br> |
| |
|
44 |
UP RUNNING PSCAN<br> |
| |
|
45 |
RX bytes:6448 acl:0 sco:0 events:270 errors:0<br> |
| |
|
46 |
TX bytes:1309 acl:0 sco:0 commands:125 errors:0<br> |
| |
|
47 |
Features: 0xff 0xff 0x8f 0xfe 0x9b 0xf9 0x00 0x80<br> |
| |
|
48 |
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3<br> |
| |
|
49 |
Link policy: RSWITCH HOLD SNIFF PARK<br> |
| |
|
50 |
Link mode: SLAVE ACCEPT<br> |
| |
|
51 |
Name: 'xxxxxx-0' HostName removed for security reasons<br> |
| |
|
52 |
Class: 0x4a0100<br> |
| |
|
53 |
Service Classes: Networking, Capturing, Telephony<br> |
| |
|
54 |
Device Class: Computer, Uncategorized<br> |
| |
|
55 |
HCI Ver: 2.0 (0x3) HCI Rev: 0x7a6 LMP Ver: 2.0 (0x3) LMP Subver: 0x7a6<br> |
| |
|
56 |
Manufacturer: Cambridge Silicon Radio (10)<br> |
| |
|
57 |
|
| |
|
58 |
|
| |
|
59 |
! 4.1 Check our BT adapters hardware MAC Address and see if the bluez BT system has done any configuring with it |
| |
|
60 |
|
| |
|
61 |
|
| |
|
62 |
"hciconfig version" |
| |
|
63 |
|
| |
|
64 |
hci0: Type: USB<br> |
| |
|
65 |
BD Address: 00:10:60:32:3A:93 ACL MTU: 384:8 SCO MTU: 64:8<br> |
| |
|
66 |
UP RUNNING PSCAN <br> |
| |
|
67 |
RX bytes:961 acl:0 sco:0 events:27 errors:0<br> |
| |
|
68 |
TX bytes:361 acl:0 sco:0 commands:27 errors:0<br> |
| |
|
69 |
|
| |
|
70 |
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<br> |
| |
|
71 |
|
| |
|
72 |
|
| |
|
73 |
<br> |
| |
|
74 |
|
| |
|
75 |
! 5. Configure 'main.conf' in /etc/bluetooth - these appear to be the new location for BlueZ config |
| |
|
76 |
|
| |
|
77 |
'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<br> |
| |
|
78 |
Normally the default 'Name = %h-%d' uses your Computers HostName for the BT adapters name - recommend leaving as-is. |
| |
|
79 |
|
| |
|
80 |
<br> |
| |
|
81 |
|
| |
|
82 |
'Default device class'<br> |
| |
|
83 |
"0x4a0100"<br> |
| |
|
84 |
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 |
| |
|
85 |
|
| |
|
86 |
<br> |
| |
|
87 |
|
| |
|
88 |
! 5.1 Make your BT adapter discoverable when you do a BT search from other BT devices |
| |
|
89 |
|
| |
|
90 |
"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) |
| |
|
91 |
|
| |
|
92 |
|
| |
|
93 |
|
| |
|
94 |
|
| |
|
95 |
<br> |
| |
|
96 |
|
| |
|
97 |
! 6. "tail -f /var/log/daemon.log" - Constantly outputs any info from daemons (server processes eg dhcpd, bluetoothd, sambad) to screen |
| |
|
98 |
|
| |
|
99 |
|
| |
|
100 |
! 6.1 Stop the service called 'dbus' and 'bluetooth' - restart both making sure 'dbus' is started BEFORE 'bluetooth'<br> |
| |
|
101 |
|
| |
|
102 |
Do "/etc/init.d/bluetooth stop" and "/etc/init.d/dbus stop" and /etc/init.d/dbus start" and "/etc/init.d/bluetooth start"<br> |
| |
|
103 |
|
| |
|
104 |
|
| |
|
105 |
! 6.2 So far we have tried to do some configuring - now lets see if anything works |
| |
|
106 |
|
| |
|
107 |
Try to do a search for new devices 'Pair New Device' is what I tried on my cellphone. |
| |
|
108 |
|
| |
|
109 |
w00P! - I found my computer 'xxxxxx-0'<br> |
| |
|
110 |
|
| |
|
111 |
Doing the 'tail -f ...daemon.log' command, and trying to connect to my computer gives me<br> |
| |
|
112 |
|
| |
|
113 |
' |
| |
|
114 |
bluetoothd[8643]: pin_code_request (sba=00:10:60:32:3A:93, dba=00:18:0F:DE:98:8D)<br> |
| |
|
115 |
bluetoothd[8643]: No agent available for 0 request<br> |
| |
|
116 |
|
| |
|
117 |
'<br> |
| |
|
118 |
|
| |
|
119 |
|
| |
|
120 |
bluetoothd[8643]: pin_code_request (sba=00:10:60:32:3A:93, dba=00:18:0F:DE:98:8D) |
| |
|
121 |
Nov 7 18:54:12 bluetoothd[8643]: No agent available for 0 request |
| |
|
122 |
|
| |
|
123 |
|
| |
|
124 |
|
| |
|
125 |
<br> |
| |
|
126 |
|
| |
|
127 |
! 7. Unplugging, waiting a few seconds and then re-plugging my USB BT adapter |
| |
|
128 |
|
| |
|
129 |
bluetoothd[8154]: Adapter /org/bluez/8153/hci0 has been disabled<br> |
| |
|
130 |
bluetoothd[8154]: Stopping security manager 0<br> |
| |
|
131 |
bluetoothd[8154]: HCI dev 0 unregistered<br> |
| |
|
132 |
bluetoothd[8154]: Unregister path: /org/bluez/8153/hci0<br> |
| |
|
133 |
bluetoothd[8154]: HCI dev 0 registered<br> |
| |
|
134 |
bluetoothd[8154]: HCI dev 0 up<br> |
| |
|
135 |
bluetoothd[8154]: Starting security manager 0<br> |
| |
|
136 |
bluetoothd[8154]: Adapter /org/bluez/8153/hci0 has been enabled<br> |
| |
|
137 |
|
| |
|
138 |
|
| |
|
139 |
<br> |
| |
|
140 |
|
| |
|
141 |
! 8. |
| |
|
142 |
|
| |
|
143 |
<br> |
| |
|
144 |
|
| |
|
145 |
! 9. |
| |
|
146 |
|
| |
|
147 |
|
| |
|
148 |
<br> |
| |
|
149 |
! Misc notes to self |
| |
|
150 |
|
| |
|
151 |
'bluetoothd' is the bluetooth daemon - config files are located in '/etc/default/bluetooth' - this appears to be where BT mice/keyboards are configured. |
| |
|
152 |
|
| |
|
153 |
<br> |
| |
|
154 |
|
| |
|
155 |
Check man page for 'bluetooth-agent' and what it does |
| |
|
156 |
|
| |
|
157 |
|
| |
|
158 |
<br> |
| |
|
159 |
|
| |
|
160 |
Unsure of how the BTd is activated to be ON as a service full-time. |
| |
|
161 |
|
| |
|
162 |
|
| |
|
163 |
<br> |
| |
|
164 |
|
| |
|
165 |
'/var/lib/bluetooth/device-MAC???-address/linkkeys' appears to be the folder (and file 'linkkeys') where the devices 'Pairing' key or 'linkkey' is kept... |
| |
|
166 |
|
| |
|
167 |
<br> |
| |
|
168 |
|
| |
|
169 |
Check out the scripts "./simple-agent" (dot-slash to execute) hidden in '/usr/share/doc/bluez/examples/' |
| |
|
170 |
|
| |
|
171 |
<br> |
| |
|
172 |
|
| |
|
173 |
Appears to be a 'libpam-blue' module under Apt/Dpkg for authenticating Bluetooth devices... ref: PAM |
| |
|
174 |
|
| |
|
175 |
<br> |
| |
|
176 |
|
| |
|
177 |
|
| |
|
178 |
! Helpful Links |
| |
|
179 |
|
| |
|
180 |
http://www.ubuntugeek.com/howto-setup-bluetooth-keyboard-and-mouse-in-ubuntu.html |
| |
|
181 |
|
| |
|
182 |
<br> |
| |
|
183 |
|
| |
|
184 |
|
| |
|
185 |
https://help.ubuntu.com/community/BluetoothSetup |
| |
|
186 |
|
| |
|
187 |
<br> |
| |
|
188 |
|
| |
|
189 |
|
| |
|
190 |
http://www.linuxquestions.org/questions/debian-26/bluetooth-problems-715839/ |
| |
|
191 |
|
| |
|
192 |
<br> |
| |
|
193 |
|
| |
|
194 |
http://digitalcommons.calpoly.edu/cpesp/20/ - Click on 'Download' for more info on what she was researching |
| 44 |
ElroyLiddington |
195 |
|
| |
|
196 |
|
| |
|
197 |
<br> |
| |
|
198 |
|
| |
|
199 |
|
| |
|
200 |
https://wiki.archlinux.org/index.php/Bluetooth |
| |
|
201 |
|
| 39 |
ElroyLiddington |
202 |
|
| |
|
203 |
<br> |
| |
|
204 |
|
| |
|
205 |
|
| |
|
206 |
---- |
| |
|
207 |
|
| |
|
208 |
BlueTooth |