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/bluetooth |
Initial revision
Diffstat (limited to 'pcmcia/bluetooth')
-rwxr-xr-x | pcmcia/bluetooth | 34 |
1 files changed, 34 insertions, 0 deletions
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 |