Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 10 Compatibility #12

Open
SaraHackett13 opened this issue Sep 15, 2020 · 8 comments
Open

Android 10 Compatibility #12

SaraHackett13 opened this issue Sep 15, 2020 · 8 comments

Comments

@SaraHackett13
Copy link

SaraHackett13 commented Sep 15, 2020

Hello,

I am running the ST BLE Sensor app V 4.7.1 on a Motorola Moto g7 Power that runs Android 10 (API 29). I am using the BVBNRG board.

I am having trouble using the BlueVoice portion of the app. After a few seconds, the audio data stops streaming and the waveform graph stops plotting. If I wait a few more seconds, the Bluetooth connection between the phone and BVBNRG board disconnects and reconnects (see log below). Upon reconnection, the audio stream resumes then stops again after a few seconds.

Is the ST BLE Sensor app compatible with Android 10? If so, what changes do I need to make to allow continuous audio stream with the BlueVoice fragment?

Thanks.

09/15 15:01:00: Launching 'BlueMS' on motorola moto g(7) power.
$ adb shell am start -n "com.st.bluems.debug/com.st.BlueMS.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 22070 on device 'motorola-moto_g_7__power-ZF6523P5X4'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
W/st.bluems.debu: Method Landroidx/appcompat/graphics/drawable/a;.b is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/com.st.bluems.debug-X36GYPY5xORBt7A6HCYERw==/base.apk
W/st.bluems.debu: Method Landroidx/appcompat/graphics/drawable/a;.isStateful is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/com.st.bluems.debug-X36GYPY5xORBt7A6HCYERw==/base.apk
W/st.bluems.debu: Method Lio/reactivex/internal/operators/flowable/FlowableReplay$a;.m is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/com.st.bluems.debug-X36GYPY5xORBt7A6HCYERw==/base.apk!classes2.dex
W/st.bluems.debu: Method Lokhttp3/internal/cache/a;.a is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/com.st.bluems.debug-X36GYPY5xORBt7A6HCYERw==/base.apk!classes2.dex
W/st.bluems.debu: Method Lorg/bouncycastle/x509/b;.a is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/com.st.bluems.debug-X36GYPY5xORBt7A6HCYERw==/base.apk!classes3.dex
    Method Lorg/bouncycastle/x509/b;.b is abstract, but the declaring class is neither abstract nor an interface in dex file /data/app/com.st.bluems.debug-X36GYPY5xORBt7A6HCYERw==/base.apk!classes3.dex
I/MultiDex: VM with version 2.1.0 has multidex support
    Installing application
    VM has multidex support, MultiDex support library is disabled.
W/st.bluems.debu: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed)
W/st.bluems.debu: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed)
D/LeakCanary: LeakCanary is running and ready to detect leaks
I/AdrenoGLES: QUALCOMM build                   : 961b24f, Ib57168459a
    Build Date                       : 02/24/20
    OpenGL ES Shader Compiler Version: EV031.27.05.06
    Local Branch                     : 
    Remote Branch                    : 
    Remote Branch                    : 
    Reconstruct Branch               : 
    Build Config                     : S L 8.0.12 AArch64
I/AdrenoGLES: PFP: 0x005ff112, ME: 0x005ff066
W/Gralloc3: mapper 3.x is not supported
W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@18a8c
D/com.st.BlueSTSDK.gui.NodeListActivity: onDiscoveryChange true
D/BluetoothAdapter: isLeEnabled(): ON
D/BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=8 mScannerId=0
D/com.st.BlueSTSDK.gui.NodeListActivity: onNodeDiscovered C0:79:46:34:55:38
D/BluetoothAdapter: isLeEnabled(): ON
D/com.st.BlueSTSDK.gui.NodeListActivity: onDiscoveryChange false
W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@7c78393
D/ConnectionService: id: 1 action:com.st.BlueSTSDK.gui.NodeConnectionService.CONNECT
D/NodeConnectionService: connect C0:79:46:34:55:38
D/NodeStateListener: BVBNRG1 Idle->Connecting
D/BluetoothGatt: connect() - device: C0:79:46:34:55:38, auto: false
D/BluetoothGatt: registerApp()
    registerApp() - UUID=c68bdebb-0bbf-4847-ba48-702f79c27b1d
D/BluetoothGatt: onClientRegistered() - status=0 clientIf=8
D/BluetoothGattServer: registerCallback()
D/BluetoothGattServer: registerCallback() - UUID=2a3fa437-fc4a-44b9-aa9f-f4f439800be3
D/BluetoothGattServer: onServerRegistered() - status=0 serverIf=9
D/BluetoothGattServer: addService() - service: 00000000-0001-11e1-9ab4-0002a5d5c51b
D/BluetoothGattServer: connect() - device: C0:79:46:34:55:38, auto: true
W/st.bluems.debu: Accessing hidden method Landroid/bluetooth/BluetoothGatt;->refresh()Z (greylist, reflection, allowed)
D/BluetoothGatt: refresh() - device: C0:79:46:34:55:38
D/BluetoothGattServer: onServiceAdded() - handle=40 uuid=00000000-0001-11e1-9ab4-0002a5d5c51b status=0
D/com.st.BlueSTSDK.Node: Refreshing Device Cache: true
D/BluetoothGattServer: onServerConnectionState() - status=0 serverIf=9 device=C0:79:46:34:55:38
D/com.st.BlueSTSDK.NodeServer: Our gatt server connection state changed:2
D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=8 device=C0:79:46:34:55:38
D/com.st.BlueSTSDK.Node: Node: BVBNRG1 Status: 0 newState: 2 boundState:12
D/BluetoothGatt: discoverServices() - device: C0:79:46:34:55:38
D/BluetoothGatt: onConnectionUpdated() - Device=C0:79:46:34:55:38 interval=9 latency=0 timeout=400 status=0
D/BluetoothGattServer: onConnectionUpdated() - Device=C0:79:46:34:55:38 interval=9 latency=0 timeout=400 status=0
D/BluetoothGatt: onConnectionUpdated() - Device=C0:79:46:34:55:38 interval=6 latency=0 timeout=500 status=0
D/BluetoothGattServer: onConnectionUpdated() - Device=C0:79:46:34:55:38 interval=6 latency=0 timeout=500 status=0
D/BluetoothGatt: onSearchComplete() = Device=C0:79:46:34:55:38 Status=0
D/BluetoothGatt: setCharacteristicNotification() - uuid: 00002a05-0000-1000-8000-00805f9b34fb enable: true
D/BluetoothGatt: onConnectionUpdated() - Device=C0:79:46:34:55:38 interval=9 latency=0 timeout=400 status=0
D/BluetoothGattServer: onConnectionUpdated() - Device=C0:79:46:34:55:38 interval=9 latency=0 timeout=400 status=0
D/BluetoothGatt: discoverServices() - device: C0:79:46:34:55:38
D/BluetoothGatt: onSearchComplete() = Device=C0:79:46:34:55:38 Status=0
D/NodeStateListener: BVBNRG1 Connecting->Connected
W/AudioTrack: Use of stream types is deprecated for operations other than volume control
    See the documentation of AudioTrack() for what to use instead with android.media.AudioAttributes to qualify your playback use case
D/BluetoothGatt: setCharacteristicNotification() - uuid: 40000000-0001-11e1-ac36-0002a5d5c51b enable: true
D/BluetoothGatt: setCharacteristicNotification() - uuid: 08000000-0001-11e1-ac36-0002a5d5c51b enable: true
D/LeakCanary: Watching instance of androidx.coordinatorlayout.widget.CoordinatorLayout (com.st.BlueMS.demos.Audio.SpeechToText.SpeechToTextFragment received Fragment#onDestroyView() callback (references to its views should be cleared to prevent leaks)) with key 9b6df368-13d6-43fd-887a-fa409b36b284
D/BluetoothGatt: setCharacteristicNotification() - uuid: 08000000-0001-11e1-ac36-0002a5d5c51b enable: false
D/LeakCanary: Scheduling check for retained objects because found new object retained
I/st.bluems.debu: Explicit concurrent copying GC freed 194049(7999KB) AllocSpace objects, 32(640KB) LOS objects, 49% free, 3950KB/7901KB, paused 251us total 57.550ms
D/LeakCanary: Rescheduling check for retained objects in 2000ms because found only 1 retained objects (< 5 while app visible)
W/AudioTrack: Use of stream types is deprecated for operations other than volume control
    See the documentation of AudioTrack() for what to use instead with android.media.AudioAttributes to qualify your playback use case
I/st.bluems.debu: Explicit concurrent copying GC freed 13847(631KB) AllocSpace objects, 27(540KB) LOS objects, 49% free, 3933KB/7867KB, paused 149us total 58.160ms
D/AudioTrack: stop(33): called with 185080 frames delivered
D/LeakCanary: Check for retained object found no objects remaining
D/BluetoothGattServer: onServerConnectionState() - status=0 serverIf=9 device=C0:79:46:34:55:38
E/com.st.BlueSTSDK.Node: onDescriptorWrite Error writing the descriptor for char: 08000000-0001-11e1-ac36-0002a5d5c51b
D/com.st.BlueSTSDK.NodeServer: Our gatt server connection state changed:0
E/com.st.BlueSTSDK.Node: Error connecting to the node:BVBNRG1
D/BluetoothGattServer: clearServices()
D/BluetoothGattServer: close()
    unregisterCallback() - mServerIf=9
D/BluetoothGatt: close()
    unregisterApp() - mClientIf=8
D/NodeStateListener: BVBNRG1 Connected->Dead
D/NodeConnectionService: re connectC0:79:46:34:55:38
D/NodeStateListener: BVBNRG1 Dead->Connecting
D/BluetoothGatt: onClientConnectionState() - status=22 clientIf=8 device=C0:79:46:34:55:38
D/BluetoothGatt: connect() - device: C0:79:46:34:55:38, auto: false
    registerApp()
    registerApp() - UUID=d617ebcd-7aa0-4fcd-83f6-df993a4face3
D/BluetoothGattServer: registerCallback()
    registerCallback() - UUID=f847a361-1631-4273-acfd-cddaa076ea12
D/BluetoothGatt: onClientRegistered() - status=0 clientIf=8
D/BluetoothGattServer: onServerRegistered() - status=0 serverIf=9
D/BluetoothGattServer: addService() - service: 00000000-0001-11e1-9ab4-0002a5d5c51b
D/BluetoothGattServer: connect() - device: C0:79:46:34:55:38, auto: true
D/BluetoothGattServer: onServiceAdded() - handle=40 uuid=00000000-0001-11e1-9ab4-0002a5d5c51b status=0
D/BluetoothGattServer: onServerConnectionState() - status=0 serverIf=9 device=C0:79:46:34:55:38
D/com.st.BlueSTSDK.NodeServer: Our gatt server connection state changed:2
D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=8 device=C0:79:46:34:55:38
D/com.st.BlueSTSDK.Node: Node: BVBNRG1 Status: 0 newState: 2 boundState:12
D/BluetoothGatt: discoverServices() - device: C0:79:46:34:55:38
D/BluetoothGatt: onSearchComplete() = Device=C0:79:46:34:55:38 Status=0
D/BluetoothGatt: setCharacteristicNotification() - uuid: 00002a05-0000-1000-8000-00805f9b34fb enable: true
D/BluetoothGatt: onConnectionUpdated() - Device=C0:79:46:34:55:38 interval=9 latency=0 timeout=400 status=0
D/BluetoothGattServer: onConnectionUpdated() - Device=C0:79:46:34:55:38 interval=9 latency=0 timeout=400 status=0
D/BluetoothGatt: discoverServices() - device: C0:79:46:34:55:38
D/BluetoothGatt: onSearchComplete() = Device=C0:79:46:34:55:38 Status=0
D/NodeStateListener: BVBNRG1 Connecting->Connected
W/AudioTrack: Use of stream types is deprecated for operations other than volume control
    See the documentation of AudioTrack() for what to use instead with android.media.AudioAttributes to qualify your playback use case
D/BluetoothGatt: setCharacteristicNotification() - uuid: 40000000-0001-11e1-ac36-0002a5d5c51b enable: true
D/BluetoothGatt: setCharacteristicNotification() - uuid: 08000000-0001-11e1-ac36-0002a5d5c51b enable: true
@SaraHackett13
Copy link
Author

I have also downloaded ST BLE Sensor app version 4.7.2 from the Google Play store, and I have the same issue.

@PezzoniL
Copy link
Collaborator

PezzoniL commented Sep 16, 2020 via email

@SaraHackett13
Copy link
Author

Hi Luca,

Thanks for getting back to me.

I am using the STEVAL-BLUEMIC-1. I am not sure what firmware version is on the board. I am using the board by itself, not with a larger microcontroller.

The block of code callbacks I posted was from the BlueMS Java code in Android Studio. Those callbacks were coming from the app side, not the board. I haven't touched the binary code that the board runs. How can I re-flash the STEVAL-BLUEMIC-1 board?

Perhaps there is something I can test on the Android Studio side?

Thanks!

@PezzoniL
Copy link
Collaborator

PezzoniL commented Sep 16, 2020 via email

@SaraHackett13
Copy link
Author

That'd be great, thank you!

Just a side note, on a Samsung Galaxy s6 (Android 7.0) the BlueMS app works fine with the STEVAL-BLUEMIC-1 board.

@PezzoniL
Copy link
Collaborator

PezzoniL commented Sep 18, 2020 via email

@SaraHackett13
Copy link
Author

Hi Luca,

I don't see a binary attachment to your previous reply.

Do you know why some phones don't respond to the event indication you recommended below, like the Samsung s10e you mentioned above? If the board doesn't respond to this indication, is there a way to fix it or will I not be able to use that phone?

void aci_gatt_indication_event(uint16_t Connection_Handle,
                               uint16_t Attribute_Handle,
                               uint8_t Attribute_Value_Length,
                               uint8_t Attribute_Value[])
{
  aci_gatt_confirm_indication(Connection_Handle);
}

Are there certain phones that are guaranteed to properly communicate with the STEVAL-BLUEMIC-1 board and run the BlueMS app?

@PezzoniL
Copy link
Collaborator

BlueVoice-BlueNRG1.zip

Sorry the email from gmail had the attach,,, but github don't want a .hex
attached the .zip
ciao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants