summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrecipes-kernel/rs9113/files/rs9113/rs9113.init18
1 files changed, 12 insertions, 6 deletions
diff --git a/recipes-kernel/rs9113/files/rs9113/rs9113.init b/recipes-kernel/rs9113/files/rs9113/rs9113.init
index d9fb21e..0d3d548 100755
--- a/recipes-kernel/rs9113/files/rs9113/rs9113.init
+++ b/recipes-kernel/rs9113/files/rs9113/rs9113.init
@@ -41,9 +41,9 @@ case "$1" in
while [ $N -lt 20 ] ; do
INT=$(cat $RS9113_INT)
if ((INT != 1)) ; then
- usleep $INTSLEEPTIME
+ usleep $INTSLEEPTIME
else
- break
+ break
fi
done
if [ $INT -ne 1 ] ; then
@@ -53,15 +53,21 @@ case "$1" in
# No WiFi BT, so exit quietly
exit 0
fi
- if /usr/bin/lsusb -d 1618:9113 >/dev/null ; then
- break
- fi
+ n=0
+ while ((n < 10)) ; do
+ usleep 50000
+ if /usr/bin/lsusb -d 1618:9113 ; then
+ break 2
+ fi
+ done
+ /usr/bin/logger -t "rs9113" -p error -s "Redpine not found on USB Hub."
sleep 15
((count++))
if ((count > 5)) ; then
- logger -t rs9113 -p error -s "RS9113 not found after $count resets"
+ /usr/bin/logger -t "rs9113" -p error -s "RS9113 not found after $count resets"
break
fi
+ echo 'RS9113 not found, try resetting again'
done
/usr/bin/logger -t "rs9113" -p info -s "Loading rs9113 modules with COEX=$COEX_MODE and Country=$SET_COUNTRY_CODE"
/usr/sbin/rs9113_load_modules.sh $CONFIG