Skip to content

Instantly share code, notes, and snippets.


Nokius/gist:916af8424af38a15bfcd Secret

Last active Aug 29, 2015
What would you like to do?
# Maximum number of attempts to enable hcismd to try to get
# hci0 to come online. Writing to sysfs too early seems to
# not work, so we loop.
seq 1 $MAXTRIES | while read i ; do
echo 1 > /sys/module/hci_smd/parameters/hcismd_set
if [ -e /sys/class/bluetooth/hci0 ] ; then
# found hci0, exit successfully
exit 0
sleep 1
if [ $i == $MAXTRIES ] ; then
# must have gotten through all our retries, fail
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.