Cwa-app-android: Bluetooth turns unavailable after a few hours of operation

Created on 7 Aug 2020  路  14Comments  路  Source: corona-warn-app/cwa-app-android

Avoid duplicates

  • [x] Bug is not mentioned in the FAQ
  • [x] Bug is specific for Android only, for general issues / questions that apply to iOS and Android please raise them in the documentation repository
  • [x] Bug is not already reported in another issue

Describe the bug

After some time (on average one day, several hours up to a couple of days) Bluetooth turns off and cannot be turned on again.
In that state the phone doesn't connect to any BT device. Most apps still work but a normal reboot hangs. Opening a terminal doesn't respond. Connecting via "adb shell" returns "error: device offline". A hard reset (remove battery, long press Power, Volume-Down, Home) becomes necessary to recover from that state.
CWA sees that BT is turned off. But BT cannot be turned on again.
Disabling CWA (while the phone is still in good state) prevents the phone from entering that "BT-frozen state".

I observe the same behavior on the 2 devices (same model, same Android version).

Expected behaviour

The phone should not enter the "BT-frozen state" described above.

Steps to reproduce the issue

Restart the phone.
Make sure BT is on.
Make sure CWA is enabled "RISIKO-ERMITTLUNG AKTIV".
Leave the phone alone for several hours or use it as normal.
After less than 2 days, sometimes after a few hours the Bluetooth indicator turns off without any interaction. BT cannot to be turned on again. It's now in that "BT-frozen state".

Technical details

  • Mobile device:
    Samsung Galaxy S5
    Model SM-G900F
    aka klte

  • Android version:
    Android Version 9
    LinageOS Version 16.0-20200719-NIGHTLY-klte

CWA version 1.1.1

Possible Fix

Additional context


Internal Tracking ID: EXPOSUREAPP-2049

bug further input needed mirrored-to-jira question

Most helpful comment

Most likely this is a problem with your operating system. CWA uses the Google Exposure Notification - Framework API (part of the Google Play Services), which uses the operating system's Bluetooth stack and driver. Ask the maintainer of your operating system for a working build.

All 14 comments

Most likely this is a problem with your operating system. CWA uses the Google Exposure Notification - Framework API (part of the Google Play Services), which uses the operating system's Bluetooth stack and driver. Ask the maintainer of your operating system for a working build.

Hello @bomilkar,

thanks for reaching out. I will contact our development team for clarification. From what I understand for know this looks more like an issue with your phone in general than with the application.

Thanks,
LMM

Corona-Warn-App Open Source Team

Hi @GPclips ,
thanks for looking into this. I agree there are many things which may create the issue. Not just CWA.
The good news: it is reproducible and on more than 1 phone. But I have no experience on how to debug on Android. I tried to connect to the phone via "adb shell", but the phone doesn't respond anymore. Is there any logging mechanism which survives a reboot?
The issue is probably somewhere near the "Google Exposure Notification - Framework API". So I will have to study the documentation. Any hint is very welcome!

@bomilkar you can find Google's documentation of their Exposure Notification Framework (ENF) here: https://developers.google.com/android/exposure-notifications/implementation-guide

They also released source code of the ENF here: https://github.com/google/exposure-notifications-internals

I hope this helps :)

Is there any logging mechanism which survives a reboot?

it is possible to enable Bluetooth HCI snoop log
https://www.bluetooth.com/blog/debugging-bluetooth-with-an-android-app/

Dear @bomilkar,

Please, could you let us know if with the actual CWA version 1.6.1 your reported issue still persists or seems resolved?

Best regards,
DS


Corona-Warn-App Open Source Team

@dsarkar I'll watch it and let you know in a few days or earlier if the BT issues still persists.
Thanks for getting back to me!

@dsarkar during one week with CWA 1.6.1 I observed one issue:
CWA thought Bluetooth is off. In the status line the BT icon was on and I was able to toggle BT on and off.
CWA still thought Bluetooth is off.
Restarting CWA brought it back to normal.

I hope this helps. I'll report issues as soon as I see them.

HI @bomilkar,

Thanks for the feedback. Actually, right now we have CWA version 1.7.1, could you please report your observations with the actual version, and if the issue pops up again, send a screenshot(s).

Best wishes,
DS


Corona-Warn-App Open Source Team

@bomilkar, any new developments with CWA version 1.7.1.? Best wishes,
DS


Corona-Warn-App Open Source Team

@dsarkar, please be patient. I'm running 1.7.1 since yesterday. No issues as of now. I'll report back as soon as I notices any issues.

@dsarkar, no issues with 1.7.1 since almost 2 week. Looks good. I'll keep watching and will notify if issues arise.

Thanks!

Hi @bomilkar, and community,

Thanks for the feedback and contributions! We will close this issue now. Should the problem re-occur, reopen this issue, please. Best wishes,
DS


Corona-Warn-App Open Source Team

I had the same issue on a Samsung Galaxy A tablet running Android 10. Bluetooth spontaneously disabled itself. I could not directly enable Bluetooth again. I moved the Bluetooth slider, but it had no effect.
After I enabled Aeroplane mode and then disabled that I could enable Bluetooth again. I doubt that the fault comes from the CWA app though. It is more likely to be a hardware or Android issue.

Was this page helpful?
0 / 5 - 0 ratings