bluetooth.conf::
#!/bin/bash # author: Muratore Alessandro # email: muratore.ale@gmail.com # # description: Bluetooth subsystem - starting and stopping # tested on: sharp-rom - cacko # # Source function library. # . /etc/rc.d/init.d/functions prog="Bluetooth" UART_CONF="/etc/bluetooth/uart" start_uarts() { /usr/sbin/hciattach /dev/ttyS3 bcsp 230400 } stop_uarts() { killproc hciattach > /dev/null 2>&1 } start() { echo -n $"Starting $prog..." modprobe rfcomm modprobe l2cap /usr/bin/make_dev.bluez.sh daemon /usr/sbin/hcid if [ -x /usr/sbin/sdpd ]; then daemon /usr/sbin/sdpd fi start_uarts /usr/bin/rfcomm bind all touch /var/lock/subsys/bluetooth echo "Done." } stop() { echo -n $"Shutting down $prog..." /usr/bin/rfcomm release all killproc hcid if [ -x /usr/sbin/sdpd ]; then killproc sdpd fi stop_uarts rmmod rfcomm > /dev/null 2>&1 rmmod l2cap > /dev/null 2>&1 rmmod bluez > /dev/null 2>&1 rm -f /var/lock/subsys/bluetooth echo "Done." } [ -f /usr/sbin/hcid ] || exit 0 # See how we were called. case "$1" in start) start ;; stop) stop ;; restart|reload) stop start ;; condrestart) [ -e /var/lock/subsys/bluetooth ] && (stop; start) ;; *) echo $"Usage: $0 {start|stop|restart|reload|condrestart}" exit 1 esac exit 0
uart.conf:
"Socket", "CF+ Personal Network Card Rev 2.5":/dev/ttyS3 bcsp 230400 "Bluetooth BT0100M", "", "":/dev/ttyS3 bcsp 1000000 "Compact Flash", "Bluetooth Card", "", "":/dev/ttyS3 bcsp "CF CARD", "GENERIC", "", "":/dev/ttyS3 bcsp 1000000 "AmbiCom BT2000C", "Bluetooth PC/CF Card", "", "":/dev/ttyS3 bt2000c flow
Nessun commento:
Posta un commento