diff options
author | Max Krasnyansky <maxk@qualcomm.com> | 2002-03-08 21:12:35 +0000 |
---|---|---|
committer | Max Krasnyansky <maxk@qualcomm.com> | 2002-03-08 21:12:35 +0000 |
commit | c98b2f82a4e532ca61592b08e3ad60749eb9f8d7 (patch) | |
tree | 19a3df72d2cd6a8d64b7d98473261c7e07e306a0 /pcmcia |
Initial revision
Diffstat (limited to 'pcmcia')
-rw-r--r-- | pcmcia/Makefile.am | 12 | ||||
-rw-r--r-- | pcmcia/Makefile.in | 198 | ||||
-rwxr-xr-x | pcmcia/bluetooth | 34 | ||||
-rw-r--r-- | pcmcia/bluetooth.conf | 26 |
4 files changed, 270 insertions, 0 deletions
diff --git a/pcmcia/Makefile.am b/pcmcia/Makefile.am new file mode 100644 index 00000000..3664b3e7 --- /dev/null +++ b/pcmcia/Makefile.am @@ -0,0 +1,12 @@ +# +# $Id$ +# + +pcmciadir = /etc/pcmcia + +install-data-local: @PCMCIA@ + +pcmcia: + $(mkinstalldirs) $(DESTDIR)$(pcmciadir) + $(INSTALL) -m 755 $(srcdir)/bluetooth $(DESTDIR)$(pcmciadir) + $(INSTALL) -m 644 $(srcdir)/bluetooth.conf $(DESTDIR)$(pcmciadir) diff --git a/pcmcia/Makefile.in b/pcmcia/Makefile.in new file mode 100644 index 00000000..ed120814 --- /dev/null +++ b/pcmcia/Makefile.in @@ -0,0 +1,198 @@ +# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# +# $Id$ +# + + +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = .. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_alias = @build_alias@ +build_triplet = @build@ +host_alias = @host_alias@ +host_triplet = @host@ +target_alias = @target_alias@ +target_triplet = @target@ +AR = @AR@ +AWK = @AWK@ +CC = @CC@ +DISTRO = @DISTRO@ +GLIB = @GLIB@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LDFLAGS = @GLIB_LDFLAGS@ +LD = @LD@ +LEX = @LEX@ +MAKEINFO = @MAKEINFO@ +PACKAGE = @PACKAGE@ +PCMCIA = @PCMCIA@ +VERSION = @VERSION@ +YACC = @YACC@ + +pcmciadir = /etc/pcmcia +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +DIST_COMMON = Makefile.am Makefile.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = gtar +GZIP_ENV = --best +all: all-redirect +.SUFFIXES: +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu pcmcia/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + +tags: TAGS +TAGS: + + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = pcmcia + +distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu pcmcia/Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done +info-am: +info: info-am +dvi-am: +dvi: dvi-am +check-am: all-am +check: check-am +installcheck-am: +installcheck: installcheck-am +install-exec-am: +install-exec: install-exec-am + +install-data-am: install-data-local +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: +uninstall: uninstall-am +all-am: Makefile +all-redirect: all-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-generic + +mostlyclean: mostlyclean-am + +clean-am: clean-generic mostlyclean-am + +clean: clean-am + +distclean-am: distclean-generic clean-am + +distclean: distclean-am + +maintainer-clean-am: maintainer-clean-generic distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-am + +.PHONY: tags distdir info-am info dvi-am dvi check check-am \ +installcheck-am installcheck install-exec-am install-exec \ +install-data-local install-data-am install-data install-am install \ +uninstall-am uninstall all-redirect all-am all installdirs \ +mostlyclean-generic distclean-generic clean-generic \ +maintainer-clean-generic clean mostlyclean distclean maintainer-clean + + +install-data-local: @PCMCIA@ + +pcmcia: + $(mkinstalldirs) $(DESTDIR)$(pcmciadir) + $(INSTALL) -m 755 $(srcdir)/bluetooth $(DESTDIR)$(pcmciadir) + $(INSTALL) -m 644 $(srcdir)/bluetooth.conf $(DESTDIR)$(pcmciadir) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/pcmcia/bluetooth b/pcmcia/bluetooth new file mode 100755 index 00000000..ea22ce40 --- /dev/null +++ b/pcmcia/bluetooth @@ -0,0 +1,34 @@ +#!/bin/sh +# +# bluetooth +# +# Initialize a PCMCIA Bluetooth device +# Written by Maxim Krasnyanskiy <maxk@qualcomm.com> +# +# $1 - socket +# $2 - device +# + +LOG="/usr/bin/logger -i -t bluetooth -p daemon.notice" + +IDENT="/sbin/cardctl ident $1" + +# Check if card is really a Bluetooth card +if ! $IDENT | grep -i 'bluetooth' > /dev/null 2>&1; then + $LOG "$2 is not a Bluetooth device" + exit +fi + +ID=`$IDENT | awk '/.*id/{print $2 $3}'` +TYPE=`$IDENT | awk '/.*func/{print $2}'` + +$LOG "Bluetooth device id $ID type $TYPE $2" + +case "$TYPE" in + # Serial device + 2) + /sbin/hciattach $DEVICE $ID + ;; +esac + +unset LOG IDENT ID TYPE diff --git a/pcmcia/bluetooth.conf b/pcmcia/bluetooth.conf new file mode 100644 index 00000000..ca48419d --- /dev/null +++ b/pcmcia/bluetooth.conf @@ -0,0 +1,26 @@ +card "Brain Boxes BL-620 Bluetooth Adapter" + version "Brain Boxes", "Bluetooth PC Card" + bind "serial_cs" + +card "Xircom CreditCard CBT Bluetooth Adapter" + version "Xircom", "*", "CBT" + bind "serial_cs" + +card "3Com Bluetooth PC Card" + version "3COM", "*", "Bluetooth PC Card" + bind "serial_cs" + +card "COM One Platinium Bluetooth PC Card" + version "COM1 SA", "MC310 CARD" + bind "serial_cs" + +card "Sphinx PICO Bluetooth Card" + version "SPHINX", "BT-CARD" + bind "serial_cs" + +device "dtl1_cs" + module "dtl1_cs" + +card "Nokia Bluetooth Card DTL-1" + version "Nokia Mobile Phones", "DTL-1" + bind "dtl1_cs" |