Scan for Bluetooth LE devices not showing up

Questions and Discussions about G-Stomper
Folkdisco
Posts: 57
Joined: Tue Dec 12, 2017 4:04 pm

Scan for Bluetooth LE devices not showing up

Postby Folkdisco » Fri Feb 23, 2018 12:22 am

I have just bought an Akai LPK25 Wireless.
Yay! :-D
Anyway, you have to pair it within the app.
Pairing is explained here:
https://www.planet-h.com/gstomper/docs/html/G-Stomper_UserManual_Midi/part12.htm
But I am not getting the "scan for Bluetooth LE midi devices" button at all.
It just doesn't appear on setup/midi.
I have a Wileyfox Swift 1 running android 6.0.1, which does, apparently, support Bluetooth LE, so I'm not sure what I am missing, or why the button doesn't appear.
I do tend to turn off permissions where I don't think they are needed, which is easy to do under Cyanogen, which comes with the phone. So it's *possible*, that I have turned something off, but I don't think so.
I am running G Stomper version 5.7.0.2, latest version.
User avatar
planet-h
Posts: 1545
Joined: Wed Jun 19, 2013 4:46 pm

Re: Scan for Bluetooth LE devices not showing up

Postby planet-h » Fri Feb 23, 2018 9:31 am

Thanks for your message, Folkdisco
I hope you forgive me, but I had to move the post out of the original feature request topic and stored it as new question instead.
No worries about many topics, that's no problem at all.
But it's much more easier for others to find responses if a question is posted as a new topic, rather than being a response to something completely un-related.

Folkdisco wrote:But I am not getting the "scan for Bluetooth LE midi devices" button at all.
It just doesn't appear on setup/midi.
I have a Wileyfox Swift 1 running android 6.0.1, which does, apparently, support Bluetooth LE, so I'm not sure what I am missing, or why the button doesn't appear.
I do tend to turn off permissions where I don't think they are needed, which is easy to do under Cyanogen, which comes with the phone. So it's *possible*, that I have turned something off, but I don't think so.
I am running G Stomper version 5.7.0.2, latest version.

I quickly checked the code, just to be 100% sure.
Here's what we check in order to show the "Scan for Bluetooth LE Devices".

1. The device must run on Android 6.0 or higher
2. The device must provide the feature "android.software.midi"
3. The device must provide the features "android.hardware.bluetooth" "android.hardware.bluetooth_le"
4. The device can claim access to its Bluetooth adapter

+ the following permission are required:
android.permission.BLUETOOTH : required to access the Bluetooth adapter as described in 4.
android.permission.BLUETOOTH_ADMIN : required to access the Bluetooth adapter as described in 4.
android.permission.ACCESS_COARSE_LOCATION : required for the scan

The Bluetooth permissions will definitely influence the results of the mentioned conditions.
And if one or more of these conditions is/are not met, then the button won't show up.
Folkdisco
Posts: 57
Joined: Tue Dec 12, 2017 4:04 pm

Re: Scan for Bluetooth LE devices not showing up

Postby Folkdisco » Fri Feb 23, 2018 10:14 am

From the page link above, my understanding was that for the permissions, the internal scanner will pop up a request to allow permission, so the button should appear?
Is there a simple (or complicated!) way to check which of these is not being fulfilled?
I tried installing the "BLE Midi Connect" app mentioned in another post, but Play seems to think my device is not compatible.
User avatar
planet-h
Posts: 1545
Joined: Wed Jun 19, 2013 4:46 pm

Re: Scan for Bluetooth LE devices not showing up

Postby planet-h » Fri Feb 23, 2018 11:12 am

Folkdisco wrote:From the page link above, my understanding was that for the permissions, the internal scanner will pop up a request to allow permission, so the button should appear?

That is correct.
But as you said...
I do tend to turn off permissions where I don't think they are needed, which is easy to do under Cyanogen, which comes with the phone. So it's *possible*, that I have turned something off, but I don't think so.

... it might be that you have blocked something.
The permissions for which you're asked for at runtime are so-called "sensitive" permissions.
Sensitive permissions in G-Stomper are only two, Location Access and Storage.
That means, if you turned off the Bluetooth or Bluetooth Admin permission in any way, then the scan button won't show up anymore.
I don't know the internals of Cyanogen or what you can disable in relation to permissions, but if you turn stuff off that is supposed to be turned on, then the app won't work as expected anymore. G-Stomper asks you to turn on Bluetooth, but that is only possible (technically) if the Bluetooth + Bluetooth Admin permission is granted, Also, if any of the Bluetooth permissions are turned off, then condition 4. (as mentioned in the first answer) won't be met anymore.

Folkdisco wrote:Is there a simple (or complicated!) way to check which of these is not being fulfilled?
I tried installing the "BLE Midi Connect" app mentioned in another post, but Play seems to think my device is not compatible.

Without debugging the app on your device, it's not possible to check these conditions.
But the fact that BLE MIDI Connect is not compatible with your device means most likely that one of the required device features is missing.
I'm pretty sure that there are apps available on the play store to check which features your device provides.
With such an app you could check if "android.software.midi", "android.hardware.bluetooth", and "android.hardware.bluetooth_le" are all present on your device.
Folkdisco
Posts: 57
Joined: Tue Dec 12, 2017 4:04 pm

Re: Scan for Bluetooth LE devices not showing up

Postby Folkdisco » Fri Feb 23, 2018 1:25 pm

I have definitely turned on all available permissions for GSS, but maybe I have turned off permissions for something else, like Google play services, and that affecting GSS. I think I have turned the correct things on, but I'm not sure. There's definitely a setting hidden under location for "Bluetooth scanning" for apps.
Don't really want to update android, because apparently, the updates for this phone are buggy and generally speaking, introduce more problems than they are worth.
Thank you for the extra information, which has given me some leads to follow. Let's see.
Folkdisco
Posts: 57
Joined: Tue Dec 12, 2017 4:04 pm

Re: Scan for Bluetooth LE devices not showing up

Postby Folkdisco » Fri Feb 23, 2018 1:41 pm

This page lists good diagnostic tools.
Unfortunately, the diagnostic tool for BLE pairing is "BLE Midi Connect", which again, won't install because it is incompatible with my devices!
Very helpful, cheers!
Might try blagging it onto my device, via my partners phone, and see what happens.
https://play.google.com/store/apps/deta ... tlepairing
Folkdisco
Posts: 57
Joined: Tue Dec 12, 2017 4:04 pm

Re: Scan for Bluetooth LE devices not showing up

Postby Folkdisco » Fri Feb 23, 2018 1:57 pm

Okay, blagged BLE Midi Connect onto my device.
Open it and we get the popup:
"Midi not supported".
I'd like to stay positive, but what on earth does that mean?
Could this be a problem with android.software.midi?
It's strange because usb connection options in settings include a midi option, despite OTG not being supported.
I bought a BLE keyboard because of the otg problem, but it seems it might be more fundamental than that. It's a shame, because my phone works great at everything else, and I don't particularly want to start again.
User avatar
planet-h
Posts: 1545
Joined: Wed Jun 19, 2013 4:46 pm

Re: Scan for Bluetooth LE devices not showing up

Postby planet-h » Fri Feb 23, 2018 3:02 pm

Folkdisco wrote:Open it and we get the popup:
"Midi not supported".
I'd like to stay positive, but what on earth does that mean?
Could this be a problem with android.software.midi?

That means that the feature "android.software.midi" is not provided by your Android OS.
It actually should be provided as it's Android 6.x, but it's most likely a bug in the Cyanogen mod.
I remember similar problems of another user some while ago, and the solution was to install another Cyanogen version.

One thing would be very interesting to know.
Can you please check the following:
Please hook up your Akai LPK25 Wireless over USB OTG.
And if you do so, what kind of dialog box does pop up?
Is it a typical G-Stomper internal dialog box in dark grey color that asks you if you want to use the USB MIDI device?
Or is it a bright Android System dialog box that asks you if you allow G-Stomper to access the USB device?

Android 6.0 should because of the presence of "android.software.midi" show a dark grey popup. If you see a bright system popup, then your device uses the Android 3.1 based fallback MIDI driver (and the cause would be the absence of "android.software.midi").

If that is the case, then the only way to get the problem solved is to upgrade your Android OS.
As "android.software.midi" is a pure software feature that is not dependent on your hardware, the only possible cause of the problems is the Android OS.

Folkdisco wrote:It's strange because usb connection options in settings include a midi option, despite OTG not being supported.
I bought a BLE keyboard because of the otg problem, but it seems it might be more fundamental than that. It's a shame, because my phone works great at everything else, and I don't particularly want to start again.

Also this sounds like a bug in the Cyanogen mod.
Folkdisco
Posts: 57
Joined: Tue Dec 12, 2017 4:04 pm

Re: Scan for Bluetooth LE devices not showing up

Postby Folkdisco » Fri Feb 23, 2018 4:51 pm

planet-h wrote:One thing would be very interesting to know.
Can you please check the following:
Please hook up your Akai LPK25 Wireless over USB OTG.
And if you do so, what kind of dialog box does pop up?
Is it a typical G-Stomper internal dialog box in dark grey color that asks you if you want to use the USB MIDI device?
Or is it a bright Android System dialog box that asks you if you allow G-Stomper to access the USB device?

Sorry, like I said, no OTG on the phone, which is why I had to go Bluetooth.
Bluetooth is definitely the way to go, because of the charging issue.
But everything I read about OS upgrades on the Wileyfox Swift says "don't do it!"
Maybe upgrades have improved, I'll check.
Could plug it into my laptop, which really isn't the point!
Andreas, you're usually very good at responding, but I am not liking any of your answers today! ;-)
Maybe a root and upgrade to a different Cyanogenmod *might* help, but I'm not confident.
Wileyfox lost confidence in the whole Cyanogen project, gave up, and started running with vanilla android instead.
If it's update or buy a new phone, maybe I have to at least try their official android 7/nougat update.
As always, thank you for taking time to respond.
User avatar
planet-h
Posts: 1545
Joined: Wed Jun 19, 2013 4:46 pm

Re: Scan for Bluetooth LE devices not showing up

Postby planet-h » Fri Feb 23, 2018 5:00 pm

Folkdisco wrote:Sorry, like I said, no OTG on the phone, which is why I had to go Bluetooth.

I wasn't 100% sure about it, therefore I just gave it a try.

Folkdisco wrote:Andreas, you're usually very good at responding, but I am not liking any of your answers today! ;-)

Sorry for not having a better one this time. I'm just giving you the facts I know.
Out of curiosity... Was your phone shipped with Cyanogen? Or did you flash it yourself?

Return to “General Questions and Discussions”

Who is online

Users browsing this forum: No registered users and 0 guests