1
votes

I'm trying to communicate two smartphones with Android 5.x through BLE.

First of all, I've installed the sample app from Google (https://github.com/googlesamples/android-BluetoothLeGatt) to test if the devices are correctly y scanned, but tablets and smartphones are not detected (the bluetooth is visible and enabled in both cases).

In the list only appears bracelets like Xiaomi MiBand, Fitbit... and some Macbooks, but nothing else.

I've read this report: https://code.google.com/p/android/issues/detail?id=82293 and this post (with Android 6.0 must be enable the location): Bluetooth Low Energy startScan on Android 6.0 does not find devices

I've tested with multiple scan apps from the Play Store, but all of them show the same result... I'm going crazy. Scanning from Settings -> Bluetooth the result is correct (smartphones and tablets are detected).

Any idea about this problem? Why this devices are not appearing on the BLE scan?

Smartphones and tablets used to test:

  • Samsung Galaxy S5
  • Xiaomi Redmi Note 2
  • BQ Edison 2
  • iPhone 5
1
Are the devices capable of broadcasting?Tim
I think so... What are you reference exactly with "broadcasting"?adlagar
If a device does not or can not broadcast, it can not be found in a scan. Referring to bluetooth broadcastTim

1 Answers

2
votes

If device has BLE it does not mean that it will be visible (broadcast) any data by default. In order to achieve communication between two smart phones you need to have (install or write your own) application that uses BLE to create proper BLE service that will be exposed to other devices.

Some BLE capable devices such is iPhone for example broadcasts BAS (Battery Service) or similar, but I don't think that Android does.

So, don't expect to find any device on scan that you have described, and if you still need

to communicate two smartphones with Android 5.x through BLE

try to read Bluetooth Low Energy documentation and be ready to understand UUID, GATT, Characteristic...