Annotation of wikisrc/bluetooth.mdwn, revision 1.2

1.2     ! wiki        1: Bluetooth is available since version 4 of NetBSD.
1.1       mspo        2: 
                      3: **Contents**
                      4: 
                      5: [[!toc]]
                      6: 
                      7: 
1.2     ! wiki        8: #  Background
1.1       mspo        9: 
1.2     ! wiki       10: Bluetooth is a digital radio protocol used for short range and low power communications. NetBSD 4.0 introduced support for the Bluetooth protocol stack, and some integration of device profiles into the NetBSD device framework.
1.1       mspo       11: 
1.2     ! wiki       12: The lower layers of the Bluetooth protocol stack pertaining to actual radio links between devices are handled inside the Bluetooth Controller, which communicates with the Host computer using the Host Controller Interface (HCI) protocol which can be accessed via a raw packet BTPROTO_HCI socket interface.
1.1       mspo       13: 
1.2     ! wiki       14: The lowest useable protocol is the Link Layer Control and Adaptation Protocol (L2CAP), which can be accessed via a BTPROTO_L2CAP socket interface. This provides sequential packet access to remote devices, with up to 64k channels per radio link. When an L2CAP channel is opened, the protocol or service that is required is identified by a Protocol/Service Multiplexer (PSM) value.
1.1       mspo       15: 
1.2     ! wiki       16: One available protocol is RFCOMM, which provides up to 30 emulated serial connections multiplexed over a single L2CAP channel. This streamed data protocol can be accessed using the BTPROTO_RFCOMM socket interface though it is planned to also provide a direct tty interface later. Typically, many services use RFCOMM links to provide a control interface using the AT command set.
1.1       mspo       17: 
1.2     ! wiki       18: Isochronous (SCO) Audio connections may be created on a baseband radio link using either the BTPROTO_SCO socket interface, or the [btsco(4)](http://netbsd.gw.com/cgi-bin/man-cgi?btsco+4+NetBSD-current) audio device driver. While the specification says that up to three such links can be made between devices, the current Bluetooth code can only handle one with any dignity.
1.1       mspo       19: 
1.2     ! wiki       20: Support for Human Interface Devices, which operate using the USB HID protocol over a pair of L2CAP channels is provided by the [bthidev(4)](http://netbsd.gw.com/cgi-bin/man-cgi?bthidev+4+NetBSD-current) driver. Currently, keyboards and mice are catered for, and attach to [wscons(4)](http://netbsd.gw.com/cgi-bin/man-cgi?wscons+4+NetBSD-current) as normal.
1.1       mspo       21: 
1.2     ! wiki       22: Service Discovery in the Bluetooth environment is made available by [libsdp(3)](http://netbsd.gw.com/cgi-bin/man-cgi?libsdp+3+NetBSD-current) and the [sdpd(8)](http://netbsd.gw.com/cgi-bin/man-cgi?sdpd+8+NetBSD-current) daemon (both ported from FreeBSD), which allows programs to register services and makes the information available to remote devices performing queries. Limited querying can be done with the [sdpquery(1)](http://netbsd.gw.com/cgi-bin/man-cgi?sdpquery+1+NetBSD-current) program.
1.1       mspo       23: 
1.2     ! wiki       24: Security on Bluetooth links is supplied by encryption and authentication options. In NetBSD-4.0, these can only be applied to all baseband links that a controller makes, by [btconfig(8)](http://netbsd.gw.com/cgi-bin/man-cgi?btconfig+8+NetBSD-current). For NetBSD-current versions after 21 April 2007, L2CAP and RFCOMM connections may additionally specify a minimum link mode for the baseband link which is applied during connection establishment. When authentication is requested, a PIN is presented by each side, generally entered by the operator (some limited input devices have a fixed PIN). The controller uses this PIN to generate a Link Key and reports this to the host computer and will ask for it to authenticate subsequent connections. On NetBSD, the [bthcid(8)](http://netbsd.gw.com/cgi-bin/man-cgi?bthcid+8+NetBSD-current) daemon is responsible for storing these and responding to Link Key requests, and also provides an interface to allow users to specify a PIN with a PIN client, such as [btpin(1)](http://netbsd.gw.com/cgi-bin/man-cgi?btpin+1+NetBSD-current) or [sysutils/btpin-qt](http://pkgsrc.se/sysutils/btpin-qt).
1.1       mspo       25: 
                     26: 
1.2     ! wiki       27: #  Requirements
1.1       mspo       28: 
1.2     ! wiki       29: The relevant device declarations are included in the GENERIC kernel configurations for the following architectures:
1.1       mspo       30: 
1.2     ! wiki       31:   * alpha
        !            32:   * amd64
        !            33:   * i386
        !            34:   * sparc64
1.1       mspo       35: 
1.2     ! wiki       36: For other architectures, you will need to add the device declarations to your kernel config file. Bluetooth should work on any architecture that has USB and/or PCMCIA available.
1.1       mspo       37: 
1.2     ! wiki       38: Please notice that you will need NetBSD 4.0 or higher to use bluetooth. Since 4.0 is tagged BETA as of August 31, you will need a fairly current kernel. To build a current kernel, please read [[How to build NetBSD-current]].
1.1       mspo       39: 
1.2     ! wiki       40: If you are looking to purchase a Bluetooth controller for use with NetBSD, the better devices are USB based, and a v2.0 device is better than v1.2. The Class of the device indicates the power of the radio - Class 1 is 100m and Class 2 is 10m.
1.1       mspo       41: 
                     42: 
1.2     ! wiki       43: #  Hardware
1.1       mspo       44: 
1.2     ! wiki       45: If Bluetooth is configured in your kernel, you should see Bluetooth controllers showing up in your boot messages, for example:
1.1       mspo       46: 
1.2     ! wiki       47:     bt3c0 at pcmcia0 function 0: <3COM, 3CRWB60-A, Bluetooth PC Card>
        !            48:     ubt0 at uhub1 port 4 configuration 1 interface 0
        !            49:     ubt0: Cambridge Silicon Radio Bluetooth USB Adapter, rev 2.00/19.58, addr 4
        !            50:     ubt1 at uhub1 port 2 configuration 1 interface 0
        !            51:     ubt1: Broadcom Belkin Bluetooth Device, rev 1.10/0.01, addr 5
1.1       mspo       52: 
1.2     ! wiki       53: Some PCMCIA and Cardbus devices will attach as serial devices, and they need to be configured to use the [btuart(4)](http://netbsd.gw.com/cgi-bin/man-cgi?btuart+4+NetBSD-current) line discipline to interface to the Bluetooth protocol stack.
1.1       mspo       54: 
                     55: 
1.2     ! wiki       56: #  Userland configuration
1.1       mspo       57: 
1.2     ! wiki       58: Please edit your [rc.conf(5)](http://netbsd.gw.com/cgi-bin/man-cgi?rc.conf+5+NetBSD-current) file and ensure it contains:
1.1       mspo       59: 
1.2     ! wiki       60:     # configure bluetooth controllers
        !            61:     btconfig=YES
        !            62:     btconfig_args="up pscan switch class 0x02010c"
1.1       mspo       63:     
1.2     ! wiki       64:     # configure bluetooth devices
        !            65:     btdevctl=YES
1.1       mspo       66:     
1.2     ! wiki       67:     # start bluetooth key daemon
        !            68:     bthcid=YES
1.1       mspo       69:     
1.2     ! wiki       70:     # start service discovery daemon
        !            71:     sdpd=YES
1.1       mspo       72: 
1.2     ! wiki       73: _i had to add 'auth' to the `btconfig_args` line to get my phone to pair._ --[[Jasper]] 22:50, 15 September 2006 (CEST)
1.1       mspo       74: 
                     75: 
1.2     ! wiki       76: _sdpd runs as (user:group) _sdpd:_sdpd, but these are not present in 4.0 -- PR [bin/37125](http://www.NetBSD.org/cgi-bin/query-pr-single.pl?number=37125)_ [[Shattered]] 14:53, 10 April 2008 (CEST)
1.1       mspo       77: 
1.2     ! wiki       78: which should be ok. Reboot or enter:
1.1       mspo       79: 
1.2     ! wiki       80:     /etc/rc.d/btconfig start
        !            81:     /etc/rc.d/bthcid start
        !            82:     /etc/rc.d/sdpd start
1.1       mspo       83: 
1.2     ! wiki       84: and you should be able to see that your device is configured, e.g:
1.1       mspo       85: 
1.2     ! wiki       86:     % btconfig -vvvv ubt0
        !            87:         ubt0: bdaddr 00:08:1b:8d:ba:6d flags 0x3<UP,RUNNING>
        !            88:         num_cmd = 1
        !            89:         num_acl = 8, acl_mtu = 384
        !            90:         num_sco = 8, sco_mtu = 64
        !            91:         class: [0x02010c] Laptop Computer <Networking>
        !            92:         name: "CSR - bc4"
        !            93:         voice: [0x0060]
        !            94:         Input Coding: Linear PCM [16-bit, pos 0], 2's complement
        !            95:         Air Coding: CVSD
        !            96:         pin: variable
        !            97:         options: -iscan pscan -auth -encrypt switch -hold sniff -park
        !            98:         ptype: [0xcc18] DM1 DH1 DM3 DH3 DM5 DH5 2-DH1 3-DH1 2-DH3 3-DH3 2-DH5 3-DH5
        !            99:         page timeout: 5120 ms
        !           100:         features: <3 slot> <5 slot> <encryption> <slot offset> <timing accuracy>
        !           101:         <role switch> <hold mode> <sniff mode> <park mode> <RSSI> <channel quality>
        !           102:         <SCO link> <HV2> <HV3> <mu-Law log> <A-Law log> <CVSD data> <paging parameter>
        !           103:         <power control> <transparent SCO> <broadcast encryption> <EDR ACL 2Mbps>
        !           104:         <EDR ACL 3Mbps> <enhanced inquiry scan> <interlaced inquiry scan>
        !           105:         <interlaced page scan> <RSSI with inquiry result> <EV3 packets>
        !           106:         <EV4 packets> <EV5 packets> <AFH capable slave> <AFH class slave>
        !           107:         <3 slot EDR ACL> <5 slot EDR ACL> <AFH capable master> <AFH class master>
        !           108:         <EDR eSCO 2Mbps> <EDR eSCO 3Mbps> <3 slot EDR eSCO> <extended features>
1.1       mspo      109: 
                    110: 
1.2     ! wiki      111: #  HID configuration
1.1       mspo      112: 
1.2     ! wiki      113: **Very important**: [bthcid(8)](http://netbsd.gw.com/cgi-bin/man-cgi?bthcid+8+NetBSD-current) must be running.
1.1       mspo      114: 
1.2     ! wiki      115: **Important**: [sysutils/hcidump](http://pkgsrc.se/sysutils/hcidump) is very useful.
1.1       mspo      116: 
1.2     ! wiki      117: Place device into discoverable mode, and peform an inquiry: 
1.1       mspo      118: 
1.2     ! wiki      119:     % btconfig ubt0 inquiry
        !           120:     Device Discovery from device: ubt0 .... 1 response
        !           121:       1: bdaddr 00:0a:95:10:8d:8c (unknown)
        !           122:        : name "Apple Wireless Mouse"
        !           123:        : class [0x002580] Peripheral Mouse <Limited Discoverable>
        !           124:        : page scan rep mode 0x01
        !           125:        : page scan period mode 0x00
        !           126:        : page scan mode 0x00
        !           127:        : clock offset 30537
1.1       mspo      128: 
                    129: which should get you the BDADDR of the device. for ease of use you might want to add this to `/etc/bluetooth/hosts` so you can refer to it by name: 
                    130: 
1.2     ! wiki      131:     00:0a:95:10:8d:8c  mouse
1.1       mspo      132: 
1.2     ! wiki      133: And now, you should be able to query the device. You will likely need to pair with it first which will happen the first time you connect, so set the PIN (which is probably 0000 for limited input devices but see the manual to be sure):
1.1       mspo      134: 
1.2     ! wiki      135:     % btpin -a mouse -p 0000
        !           136:     % btdevctl -a mouse -d ubt0 -s hid
        !           137:     local bdaddr: 00:04:76:e1:4a:f5
        !           138:     remote bdaddr: 00:0a:95:10:8d:8c
        !           139:     link mode: auth
        !           140:     device type: bthidev
        !           141:     control psm: 0x0011
        !           142:     interrupt psm: 0x0013
        !           143:     Collection page=Generic_Desktop usage=Mouse
        !           144:     Collection page=Generic_Desktop usage=Pointer
        !           145:       Input id=2 size=1 count=1 page=Button usage=Button_1 Variable, logical range 0..1
        !           146:       Input id=2 size=7 count=1 page=0x0000 usage=0x0000 Const, logical range 0..1
        !           147:       Input id=2 size=8 count=1 page=Generic_Desktop usage=X Variable Relative, logical range -127..127
        !           148:       Input id=2 size=8 count=1 page=Generic_Desktop usage=Y Variable Relative, logical range -127..127
        !           149:     Feature id=71 size=8 count=1 page=0x0006 usage=0x0020 Variable NoPref, logical range 0..100
        !           150:     End collection
        !           151:     End collection
1.1       mspo      152: 
1.2     ! wiki      153: Then try to attach it to the system:
1.1       mspo      154: 
1.2     ! wiki      155:     % btdevctl -a mouse -d ubt0 -s hid -A
1.1       mspo      156: 
                    157: which should attach the mouse to the system and attempt to open a bluetooth connection for it. You should see something like: 
                    158: 
1.2     ! wiki      159:     bthidev0 at bthub0 remote-bdaddr 00:0a:95:10:8d:8c link-mode auth
        !           160:     btms0 at bthidev0 reportid 2: 1 button.
        !           161:     wsmouse2 at btms0 mux 0
        !           162:     bthidev0: connected
        !           163: 
        !           164: on the console, and the mouse should work.
        !           165: 
        !           166: Keyboards are only a little more complex, in that you will need to enter the PIN onto the keyboard before you can pair. This will be done at the point where you are opening the first connection, eg:
        !           167: 
        !           168:     % btpin -a keyboard -r
        !           169:     PIN: 3537
        !           170:     % btdevctl -a keyboard -d ubt0 -s hid -A -v
1.1       mspo      171: 
                    172: < ENTER PIN ON BLUETOOTH KEYBOARD NOW >
                    173: 
1.2     ! wiki      174:     local bdaddr: 00:04:76:e1:4a:f5
        !           175:     remote bdaddr: 00:0a:95:45:a4:a0
        !           176:     link mode: encrypt
        !           177:     device type: bthidev
        !           178:     control psm: 0x0011
        !           179:     interrupt psm: 0x0013
        !           180:     Collection page=Generic_Desktop usage=Keyboard
        !           181:       Input id=1 size=1 count=1 page=Keyboard usage=Keyboard_LeftControl Variable, logical range 0..1
        !           182:       Input id=1 size=1 count=1 page=Keyboard usage=Keyboard_LeftShift Variable, logical range 0..1
        !           183:       Input id=1 size=1 count=1 page=Keyboard usage=Keyboard_LeftAlt Variable, logical range 0..1
        !           184:       Input id=1 size=1 count=1 page=Keyboard usage=Keyboard_Left_GUI Variable, logical range 0..1
        !           185:       Input id=1 size=1 count=1 page=Keyboard usage=Keyboard_RightControl Variable, logical range 0..1
        !           186:       Input id=1 size=1 count=1 page=Keyboard usage=Keyboard_RightShift Variable, logical range 0..1
        !           187:       Input id=1 size=1 count=1 page=Keyboard usage=Keyboard_RightAlt Variable, logical range 0..1
        !           188:       Input id=1 size=1 count=1 page=Keyboard usage=Keyboard_Right_GUI Variable, logical range 0..1
        !           189:       Input id=1 size=8 count=1 page=0x0000 usage=0x0000 Const, logical range 0..1
        !           190:      Output id=1 size=1 count=1 page=LEDs usage=Num_Lock Variable, logical range 0..1
        !           191:      Output id=1 size=1 count=1 page=LEDs usage=Caps_Lock Variable, logical range 0..1
        !           192:      Output id=1 size=1 count=1 page=LEDs usage=Scroll_Lock Variable, logical range 0..1
        !           193:      Output id=1 size=1 count=1 page=LEDs usage=Compose Variable, logical range 0..1
        !           194:      Output id=1 size=1 count=1 page=LEDs usage=Kana Variable, logical range 0..1
        !           195:      Output id=1 size=3 count=1 page=0x0000 usage=0x0000 Const, logical range 0..1
        !           196:       Input id=1 size=8 count=6 page=Keyboard usage=No_Event, logical range 0..255
        !           197:       Input id=1 size=1 count=1 page=Consumer usage=Eject Variable Relative, logical range 0..1
        !           198:       Input id=1 size=1 count=1 page=Consumer usage=Mute Variable Relative, logical range 0..1
        !           199:       Input id=1 size=1 count=1 page=Consumer usage=Volume_Up Variable, logical range 0..1
        !           200:       Input id=1 size=1 count=1 page=Consumer usage=Volume_Down Variable, logical range 0..1
        !           201:       Input id=1 size=1 count=4 page=0x0000 usage=0x0000 Const, logical range 0..1
        !           202:     End collection
        !           203: 
        !           204: And you see something like this on the console: 
        !           205: 
        !           206:     bthidev0 at bthub0 remote-bdaddr 00:0a:95:45:a4:a0 link-mode encrypt
        !           207:     btkbd0 at bthidev0 reportid 1
        !           208:     wskbd1 at btkbd0 mux 1
        !           209:     wskbd1: connecting to wsdisplay0
        !           210:     bthidev0: connected
1.1       mspo      211: 
1.2     ! wiki      212: By default, on NetBSD systems that support it, [btdevctl(8)](http://netbsd.gw.com/cgi-bin/man-cgi?btdevctl+8+NetBSD-current) will request authentication for the baseband link, or encryption if the HID is a keyboard.
1.1       mspo      213: 
                    214: 
1.2     ! wiki      215: #  Serial connections
1.1       mspo      216: 
                    217: **See [rfcomm_sppd(8)](http://netbsd.gw.com/cgi-bin/man-cgi?rfcomm_sppd+8+NetBSD-current)**
                    218: 
1.2     ! wiki      219: Set the phone into discoverable mode:
1.1       mspo      220: 
1.2     ! wiki      221:     % btconfig ubt0 inq
1.1       mspo      222: 
1.2     ! wiki      223: add alias to `/etc/bluetooth/hosts`, then:
1.1       mspo      224: 
1.2     ! wiki      225:     % btpin -a phone -p 334323
        !           226:     % sdpquery -a phone browse
1.1       mspo      227: 
1.2     ! wiki      228: will make the initial connection and cause [bthcid(8)](http://netbsd.gw.com/cgi-bin/man-cgi?bthcid+8+NetBSD-current) to store link keys. At this point, you should be paired with the phone and can do:
1.1       mspo      229: 
1.2     ! wiki      230:     % rfcomm_sppd -a phone -s DUN -t /dev/ttyp9
        !           231:     % cu -l /dev/ttyp9
1.1       mspo      232: 
1.2     ! wiki      233: and find yourself connected to the modem directly. In order to use PPP, you would add the line:
1.1       mspo      234: 
1.2     ! wiki      235:     pty "rfcomm_sppd -a phone -s DUN"
1.1       mspo      236: 
1.2     ! wiki      237: to your `/etc/ppp/options` file in place of the normal tty declaration and starting [pppd(8)](http://netbsd.gw.com/cgi-bin/man-cgi?pppd+8+NetBSD-current) will cause the link to be created as required.
1.1       mspo      238: 
1.2     ! wiki      239: Phones are more complex than HIDs naturally, and you may not need to provide a PIN until later in the process (some wait until a RFCOMM channel is opened before requesting authentication for instance), although the PIN you specify with [btpin(1)](http://netbsd.gw.com/cgi-bin/man-cgi?btpin+1+NetBSD-current) will be cached by [bthcid(8)](http://netbsd.gw.com/cgi-bin/man-cgi?bthcid+8+NetBSD-current) for 5 minutes or until used. For NetBSD-current systems after 21 April 2007, it is possible to specify the minimum link mode requirements, see [rfcomm_sppd(1)](http://netbsd.gw.com/cgi-bin/man-cgi?rfcomm_sppd+1+NetBSD-current) for details.
1.1       mspo      240: 
                    241: 
1.2     ! wiki      242: #  SCO Audio Headsets
1.1       mspo      243: 
                    244: **important**: When using SCO Audio with USB devices, you will need to enable isochronous data, and calculate the MTU that the device will use, see [ubt(4)](http://netbsd.gw.com/cgi-bin/man-cgi?ubt+4+NetBSD-current) and [btconfig(8)](http://netbsd.gw.com/cgi-bin/man-cgi?btconfig+8+NetBSD-current)
                    245: 
1.2     ! wiki      246: Discover the BDADDR and pair with the headset as normal (likely the PIN is "0000", but check your manual to be sure). Attach the [btsco(4)](http://netbsd.gw.com/cgi-bin/man-cgi?btsco+4+NetBSD-current) device to the system:
1.1       mspo      247: 
1.2     ! wiki      248:     % btconfig ubt0 inquiry
        !           249:     [...]
        !           250:     % btpin -a headset -p 0000
        !           251:     % btdevctl -a headset -d ubt0 -s hset -A
1.1       mspo      252: 
                    253: which should produce something like this: 
                    254: 
1.2     ! wiki      255:     btsco0 at bthub0 remote-bdaddr 00:07:a4:23:10:83
        !           256:     audio1 at btsco0: full duplex
1.1       mspo      257: 
                    258: on the system console. In order to utilise the audio device, you will need to open a control connection with [bthset(1)](http://netbsd.gw.com/cgi-bin/man-cgi?bthset+1+NetBSD-current) which conveys volume information to the mixer device. Using -v will let you see what is going on: 
                    259: 
1.2     ! wiki      260:     % bthset -m /dev/mixer1 -v
1.1       mspo      261: 
1.2     ! wiki      262: and you should now be able to transfer 8khz samples to/from /dev/audio1 using [audioplay(1)](http://netbsd.gw.com/cgi-bin/man-cgi?audioplay+1+NetBSD-current) and [audiorecord(1)](http://netbsd.gw.com/cgi-bin/man-cgi?audiorecord+1+NetBSD-current). Adjusting the mixer values should work when playing though you may find that when opening a connection the headset will reset the volume to the last known settings. Note that you need to leave _bthset_ running while you use audiorecord or audioplay, so either use two terminal windows or a trailing '&' on the previous command to move it to the background.
1.1       mspo      263: 
1.2     ! wiki      264:     % audiorecord -d /dev/audio1 voice.au
1.1       mspo      265: < TALK NONSENSE NOW >
1.2     ! wiki      266:     ^C
        !           267:     % audioplay -d /dev/audio voice.au
1.1       mspo      268: [gosh, do I really sound like that?] 
1.2     ! wiki      269:     % audioplay -d /dev/audio1 voice.au
1.1       mspo      270: [in the headset!] 
                    271: 
1.2     ! wiki      272: You can play with mpg123 and sox to play music (though only in mono), or it should hopefully be fairly easy to make the headset work with a VoIP application, please let me know if you get that working! 
1.1       mspo      273: 
                    274: 
                    275: #  SCO Audio Handsfree 
                    276: 
                    277: **important**: When using SCO Audio with USB devices, you will need to enable isochronous data, and calculate the MTU that the device will use, see [ubt(4)](http://netbsd.gw.com/cgi-bin/man-cgi?ubt+4+NetBSD-current) and [btconfig(8)](http://netbsd.gw.com/cgi-bin/man-cgi?btconfig+8+NetBSD-current)
                    278: 
1.2     ! wiki      279: The method shown above for SCO Audio Headsets also works to give [audio(4)](http://netbsd.gw.com/cgi-bin/man-cgi?audio+4+NetBSD-current) access to the Handsfree profile on a mobile phone (where the phone initiates audio connections), though in practice the [audio(4)][47] device does not quite handle the concept of 'connection lost' which we need. You can configure the 'HF' service with [btdevctl(8)](http://netbsd.gw.com/cgi-bin/man-cgi?btdevctl+8+NetBSD-current).
1.1       mspo      280: 
                    281: Alternatively there is a partial implementation of a handsfree profile program that opens a control connection to an Audio Gateway (ie a phone) and copies audio data to and from the system audio device as appropriate. Currently it is shell only and really it would be better with a graphical interface. See [comms/bthfp](http://pkgsrc.se/comms/bthfp)
                    282: 
                    283: 
1.2     ! wiki      284: #  OBEX Push/Ftp
1.1       mspo      285: 
1.2     ! wiki      286: See the [comms/obexftp](http://pkgsrc.se/comms/obexftp) and [comms/obexapp](http://pkgsrc.se/comms/obexapp) packages in pkgsrc.
1.1       mspo      287: 
1.2     ! wiki      288: #  Why doesn't it work, eh?
1.1       mspo      289: 
1.2     ! wiki      290:   1. A NetBSD version of the hcidump program is available in [sysutils/hcidump](http://pkgsrc.se/sysutils/hcidump) and can be very useful to snoop on packets in and out at the device level to find out what is happening when things are not going right.
        !           291:   2. the [bthcid(8)](http://netbsd.gw.com/cgi-bin/man-cgi?bthcid+8+NetBSD-current) program should be running, and logs debugging messages with facility "daemon.debug". See [syslog.conf(5)](http://netbsd.gw.com/cgi-bin/man-cgi?syslog.conf+5+NetBSD-current) for details.
        !           292:   3. Dave Tyson has done some excellent testing and found that some devices fail to work unless you set the packet type to 0x0018, which indicates DM1 and DH1 packets only. (I've put that on my list to investigate further, it should not be so)
1.1       mspo      293:   4. for device configuration to persist across reboots, you need to add an entry to the `/etc/bluetooth/btdevctl.conf` file and set btdevctl=YES in `/etc/rc.conf`
1.2     ! wiki      294:   5. to use SCO Audio with USB Bluetooth controllers, the MTU will need to be set. See the CAVEAT section of [ubt(4)](http://netbsd.gw.com/cgi-bin/man-cgi?ubt+4+NetBSD-current) for details.
        !           295:   6. Isochronous data is not well supported in some Belkin/Broadcom USB Bluetooth dongles.
        !           296:   7. Isochronous data is not supported on [ehci(4)](http://netbsd.gw.com/cgi-bin/man-cgi?ehci+4+NetBSD-current) USB host controllers.
        !           297:   8. SCO audio does not work really well with the [bt3c(4)](http://netbsd.gw.com/cgi-bin/man-cgi?bt3c+4+NetBSD-current) device
        !           298:   9. some older Belkin/Broadcom USB devices need firmware loaded before they will work. See the [sysutils/bcmfw](http://pkgsrc.se/sysutils/bcmfw) package.
1.1       mspo      299: 
1.2     ! wiki      300: #  References
1.1       mspo      301: 
                    302:   * [Bluetooth Imported.](http://mail-index.netbsd.org/current-users/2006/06/19/0022.html)
                    303:   * [bthfp source.](http://homepages.rya-online.net/plunky/bthfp-0.1.tar.gz)

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb