Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 100900 - no autoloading of bluetooth modules when daemons are started
Summary: no autoloading of bluetooth modules when daemons are started
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Mobile Herd (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-31 09:31 UTC by Marcel Wiesweg
Modified: 2005-10-23 03:14 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel Wiesweg 2005-07-31 09:31:38 UTC
The modules of the Bluez-Stack (bluetooth, l2cap, rfcomm) are not autoloaded 
(in the automagic linux kernel way)  
when the Bluez daemons (hcid, sdpd, rfcomm) are started by the initscript.     
I added the lines      
     
alias net-pf-31 bluetooth    
alias bt-proto-0 l2cap    
alias bt-proto-2 sco    
alias bt-proto-3 rfcomm    
    
to /etc/modules.d/aliases to fix this problem.    
    
Situation: I have a USB Bluetooth dongle which is plugged in only when I use    
it. If it is not plugged in (modules not loaded by hotplug), the daemons will   
fail to start, and when the device is plugged in, KDE's bluetooth daemon will  
report failure to connect to sdpd (which is not running obviously). With the  
above fix, the daemons will cause autoloading of the modules, the daemons will   
start and plugging will be handled gracefully.  
  
I don't know if autoloading is not wanted for some reason. Alternatively the  
daemons might somehow be started by hotplug, or the modules must be added to 
the /etc/modules.autoload.d list. 
In any case, this should be mentioned in the docs.  

Reproducible: Always
Steps to Reproduce:
1. Run /etc/init.d/bluetooth without bluetooth modules loaded or bluetooth  
hardware plugged in   
  
Actual Results:  
Daemons fail to start 

Expected Results:  
Autoload bluetooth modules and allow daemons to start 

Error messages in syslog: 
Jul 31 17:23:41 [hcid] Bluetooth HCI daemon 
Jul 31 17:23:41 [hcid] Can't open HCI socket: Address family not supported by 
protocol (97) 
Jul 31 17:23:41 [sdpd] init_server: opening L2CAP socket: Address family not 
supported by protocol_ 
Jul 31 17:23:41 [sdpd] main: Server initialization failed_ 
 
Emerge info: 
Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.3.5-20050130, 
glibc-2.3.5-r0, 2.6.12-gentoo-r6 i686) 
================================================================= 
System uname: 2.6.12-gentoo-r6 i686 Intel(R) Pentium(R) M processor 1.60GHz 
Gentoo Base System version 1.6.13 
dev-lang/python:     2.3.5 
sys-apps/sandbox:    1.2.11 
sys-devel/autoconf:  2.13, 2.59-r6 
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5 
sys-devel/binutils:  2.15.92.0.2-r10 
sys-devel/libtool:   1.5.16 
virtual/os-headers:  2.6.11-r2 
ACCEPT_KEYWORDS="x86" 
AUTOCLEAN="yes" 
CBUILD="i686-pc-linux-gnu" 
CFLAGS="-O2 -mcpu=pentium3 -mmmx -msse -msse2 -pipe" 
CHOST="i686-pc-linux-gnu" 
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" 
CXXFLAGS="-O2 -mcpu=pentium3 -mmmx -msse -msse2 -pipe" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoconfig distlocks sandbox sfperms strict" 
GENTOO_MIRRORS="ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ 
http://ftp.uni-erlangen.de/pub/mirrors/gentoo 
ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo 
ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo 
ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo 
http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ 
ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ 
ftp://ftp.gentoo.mesh-solutions.com/gentoo/" 
LINGUAS="de en fr" 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="/usr/local/gentoo-de" 
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" 
USE="x86 X aac aalib alsa apm arts audiofile avi bash-completion berkdb 
bitmap-fonts cdparanoia cdr crypt cups curl directfb divx4linux dvb dvd dvdr 
dvdread emboss encode fam flac foomaticdb fortran gdbm gif gimpprint gnokii 
gnome gphoto2 gpm gstreamer gtk gtk2 i8x0 imagemagick imlib ipv6 ithreads java 
jpeg jpeg2k kde ldap libg++ libwww mad mikmod mmx motif mp3 mpeg mplayer 
ncurses nls nmm nptl nptlonly offensive ogg oggvorbis opengl oss pam pdflib 
perl png python qt quicktime readline rtc samba sdl spell sse sse2 ssl svg svga 
tcpd theora tiff truetype truetype-fonts type1-fonts vdr visualization vorbis 
xine xinerama xml2 xmms xscreensaver xv xvid xvmc zlib linguas_de linguas_en 
linguas_fr userland_GNU kernel_linux elibc_glibc" 
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS
Comment 1 Manuel McLure 2005-09-30 20:04:49 UTC
This is strange, as those exact lines are in "modprobe -c" output on my machine
- they should be part of the /lib/modules/<kernel-version>/module.aliases file
which is read automatically by modprobe & friends. So those entries should not
be necessary to place in /etc/modules.d/aliases. Curious.

In any case, I placed rfcomm and hci_usb in my
/etc/modules.autoload.d/kernel-2.6 and it solved the problem for me. Thanks for
the pointer.
Comment 2 Henrik Brix Andersen 2005-10-23 03:14:35 UTC
(In reply to comment #1)
> This is strange, as those exact lines are in "modprobe -c" output on my machine
> - they should be part of the /lib/modules/<kernel-version>/module.aliases file
> which is read automatically by modprobe & friends. So those entries should not
> be necessary to place in /etc/modules.d/aliases. Curious.

These aliases are already part of the standard aliases for kernels with
bluetooth modules as shown by running `modprobe -c`.