Skip to content
Snippets Groups Projects
Commit 5e1c01f6 authored by David Mondou's avatar David Mondou
Browse files

Fix up hci attaching scripts

parent 2ca35530
No related branches found
No related tags found
No related merge requests found
......@@ -36,38 +36,32 @@ generate_mac()
}
#genmac
echo "generating mac address..."
logger "generating mac address..."
generate_mac
#hard reset the bmd
echo "resetting bmd..."
logger "resetting bmd..."
reset_bmd 69
echo "detaching..."
logger "detaching..."
killall -9 btattach
sleep 2
#attach wlan
echo "attaching hci0 (wlan)..."
btattach -B /dev/ttymxc0 &
sleep 2
hciconfig hci0 up
#attach
echo "attaching hci1 (bmd)..."
logger "attaching hci1 (bmd)..."
btattach -B /dev/ttymxc2 -S 1000000 &
#verify btattach was successful
if [ $? -eq 0 ]; then
sleep 2
echo "setting mac address: $mac"
logger "setting mac address: $mac"
btmgmt --index 1 static-addr $mac
sleep 2
echo "auto-power enable"
logger "auto-power enable"
btmgmt --index 1 auto-power
sleep 2
else
echo "FAILED: attaching hci1(bmd)..."
logger "FAILED: attaching hci1(bmd)..."
exit 1
fi
......
......@@ -10,7 +10,7 @@
TYPE=$(board_serial_number | cut -b 2-4)
if [ "$TYPE" == "126" ]; then
/usr/rigado/scripts/attach_bmd345.sh 2>&1 | logger -p user.info &
/usr/rigado/scripts/attach_bmd345.sh
else
/usr/rigado/scripts/attach_bmd300.sh 2>&1 | logger -p user.info
fi
......@@ -35,7 +35,7 @@ if [ $? -ne 0 ]; then
fi
#enable start_hci.sh at startup
update-rc.d start_hci.sh start 99 5 .
update-rc.d start_hci.sh start 91 5 .
#System changes have been made,
#create a link to undo theses changes.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment