From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 6 19:09:13 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C903716A40B for ; Tue, 6 Mar 2007 19:09:13 +0000 (UTC) (envelope-from pietro.cerutti@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.250]) by mx1.freebsd.org (Postfix) with ESMTP id 8AADB13C4B9 for ; Tue, 6 Mar 2007 19:09:13 +0000 (UTC) (envelope-from pietro.cerutti@gmail.com) Received: by an-out-0708.google.com with SMTP id c24so1737475ana for ; Tue, 06 Mar 2007 11:09:13 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=H1vBGBFYB8sfZ9RfdPy/x/zdz/za8btFz7EOFIPlWhIjBhTu89khE3eTT40N+JMwfonZKo1BNEgUChyKHKBHLAL20coXrPuITf38Etiealy1BzaBlvDISZ0caF3+VlprhWdDwP+jTmnCKLkGSZiCPMZEWx0ULxXP7OqKwEC4Tg0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=cstI1xkhGdJ084jN7vlwd6wiFJvqlfpcFIKPr0CtFqbkYOzC4S9uLvl7q2AX+cxP94q6M77fmu/5aGB3uc+8BZWR0sDeLchGuea8l/g6EH0ogF+V+sGpJ380KogDGlM0XUismc8MfkKQfKP8UwGOw0R5J9AhxNAr+sjo7kVjQYA= Received: by 10.100.112.19 with SMTP id k19mr3803945anc.1173208153310; Tue, 06 Mar 2007 11:09:13 -0800 (PST) Received: by 10.100.33.5 with HTTP; Tue, 6 Mar 2007 11:09:13 -0800 (PST) Message-ID: Date: Tue, 6 Mar 2007 20:09:13 +0100 From: "Pietro Cerutti" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: bluetooth: which modules are mandatory? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2007 19:09:13 -0000 Hi there, sorry for cross posting: I realized that this could be of interest for freebsd-hackers@ too (and I'm likely to get an answer from you, too). ---------- Forwarded message ---------- From: Pietro Cerutti Date: Mar 6, 2007 6:44 PM Subject: which modules are mandatory? To: freebsd-bluetooth@freebsd.org 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> + /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