28 lines
429 B
Bash
Executable File
28 lines
429 B
Bash
Executable File
#!/bin/sh
|
|
|
|
check_hciconfig() {
|
|
if command -v hciattach &> /dev/null; then
|
|
if lsmod | grep -q "aic8800_fdrv"; then
|
|
hciattach -s 115200 /dev/ttyS1 any 115200 flow nosleep&
|
|
sleep 2
|
|
if hciconfig -a | grep -q "hci0"; then
|
|
hciconfig hci0 up&
|
|
else
|
|
echo "hci0 not found or not available."
|
|
fi
|
|
else
|
|
echo "aic8800_fdrv not found."
|
|
fi
|
|
fi
|
|
}
|
|
|
|
case $1 in
|
|
start)
|
|
check_hciconfig
|
|
;;
|
|
*)
|
|
exit 1
|
|
;;
|
|
esac
|
|
|