diff -urN bluez-utils-2.13.orig/pcmcia/bluetooth bluez-utils-2.13/pcmcia/bluetooth --- bluez-utils-2.13.orig/pcmcia/bluetooth 2004-06-17 17:05:36.000000000 +0100 +++ bluez-utils-2.13/pcmcia/bluetooth 2005-01-06 14:43:44.000000000 +0000 @@ -19,16 +19,52 @@ get_info $DEVICE # +# Where are the executables +# +if [ -x /sbin/hciattach ]; then + HCIATTACH=/sbin/hciattach +elif [ -x /usr/sbin/hciattach ]; then + HCIATTACH=/usr/sbin/hciattach +elif [ -x /usr/local/sbin/hciattach ]; then + HCIATTACH=/usr/local/sbin/hciattach +else + HCIATTACH="" +fi + +# # Serial devices # start_serial() { + if [ -z $HCIATTACH ]; then + log hciattach: command not found + return + fi + IRQ=`setserial /dev/$DEVICE | sed -e 's/.*IRQ: //'` setserial /dev/$DEVICE irq 0 ; setserial /dev/$DEVICE irq $IRQ - - /usr/sbin/hciattach $DEVICE $MANFID + + # some replacements - This is because hciattach only knows of a few + # cards. Worse, some have broken vendor/device IDs + case $MANFID in + "0000,0000") + # Bluemonkey/CC&C Tech bluetooth card. + MANFID="bcsp" + ;; + esac + $HCIATTACH $DEVICE $MANFID } stop_serial() { do_fuser -k -HUP /dev/$DEVICE > /dev/null + hcilist=`ps -ef | grep hciattach | grep -v grep` + if [ "x$hcilist" = "x" ]; then + return + fi + killall $HCIATTACH > /dev/null 2>&1 + hcilist=`ps -ef | grep hciattach | grep -v grep` + if [ "x$hcilist" = "x" ]; then + return + fi + killall hciattach > /dev/null 2>&1 } suspend_serial() { stop_serial diff -urN bluez-utils-2.13.orig/pcmcia/bluetooth.conf bluez-utils-2.13/pcmcia/bluetooth.conf --- bluez-utils-2.13.orig/pcmcia/bluetooth.conf 2004-12-25 18:06:01.000000000 +0000 +++ bluez-utils-2.13/pcmcia/bluetooth.conf 2005-01-06 14:20:54.000000000 +0000 @@ -106,3 +106,8 @@ card "Cyber-blue Compact Flash Card" version "BT", "", "", "" bind "btuart_cs" + +card "Bluetooth BT0100M" + version "Bluetooth BT0100M", "" + bind "serial_cs" class "bluetooth" +