TECOM BT3033A. Problem Solved!
Hugo D. Valentim
hvalentim at gmx.net
Wed Nov 17 20:30:52 PST 2004
Recapitulating the problem and the solution, for future reference.
THE PROBLEM:
I first complained because when I plugged my bluetooth dongle (wishing to
connect to a mobile phone) the OS assumed it to be a usb/bluetooth keyboard;
created a /dev/uskbo and assigned it to be the console keyboard, thus leaving
me with no way to type.
THE HARDWARE:
I am using a TECOM BT3033A dongle with a Compaq Presario 1215EA (it has two
USB plugs, the first has the dongle, the second a USB a4Tech mouse - but the
mouse part is relevant for the issue). The mobile phone is a SonyEricsson
K700i. I am running FBSD 5.3-release.
<http://www.tecomproduct.com/bt3033a.htm>
THE SOLUTION:
A - Following Maksim's suggestion, I commented out the following lines
from /etc/dev.conf
# When a USB keyboard arrives, attach it as the console keyboard
# attach 100 {
# device-name "ukbd0";
# action "test -c /dev/kbd1 && kbdcontrol -k /dev/kbd1 < /dev/console";
# };
# detach 100 {
# device-name "ukbd0";
# action "kbdcontrol -k /dev/kbd0 < /dev/console";
# };
B - Now, with ng_ubt_load="YES" in /boot/load.conf I get at startup the info
bellow (the following devs are created: ukbd0, kb1, ums0, ums1. ukbd0, kb1
and ums1 dissapear as soon as I type «/etc/rc.bluetooth start ubt0». As far
as I can understand this means a bluetooth mouse and or bluetooth keyboard
could work if I had them); since the ukbd0 is no longer automatically
assigned as console keyboard (step A) my problem dissapeared:
Nov 18 01:55:35 kernel: uhci0: <VIA 83C572 USB controller> port 0x1800-0x181f
irq 5 at device 7.2 on pci0
Nov 18 01:55:35 kernel: uhci0: [GIANT-LOCKED]
Nov 18 01:55:35 kernel: usb0: <VIA 83C572 USB controller> on uhci0
Nov 18 01:55:35 kernel: usb0: USB revision 1.0
Nov 18 01:55:35 kernel: uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00,
addr 1
Nov 18 01:55:35 kernel: uhub0: 2 ports with 2 removable, self powered
Nov 18 01:55:35 kernel: ums0: A4Tech USB Optical Mouse, rev 1.10/0.01, addr
2, iclass 3/1
Nov 18 01:55:35 kernel: ums0: 7 buttons and Z dir.
Nov 18 01:55:35 kernel: uhub1: Broadcom product 0x3535, class 9/0, rev
2.00/1.00, addr 3
Nov 18 01:55:35 kernel: uhub1: 3 ports with 0 removable, bus powered
Nov 18 01:55:35 kernel: ubt0: Broadcom Corp Bluetooth Transceiver, rev
1.10/1.00, addr 4
Nov 18 01:55:35 kernel: ubt0: Broadcom Corp Bluetooth Transceiver, rev
1.10/1.00, addr 4
Nov 18 01:55:35 kernel: ubt0: Interface 0 endpoints: interrupt=0x81,
bulk-in=0x82, bulk-out=0x2
Nov 18 01:55:35 kernel: ubt0: Interface 1 (alt.config 4) endpoints:
isoc-in=0x83, isoc-out=0x3; wMaxPacketSize=64; nframes=5, buffer size=320
Nov 18 01:55:35 kernel: ukbd0: Broadcom product 0x0099, rev 1.10/1.00, addr
5, iclass 3/1
Nov 18 01:55:35 kernel: kbd1 at ukbd0
Nov 18 01:55:35 kernel: ums1: Broadcom product 0x0097, rev 1.10/1.00, addr 6,
iclass 3/1
Nov 18 01:55:35 kernel: ums1: 3 buttons
C - usbdevs -v -d shows:
Controller /dev/usb0:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000),
VIA(0x0000),rev 1.00
uhub0
port 1 addr 2: low speed, power 100 mA, config 1, USB Optical Mouse(0x0006),
A4Tech(0x09da), rev 0.01
ums0
port 2 addr 3: full speed, power 100 mA, config 1, product 0x3535(0x3535),
Broadcom(0x0a5c), rev 1.00
uhub1
port 1 addr 4: full speed, self powered, config 1, Bluetooth
Transceiver(0x200a), Broadcom Corp(0x0a5c), rev 1.00
ubt0
port 2 addr 5: full speed, self powered, config 1, product 0x0099(0x0099),
Broadcom(0x0a5c), rev 1.00
ukbd0
port 3 addr 6: full speed, self powered, config 1, product 0x0097(0x0097),
Broadcom(0x0a5c), rev 1.00
ums1
AFTER «/etc/rc.bluetooth start ubt0» that TURNS INTO:
Controller /dev/usb0:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000),
VIA(0x0000),rev 1.00
uhub0
port 1 addr 2: low speed, power 100 mA, config 1, USB Optical Mouse(0x0006),
A4Tech(0x09da), rev 0.01
ums0
port 2 addr 3: full speed, power 100 mA, config 1, product 0x3535(0x3535),
Broadcom(0x0a5c), rev 1.00
uhub1
port 1 addr 4: full speed, self powered, config 1, Bluetooth
Transceiver(0x200a), Broadcom Corp(0x0a5c), rev 1.00
ubt0
port 2 powered
port 3 powered
*********************************
Just for the sake of argument and because eventually it might be helpful to
someone, this is what I did next following the instructions found here:
<http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-bluetooth.html>
and here:
<http://www.oook.cz/bsd/bluetooth.html>
*********************************
D - Started the stack and found my dongle address to be 00:03:c9:34:d1:f5:
# /etc/rc.bluetooth start ubt0
BD_ADDR: 00:03:c9:34:d1:f5
Features: 0xff 0xff 0xd 0x38 0x8 0x8 00 00
<3-Slot> <5-Slot> <Encryption> <Slot offset>
<Timing accuracy> <Switch> <Hold mode> <Sniff mode>
<Park mode> <RSSI> <Channel quality> <SCO link>
<HV2 packets> <HV3 packets> <u-law log> <A-law log> <CVSD>
<Power control> <Transparent SCO data>
Max. ACL packet size: 377 bytes
Number of ACL packets: 10
Max. SCO packet size: 16 bytes
Number of SCO packets: 0
E - With bluetooth on on the mobile, set to be in «receptive mode»,
I found the mobile phone address to be 00:0e:07:e4:55:f7:
# hccontrol -n ubt0hci inquiry
Inquiry result, num_responses=1
Inquiry result #0
BD_ADDR: 00:0e:07:e4:55:f7
Page Scan Rep. Mode: 0x1
Page Scan Period Mode: 00
Page Scan Mode: 00
Class: 52:02:04
Clock offset: 0x4756
Inquiry complete. Status: No error [00]
F - Checked that the PC was able to get the name the phone was reporting
# hccontrol -n ubt0hci remote_name_request 00:0e:07:e4:55:f7
BD_ADDR: 00:0e:07:e4:55:f7
Name: K700i
G - Checked that the PC was able to connect to the mobile
# hccontrol -n ubt0hci create_connection 00:0e:07:e4:55:f7
BD_ADDR: 00:0e:07:e4:55:f7
Connection handle: 6
Encryption mode: Disabled [0]
H - Checked that the connection was properly listed
# hccontrol -n ubt0hci read_connection_list
Remote BD_ADDR Handle Type Mode Role Encrypt Pending Queue State
00:0e:07:e4:55:f7 6 ACL 0 MAST NONE 0 0 OPEN
I - Tested the quality of the connection
# hccontrol -n ubt0hci get_link_quality 6
Connection handle: 6
Link quality: 255
F - Checked the PC was able to terminate the connection
# hccontrol -n ubt0hci disconnect 6
Connection handle: 6
Reason: Connection terminated by local host [0x16]
G - Pinged the phone just for the sake of it.
# l2ping -a 00:0e:07:e4:55:f7
0 bytes from 00:0e:07:e4:55:f7 seq_no=0 time=30164.356 ms result=0x22
0 bytes from 00:0e:07:e4:55:f7 seq_no=1 time=5142.148 ms result=0x4
0 bytes from 00:0e:07:e4:55:f7 seq_no=2 time=2678.448 ms result=0
0 bytes from 00:0e:07:e4:55:f7 seq_no=3 time=23.042 ms result=0
0 bytes from 00:0e:07:e4:55:f7 seq_no=4 time=21.016 ms result=0
0 bytes from 00:0e:07:e4:55:f7 seq_no=5 time=19.766 ms result=0
0 bytes from 00:0e:07:e4:55:f7 seq_no=6 time=27.627 ms result=0
0 bytes from 00:0e:07:e4:55:f7 seq_no=7 time=27.354 ms result=0
0 bytes from 00:0e:07:e4:55:f7 seq_no=8 time=21.189 ms result=0
0 bytes from 00:0e:07:e4:55:f7 seq_no=9 time=20.949 ms result=0
0 bytes from 00:0e:07:e4:55:f7 seq_no=10 time=19.870 ms result=0
H - I then made sure the addresses were translated to easier to use names by
editing:
/etc/bluetooth/hosts
00:03:c9:34:d1:f5 PCNAME # Localhost
00:0e:07:e4:55:f7 K700i # K700i
I - And made sure hcsecd would know about the phone
/etc/bluetooth/hcsecd.conf
device {
bdaddr 00:0e:07:e4:55:f7;
name "K700i";
key nokey;
pin "1234";
}
J - Started hcsecd with «verbose» mode in console
# hcsecd -d
K - I then paired the devices (from phone). The following info showed up:
hcsecd[1406]: Got PIN_Code_Request event from 'ubt0hci', remote bdaddr
00:0e:07:e4:55:f7
hcsecd[1406]: Found matching entry, remote bdaddr 00:0e:07:e4:55:f7, name
'K700i', PIN code exists
hcsecd[1406]: Sending PIN_Code_Reply to 'ubt0hci' for remote bdaddr
00:0e:07:e4:55:f7
hcsecd[1406]: Got Link_Key_Notification event from 'ubt0hci', remote bdaddr
00:0e:07:e4:55:f7
hcsecd[1406]: Updating link key for the entry, remote bdaddr
00:0e:07:e4:55:f7,name 'K700i', link key exists
I - The phone shows the PC reporting Push Object support.
J - Finaly I checked the services available in the phone from the PC:
# sdpcontrol -a K700i browse
Record Handle: 0x00010000
Service Class ID List:
Dial-Up Networking (0x1103)
Generic Networking (0x1201)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 1
Bluetooth Profile Descriptor List:
Dial-Up Networking (0x1103) ver. 1.0
Record Handle: 0x00010002
Service Class ID List:
Headset Audio Gateway (0x1112)
Generic Audio (0x1203)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 4
Bluetooth Profile Descriptor List:
Headset (0x1108) ver. 1.0
Record Handle: 0x00010003
Service Class ID List:
Serial Port (0x1101)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 2
Record Handle: 0x00010004
Service Class ID List:
Serial Port (0x1101)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 3
Record Handle: 0x00010005
Service Class ID List:
OBEX Object Push (0x1105)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 6
OBEX (0x0008)
Bluetooth Profile Descriptor List:
OBEX Object Push (0x1105) ver. 1.0
Record Handle: 0x00010006
Service Class ID List:
IrMC Sync (0x1104)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 8
OBEX (0x0008)
Bluetooth Profile Descriptor List:
IrMC Sync (0x1104) ver. 1.0
Record Handle: 0x0001000a
Service Class ID List:
Imaging Responder (0x111b)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 9
OBEX (0x0008)
Bluetooth Profile Descriptor List:
Imaging (0x111a) ver. 1.0
Record Handle: 0x0001000d
Service Class ID List:
OBEX File Transfer (0x1106)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 7
OBEX (0x0008)
Bluetooth Profile Descriptor List:
OBEX File Transfer (0x1106) ver. 1.0
Record Handle: 0x0001000e
Service Class ID List:
Handsfree Audio Gateway (0x111f)
Generic Audio (0x1203)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 5
Bluetooth Profile Descriptor List:
Handsfree (0x111e) ver. 1.1
Record Handle: 0x00010018
Service Class ID List:
0xee000058-0002-8000-1000-000000000002
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 15
OBEX (0x0008)
Record Handle: 0x0001001b
Service Class ID List:
PNP Information (0x1200)
Record Handle: 0x0001001c
Service Class ID List:
Human Interface Device (0x1124)
Protocol Descriptor List:
L2CAP (0x0100)
Protocol specific parameter #1: u/int/uuid16 17
HIDP (0x0011)
Bluetooth Profile Descriptor List:
Human Interface Device (0x1124) ver. 1.0
I have yet to try the rest of the stuff.
*****************************************************************
EXTRA INFO (shown at boot time with different scenarios):
*****************************************************************
I - With NO ng_ubt_load="YES" in /boot/load.conf and with USB mouse plugged
in:
Nov 18 00:52:56 kernel: uhci0: <VIA 83C572 USB controller> port 0x1800-0x181f
irq 5 at device 7.2 on pci0
Nov 18 00:52:56 kernel: uhci0: [GIANT-LOCKED]
Nov 18 00:52:56 kernel: usb0: <VIA 83C572 USB controller> on uhci0
Nov 18 00:52:56 kernel: usb0: USB revision 1.0
Nov 18 00:52:56 kernel: uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00,
addr 1
Nov 18 00:52:56 kernel: uhub0: 2 ports with 2 removable, self powered
Nov 18 00:52:56 kernel: ums0: A4Tech USB Optical Mouse, rev 1.10/0.01, addr
2, iclass 3/1
Nov 18 00:52:56 kernel: ums0: 7 buttons and Z dir.
Nov 18 00:52:56 kernel: uhub1: Broadcom product 0x3535, class 9/0, rev
2.00/1.00, addr 3
Nov 18 00:52:56 kernel: uhub1: 3 ports with 0 removable, bus powered
Nov 18 00:52:56 kernel: ugen0: Broadcom Corp Bluetooth Transceiver, rev
1.10/1.00, addr 4
Nov 18 00:52:56 kernel: ukbd0: Broadcom product 0x0099, rev 1.10/1.00, addr
5, iclass 3/1
Nov 18 00:52:56 kernel: kbd1 at ukbd0
Nov 18 00:52:56 kernel: ums1: Broadcom product 0x0097, rev 1.10/1.00, addr 6,
iclass 3/1
Nov 18 00:52:56 kernel: ums1: 3 buttons
II - With NO ng_ubt_load="YES" in /boot/load.conf and no USB mouse plugged in
Nov 18 01:09:31 kernel: uhci0: <VIA 83C572 USB controller> port 0x1800-0x181f
irq 5 at device 7.2 on pci0
Nov 18 01:09:31 kernel: uhci0: [GIANT-LOCKED]
Nov 18 01:09:31 kernel: usb0: <VIA 83C572 USB controller> on uhci0
Nov 18 01:09:31 kernel: usb0: USB revision 1.0
Nov 18 01:09:31 kernel: uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00,
addr 1
Nov 18 01:09:31 kernel: uhub0: 2 ports with 2 removable, self powered
Nov 18 01:09:31 kernel: uhub1: Broadcom product 0x3535, class 9/0, rev
2.00/1.00, addr 2
Nov 18 01:09:31 kernel: uhub1: 3 ports with 0 removable, bus powered
Nov 18 01:09:31 kernel: ugen0: Broadcom Corp Bluetooth Transceiver, rev
1.10/1.00, addr 3
Nov 18 01:09:31 kernel: ukbd0: Broadcom product 0x0099, rev 1.10/1.00, addr
4, iclass 3/1
Nov 18 01:09:31 kernel: kbd1 at ukbd0
Nov 18 01:09:31 kernel: ums0: Broadcom product 0x0097, rev 1.10/1.00, addr 5,
iclass 3/1
com product 0x3535, class 9/0, rev 2.00/1.00, addr 2
Nov 18 01:09:31 kernel: uhub1: 3 ports with 0 removable, bus powered
Nov 18 01:09:31 kernel: ugen0: Broadcom Corp Bluetooth Transceiver, rev
1.10/1.00, addr 3
Nov 18 01:09:31 kernel: ukbd0: Broadcom product 0x0099, rev 1.10/1.00, addr
4, iclass 3/1
Nov 18 01:09:31 kernel: kbd1 at ukbd0
Nov 18 01:09:31 kernel: ums0: Broadcom product 0x0097, rev 1.10/1.00, addr 5,
iclass 3/1
Nov 18 01:09:31 kernel: ums0: 3 buttons
III - WITH ng_ubt_load="YES" in /boot/load.conf and NO USB mouse
Nov 18 01:16:19 kernel: uhci0: <VIA 83C572 USB controller> port 0x1800-0x181f
irq 5 at device 7.2 on pci0
Nov 18 01:16:19 kernel: uhci0: [GIANT-LOCKED]
Nov 18 01:16:19 kernel: usb0: <VIA 83C572 USB controller> on uhci0
Nov 18 01:16:19 kernel: usb0: USB revision 1.0
Nov 18 01:16:19 kernel: uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00,
addr 1
Nov 18 01:16:19 kernel: uhub0: 2 ports with 2 removable, self powered
Nov 18 01:16:19 kernel: uhub1: Broadcom product 0x3535, class 9/0, rev
2.00/1.00, addr 2
Nov 18 01:16:19 kernel: uhub1: 3 ports with 0 removable, bus powered
Nov 18 01:16:19 kernel: ubt0: Broadcom Corp Bluetooth Transceiver, rev
1.10/1.00, addr 3
Nov 18 01:16:19 kernel: ubt0: Broadcom Corp Bluetooth Transceiver, rev
1.10/1.00, addr 3
Nov 18 01:16:19 kernel: ubt0: Interface 0 endpoints: interrupt=0x81,
bulk-in=0x82, bulk-out=0x2
Nov 18 01:16:19 kernel: ubt0: Interface 1 (alt.config 4) endpoints:
isoc-in=0x83, isoc-out=0x3; wMaxPacketSize=64; nframes=5, buffer size=320
Nov 18 01:16:19 kernel: ukbd0: Broadcom product 0x0099, rev 1.10/1.00, addr
4, iclass 3/1
Nov 18 01:16:19 kernel: kbd1 at ukbd0
Nov 18 01:16:19 kernel: ums0: Broadcom product 0x0097, rev 1.10/1.00, addr 5,
iclass 3/1
Nov 18 01:16:19 kernel: ums0: 3 buttons
More information about the freebsd-bluetooth
mailing list