orangepi win can now use ap6212-bluetooth patch

This commit is contained in:
Eddi De Pieri 2018-01-27 10:02:55 +01:00
parent 6e79dc833d
commit 4da02059db

View File

@ -29,6 +29,11 @@ if [ -f "/lib/firmware/ap6212/bcm43438a0.hcd" ] && [ ! -f /etc/firmware/ap6212/4
fi
if [ -f "/lib/firmware/ap6212/bcm43438a1.hcd" ] && [ ! -f /etc/firmware/ap6212/BCM43430A1.hcd ]; then
mkdir -p /etc/firmware/ap6212
cp /lib/firmware/ap6212/bcm43438a1.hcd /etc/firmware/ap6212/BCM43430A1.hcd
fi
. /lib/lsb/init-functions
do_start () {
@ -54,7 +59,12 @@ then
rfkill unblock all
echo "0" > /sys/class/rfkill/rfkill0/state
echo "1" > /sys/class/rfkill/rfkill0/state
echo " " > /dev/$PORT
#on orangepi win following command never ends on first try... force to run with a timeout...
timeout 5s echo " " > /dev/$PORT
if [ $? != 0 ]; then
#timed out... retry
echo " " > /dev/$PORT
fi
hciattach /dev/$PORT bcm43xx 115200 flow bdaddr $MAC_OPTIONS
hciconfig hci0 up
fi