SparkFun Forums 

Where electronics enthusiasts find answers.

Everything with the AmbiqSuite SDK tools and software are welcome here.
User avatar
By hanumanx
#235056
Hi,
I've been trying to use the Artemis Nano with its BLE featues and my Android Q (Samsung Galaxy S9) with various examples with no luck. I've tried the amdtp, the BLE Blink LED example, I've even built my own makefile with a Tag profile. Nothing works.
1. Whenever I'm trying to scan for devices, I get no results [Android: btAdapter.getBluetoothLeScanner().startScan()].
2. I sometime manage to see the device when I scan them using the phone's Bluetooth scanning menu but it only pairs.
3. Using the nRF app I'm trying to connect to it [Android: myBLEDevice.connectGatt()] but getting error message 257 and "Device disconnected"
Is it Android Q's fault? Something incompatible here? Anyone had these kind of issues?
Thanks!!
User avatar
By Barber256
#235752
BLE support was added to the Android SDK back when Android 4.3 (Jelly Bean, API level 18) was released, but our experiences with BLE on Android 4.3 and 4.4 (KitKat, API level 19) had been less than ideal: there were threading issues in the BLE scan callback that developers had to work around by manually juggling threads (which is always a bad idea), and certain Samsung and LG devices required a restart of their Bluetooth radios to kick-off a BLE scan that had previously been stopped. We also tried to filter scan results by service UUID using the provided API method, but the scan simply stopped returning results altogether. myccpay
User avatar
By johnsonsellen
#238590
On Android 6.0 and later, the connectGatt method of BluetoothDevice supports a 'transport' parameter which allows forcing a BLE connection. On older versions of Android, this version of the method is accessible via reflection. Using the TRANSPORT_LE option solves connection problems for many dual-mode devices (for me at least - it's not documented what the default TRANSPORT_AUTO option actually does - some Bluetooth stacks may prefer BLE when both modes are available)

nRF Connect should have an option to prefer BLE connections over BR/EDR (or even default to it). DGME Employee Login
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum