#!/bin/sh SHORT_NAME="a1Mobile" DESC_NAME="A1 Mobiles Schmalband" USB_DEV="/dev/mobile" RFCOMM_DEV="/dev/rfcomm1" BT_ADDR="38:EC:E4:86:8F:D3" RFCOMM_CHANNEL=3 case "$1" in start|"") echo "Connecting with $DESC_NAME" if [ -e "$USB_DEV" ]; then DEV=$USB_DEV else /usr/bin/rfcomm -A -E -S bind $RFCOMM_DEV $BT_ADDR $RFCOMM_CHANNEL DEV=$RFCOMM_DEV fi /usr/bin/pon a1.net $DEV ;; stop) echo "Disconnecting from $DESC_NAME" /usr/bin/poff a1.net if [ ! -e "$USB_DEV" ]; then /usr/bin/rfcomm release $RFCOMM_DEV fi ;; *) exit 1 ;; esac