Date: Tue, 6 Mar 2007 18:44:31 +0100 From: "Pietro Cerutti" <pietro.cerutti@gmail.com> To: freebsd-bluetooth@freebsd.org Subject: which modules are mandatory? Message-ID: <e572718c0703060944sf505885n6974dcc7d21bce32@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi list, I have this built-in bluetooth dongle on my laptop: ubt0: vendor 0x0a12 product 0x0001, rev 2.00/15.93, addr 2 ubt0: vendor 0x0a12 product 0x0001, rev 2.00/15.93, addr 2 ubt0: Interface 0 endpoints: interrupt=0x81, bulk-in=0x82, bulk-out=0x2 ubt0: Interface 1 (alt.config 5) endpoints: isoc-in=0x83, isoc-out=0x3; wMaxPacketSize=49; nframes=6, buffer size=294 My laptop is a MSI-1034 (http://www.msicomputer.com/NB/product_spec.asp?model=MS-1034_(Core2_Duo)) but unfortunately the manufacturer doesn't give many information about the bluetooth device. I would like to keep my kernel at a minimum, and thus I'd like to know which parts of it should be built in order for bluetooth to work. The thing that's misleading me is the following: if I compile my kernel with only the /sys/modules/netgraph/netgraph and /sys/modules/netgraph/bluetooth modules, I get the following error while trying to enable bluetooth: # sh -x /etc/rc.bluetooth start ubt0 + logger=/usr/bin/logger -i -s -p user.err + kldstat=/sbin/kldstat + kldload=/sbin/kldload + sysctl=/sbin/sysctl + ngctl=/usr/sbin/ngctl + hcseriald=/usr/sbin/hcseriald + hccontrol=/usr/sbin/hccontrol + hci_debug_level=3 + l2cap_debug_level=3 + [ 2 -lt 2 ] + startstop=start + shift + dev=ubt0 + shift + load_module ng_bluetooth + module=ng_bluetooth + shift + /sbin/kldstat -n ng_bluetooth + [ 0 -ne 0 ] + load_module ng_hci + module=ng_hci + shift + /sbin/kldstat -n ng_hci + [ 0 -ne 0 ] + load_module ng_l2cap + module=ng_l2cap + shift + /sbin/kldstat -n ng_l2cap + [ 0 -ne 0 ] + load_module ng_btsocket + module=ng_btsocket + shift + /sbin/kldstat -n ng_btsocket + [ 0 -ne 0 ] + /etc/rc.bluetooth stop ubt0 + hook=hook + expr ubt0 : ubt\([0-9]\{1,\}\) + unit=0 + [ -z 0 ] + setup_stack ubt0 hook + dev=ubt0 + shift + hook=hook + shift + /usr/sbin/ngctl mkpeer ubt0: hci hook drv ngctl: can't create node: No such file or directory + exit 1 On the other hand, if I compile and install the whole /sys/modules/netgraph directory, the output is the following, and bluetooth works like a charm! # sh -x /etc/rc.bluetooth start ubt0 + logger=/usr/bin/logger -i -s -p user.err + kldstat=/sbin/kldstat + kldload=/sbin/kldload + sysctl=/sbin/sysctl + ngctl=/usr/sbin/ngctl + hcseriald=/usr/sbin/hcseriald + hccontrol=/usr/sbin/hccontrol + hci_debug_level=3 + l2cap_debug_level=3 + [ 2 -lt 2 ] + startstop=start + shift + dev=ubt0 + shift + load_module ng_bluetooth + module=ng_bluetooth + shift + /sbin/kldstat -n ng_bluetooth + [ 0 -ne 0 ] + load_module ng_hci + module=ng_hci + shift + /sbin/kldstat -n ng_hci + [ 0 -ne 0 ] + load_module ng_l2cap + module=ng_l2cap + shift + /sbin/kldstat -n ng_l2cap + [ 0 -ne 0 ] + load_module ng_btsocket + module=ng_btsocket + shift + /sbin/kldstat -n ng_btsocket + [ 0 -ne 0 ] + /etc/rc.bluetooth stop ubt0 + hook=hook + expr ubt0 : ubt\([0-9]\{1,\}\) + unit=0 + [ -z 0 ] + setup_stack ubt0 hook + dev=ubt0 + shift + hook=hook + shift + /usr/sbin/ngctl mkpeer ubt0: hci hook drv + /usr/sbin/ngctl name ubt0:hook ubt0hci + /usr/sbin/ngctl msg ubt0hci: set_debug 3 + /usr/sbin/ngctl mkpeer ubt0hci: l2cap acl hci + /usr/sbin/ngctl name ubt0hci:acl ubt0l2cap + /usr/sbin/ngctl msg ubt0l2cap: set_debug 3 + /usr/sbin/ngctl connect ubt0hci: btsock_hci_raw: raw ubt0raw + /usr/sbin/ngctl connect ubt0l2cap: btsock_l2c_raw: ctl ubt0ctl + /usr/sbin/ngctl connect ubt0l2cap: btsock_l2c: l2c ubt0l2c + /usr/sbin/hccontrol -n ubt0hci reset + /usr/sbin/hccontrol -n ubt0hci read_bd_addr BD_ADDR: 00:0d:f0:2d:1d:e9 + /usr/sbin/hccontrol -n ubt0hci read_local_supported_features Features: 0xff 0xff 0x8f 0xf8 0x18 0x18 00 0x80 <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> <Paging scheme> <Power control> <Transparent SCO data> <Unknown2.7> + /usr/sbin/hccontrol -n ubt0hci read_buffer_size Max. ACL packet size: 192 bytes Number of ACL packets: 8 Max. SCO packet size: 64 bytes Number of SCO packets: 8 + /usr/sbin/hccontrol -n ubt0hci write_scan_enable 3 + /usr/sbin/hccontrol -n ubt0hci write_class_of_device ff:01:0c + uname -n + /usr/sbin/hccontrol -n ubt0hci change_local_name gahrtop.localhost (ubt0) + /usr/sbin/hccontrol -n ubt0hci initialize Now, the weird thing is that in both cases, the kernel modules being loaded are the same: 8 1 0xc727f000 7000 ng_ubt.ko 9 4 0xc7286000 b000 netgraph.ko 10 4 0xc7295000 2000 ng_bluetooth.ko 11 1 0xc7297000 d000 ng_hci.ko 12 1 0xc72a4000 10000 ng_l2cap.ko 13 1 0xc72b4000 19000 ng_btsocket.ko and also the relevant outputs in /var/log/messages are the same: ubt0: vendor 0x0a12 product 0x0001, rev 2.00/15.93, addr 2 ubt0: vendor 0x0a12 product 0x0001, rev 2.00/15.93, addr 2 ubt0: Interface 0 endpoints: interrupt=0x81, bulk-in=0x82, bulk-out=0x2 ubt0: Interface 1 (alt.config 5) endpoints: isoc-in=0x83, isoc-out=0x3; wMaxPacketSize=49; nframes=6, buffer size=294 What I would like to know is: 1) why doesn't netgraph/netgraph and netgraph/bluetooth suffice? 2) what else should I include, if I want to avoid compiling the whole /sys/modules/netgraph directory? Thanks in advance! Please CC me since I'm not on the list! -- Pietro Cerutti - ASCII Ribbon Campaign - against HTML e-mail and proprietary attachments www.asciiribbon.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e572718c0703060944sf505885n6974dcc7d21bce32>