Android 6 connection problem with Motorola


#1

I have a problem with Muse MU-02 on Android 6, Motorola Moto G4 Plus (client also report it on Moto E 2nd generation), using latest library libmuse_6.0.0.
I am able to pair the device in the Android menu, but then the Muse library or the muse app will not be able to connect.
It works with the MU-01 but the second generation won’t. The MuseListener method museListChanged will never be called to select the headband to connect to.


#2

Has the ACCESS_COARSE_LOCATION been granted to the application?

MU-02 uses Bluetooth Low Energy to communicate with the phone and Android requires this permission (or ACCESS_FINE_LOCATION) in order for the application to see any Bluetooth Low Energy connections.


#3

I can reproduce the problem in the original TestLibMuseAndroid demo. This property is defined in the file TestLibMuseAndroid\app\src\main\AndroidManifest.xml


#4

In Android 6.0 and up, “dangerous” permissions must be granted by the user at runtime, even if the permission appears in the manifest (https://developer.android.com/guide/topics/permissions/requesting.html#perm-groups).

You can check the granted permissions in the Settings app. I can reproduce the behaviour you describe if I do not grant the ACCESS_COARSE_LOCATION permission.

Hope this helps.


#5

I can verify that the Location permission is active in the TestLibMuseAndroid settings, but it still fail to call the museListChanged callback that update the spinner to choose the headband to connect.


#6

I found the problem about the museListChanged callback.

The phone Location setting must be active as well as the application Location setting. The library example will only activate the app setting, not the phone setting.

But now, the connection will still fail for another reason going from CONNECTING -> DISCONNECTED before succeeding. I will post solution when customer service help me out.