diff options
author | jhtop.kim <jhtop.kim@samsung.com> | 2011-07-29 14:54:17 +0900 |
---|---|---|
committer | Jaikumar Ganesh <jaikumar@google.com> | 2011-07-29 09:40:25 -0700 |
commit | cd60add87bf628e96d3a91dc96d4bf945a0ccb17 (patch) | |
tree | eb0a5eb7c2fa244536c6b3199d0ec2b140497449 | |
parent | 9bb0edea288194e6777514b8aca5923f6c5c1268 (diff) | |
download | bluetooth-cd60add87bf628e96d3a91dc96d4bf945a0ccb17.tar.gz |
Bluetooth: fix for the unrecoverable state after BT on is failed
- When bt_enable() is called ,device try to turn on hci device.
if timeout happened after 10 seconds try,set_bluetooth_power() is called.
but hciattach is still running state, so turning on BT will fail.
it is unrecoverable before device reboot.
- add code for hciattach stop
Signed-off-by: jhtop.kim <jhtop.kim@samsung.com>
Change-Id: Id210995eb4e811994d40e1a5f567606f2b9a0207
-rw-r--r-- | bluedroid/bluetooth.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bluedroid/bluetooth.c b/bluedroid/bluetooth.c index bf188be..252bdc4 100644 --- a/bluedroid/bluetooth.c +++ b/bluedroid/bluetooth.c @@ -177,6 +177,9 @@ int bt_enable() { if (attempt == 0) { LOGE("%s: Timeout waiting for HCI device to come up, error- %d, ", __FUNCTION__, ret); + if (property_set("ctl.stop", "hciattach") < 0) { + LOGE("Error stopping hciattach"); + } set_bluetooth_power(0); goto out; } |