Skip to content
This repository has been archived by the owner on Nov 4, 2019. It is now read-only.

Bluetooth turns off randomly #24

Open
cih997 opened this issue Apr 1, 2017 · 12 comments
Open

Bluetooth turns off randomly #24

cih997 opened this issue Apr 1, 2017 · 12 comments

Comments

@cih997
Copy link

cih997 commented Apr 1, 2017

With the OTA version from 29th March 2017 the Bluetooth turns off randomly.

This issue did not exist in Alpha 5.

@imchivaa
Copy link

imchivaa commented Apr 1, 2017

How frequent it happens? How fast it disconnects? Every 10mins? Because it doesn't happen to me.

I was connected to a Bluetooth speaker for 20mins and doesn't disconnect

@imchivaa
Copy link

imchivaa commented Apr 1, 2017

Latest​ OTA, 5.1.1

@cih997
Copy link
Author

cih997 commented Apr 1, 2017

Definitely longer. Maybe twice a day I notice my smartwatch is disconnected and when I check my phone the Bluetooth is disabled.

I enable bluetooth and it works fine for another hours. I will try to investigate the frequency.

@imchivaa
Copy link

imchivaa commented Apr 1, 2017

Urmmm, then i couldn't test this because i only connected to Bluetooth for awhile for music. Not smart watch. Maybe try to attach the log so OP can know what's wrong.

@PaulFasola
Copy link
Owner

Not happening from my side too (2 hours of bus this evening) mmh. Waiting for your logs ;) (even if it will be difficult to log this behavior..).

@PaulFasola PaulFasola moved this from DONE to Bugs to be reproduced in CM-13 Porting status Apr 5, 2017
@cih997
Copy link
Author

cih997 commented Apr 9, 2017

I've got Android Wear 2.0 update and have not got this issue for last 12hrs. I will be testing this few more days and let you know. Probably issue was related to some Wear bug.

@cih997
Copy link
Author

cih997 commented Apr 18, 2017

This morning BT stopped to work at all. When I click on enable slider it changes to enabled for 1-2 seconds and then goes back to off. I will try to check logs when I can.

@Kingzak34
Copy link

Do you have data connection problem at same time that Bluetooth drop?

Cause on AL-10 I have sometimes troubles with data connection (shows a "!" and data not working) and when data drops (start showing the "!") I noticed that Bluetooth stop working too.

It really rare on my side only happend once or twice. I have my Huawei watch connected all the time without problem. (Custom Wear 2.0 Rom based on DP5)

@cih997
Copy link
Author

cih997 commented Apr 18, 2017

Nothing obvious here really. It may be related though. I think issue with BT is more often when I'm out of my WiFi coverage.

@cih997
Copy link
Author

cih997 commented Apr 18, 2017

Not sure if I mentioned about it in other issue but I've had at least two detected issues with mobile network: it was full signal but phone was not connected to the network so I could not send / receive texts as well as make / receive calls. This is extremely bad issue because for example last time I was "offline" half a day and I was not aware of that :/ @Kingzak34 have you noticed similar issue with your phone?

@cih997
Copy link
Author

cih997 commented Apr 21, 2017

Next day BT started to work correctly. The only thing I did was to disable roaming data. No idea if that can be related?

@cih997
Copy link
Author

cih997 commented May 29, 2017

I have finally found some time to debug this issue.

Initial state: Bluetooth suddenly turned off, no devices connected.
adb logcat enabled
In BT settings I switched BT on.
The slider button was in "on" position for few seconds and came back to "off".
Bluetooth is still disabled. This is repeatable.
adb logcat disabled

ADB log attached.

I hope this will help you with finding the root cause of the issue. Logs lines that look interesting for me are:
05-29 16:14:10.213 26517 26517 I bt_bluedroid: init 05-29 16:14:10.214 26517 26529 I BluetoothAdapterState: Entering OffState 05-29 16:14:10.217 26517 26530 I bt_bte_conf: bte_load_ble_conf attempt to load ble stack conf from /etc/bluetooth/ble_stack.conf 05-29 16:14:10.217 26517 26530 E bt_osi_config: config_new unable to open file '/etc/bluetooth/ble_stack.conf': No such file or directory 05-29 16:14:10.217 26517 26530 I bt_bte_conf: bte_load_ble_conf file >/etc/bluetooth/ble_stack.conf< not found 05-29 16:14:10.217 26517 26530 I bt_stack_config: init attempt to load stack conf from /etc/bluetooth/bt_stack.conf 05-29 16:14:10.218 26517 26517 I bt_bluedroid: get_profile_interface socket 05-29 16:14:10.219 26517 26517 I bt_bluedroid: get_profile_interface sdp

05-29 16:14:10.238 5547 6899 E NearbyDirect: BackgroundBleScanner: Unexpected action=android.bluetooth.adapter.action.BLE_STATE_CHANGED 05-29 16:14:10.241 26517 26534 I BluetoothBondStateMachine: StableState(): Entering Off State 05-29 16:14:10.245 5547 6899 I NearbyDirect: MagicPairScanner: BluetoothLeScanner is null, Bluetooth might be off. Enabled=false 05-29 16:14:10.245 26517 26529 I BluetoothAdapterState: Entering PendingCommandState 05-29 16:14:10.246 26517 26517 D BtGatt.GattService: classInitNative called

05-29 16:14:10.261 26517 26530 E bt_snoop: update_logging unable to open '/data/hwzd_logs/bt/btsnoop_hci.log': No such file or directory

05-29 16:14:22.275 26517 26529 I BluetoothAdapterState: Bluetooth adapter state changed: 14-> 10 05-29 16:14:22.279 4624 4641 D BluetoothManagerService: Message: 60 05-29 16:14:22.279 4624 4641 D BluetoothManagerService: MESSAGE_BLUETOOTH_STATE_CHANGE: prevState = 14, newState=10 05-29 16:14:22.279 4624 4641 D BluetoothManagerService: Bluetooth is complete turn off 05-29 16:14:22.280 26517 26529 I BluetoothAdapterState: Entering OffState 05-29 16:14:22.282 4624 4641 E BluetoothManagerService: recoverBluetoothServiceFromError 05-29 16:14:22.298 5547 5547 I GCoreUlr: Caught bluetooth disabled event, disabling ULR BLE scanner 05-29 16:14:22.300 5547 6899 E NearbyDirect: BackgroundBleScanner: Unexpected action=android.bluetooth.adapter.action.STATE_CHANGED 05-29 16:14:22.309 5547 6899 I NearbyDirect: MagicPairScanner: BluetoothLeScanner is null, Bluetooth might be off. Enabled=false 05-29 16:14:22.341 23667 23667 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1231 android.content.ContextWrapper.startService:587 android.content.ContextWrapper.startService:587 com.android.settings.bluetooth.DockEventReceiver.beginStartingService:134 com.android.settings.bluetooth.DockEventReceiver.onReceive:115
bt_crash_log.txt

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
CM-13 Porting status
Bugs to be reproduced
Development

No branches or pull requests

4 participants