I want to know if we can detect android phones as well with BLE Scan. I am trying to develop an android app which can scan nearby Bluetooth Android devices.
I checked both android devices are compatible with BLE with this app: https://play.google.com/store/apps/details?id=com.myan.michaelyanyoga.bluetoothchecker
Note: I am using this code to develop my scanner app: https://github.com/kaviles/BLE_Tutorials. I am able to see my laptop Bluetooth on this list but not other android phones(which supports BLE).
To detect Android phones using BLE, the other device needs to:-
Have Bluetooth turned on.
Be advertising
Unfortunately, most devices are not doing this by default, which means you may not be able to use BLE for your intended purposes. You can test this by doing the following:-
Download the nRF Connect Android app.
Go to ADVERTISER from the top menu.
Toggle the "Test" advertiser.
After this you should begin to see your Android device via Bluetooth.
I hope this helps.
Related
I am working with a firmware team that writes firmware on a QCC3056 Qualcomm chipset that supports earbuds and I develop an android application that supports the BLE earbud Bluetooth device. The earbuds also support google fast pair and this feature requires the BLE mac address to be rotated every 15 min.
So the issue I am seeing here is the android Bluetooth settings recognize two Bluetooth devices with the same name(one is classic and the other one is BLE). I can tell by the mac addresses that one belongs to classic and the other belongs to the BLE address. We are able to connect to the classic instance. However, we are unable to connect to the BLE instance. We would like just one name to show up and the user should be able to connect to it. The firmware team thinks this is expected behavior(two names showing up). As far as I know, from the android end, we don't have any control over the Bluetooth settings. So I wanted to understand if this behavior is expected. I have tested this scenario with SONY WF-1000XM3 which supports Google Fast Pair and I have noticed only one name showing up.
It would be great if anyone can suggest the best possible approach I can take here.
I want to connect two android phone only via BLE. Is it possible? because as per my understanding using Android API I can only connect with BLE enabled devices like smartwatches headphones etc. If I run startLescan() method it only shows my fitness band and headphone.
It does not show other android phones.
Yes its possible. As the hardware equally supports to act as a master or slave, but it depends on whether the OS has provide you the required interface to make a device act as master as well as slave. THe BLE in android phone is equally capabale of becoming a master or peripherical but it depends on whehter android has exposed some interface to make it work ortherwise if not you have to root/reflash your device and make changes at OS level.
Yes, two BLE devices can communicate and has been ever since the original 4.0 release.
The change in 4.1 states that a single device can act as both a master and as a slave simultaneously to two different devices. Once device has to act as periphiral and other as master.
See this: http://www.blemobileapps.com/ble-mobile/
For android this link might be helpful for you: https://code.tutsplus.com/tutorials/how-to-advertise-android-as-a-bluetooth-le-peripheral--cms-25426
Reference: Chipsets/Devices supporting Android 5 BLE peripheral mode
Let me know if this answers your question.
It is possible to connect to Android phone with BLE.
One of the phones has to be a BLE Server and must advertise itself
(a role usually performed by devices like smartwatches and headphones) to be discovered by the other phone.
To advertise itself the app uses the BluetoothLeAdvertiser class.
Such API was added starting from level 21 Lollipop so your server phone should be at least a 5.0 Android device.
Personally I found this tutorial by Andrew Lunsford very useful for understanding how to realize such functionality.
I know, transferring is restricted and i do not need that. Also, i'm aware of BLE capabilities. However, ~35% of android devices out there do not support peripheral mode.
If someone ever tried this, could you tell me: does ios BT api allow to discover android devices? I need only mac (or whatever it called) address from android device, nothing else.
iOS (CoreBluetooth) can discover any Android BLE device as long as it supports the Peripheral role. If your Android device does not support Peripheral role then the iOS device needs to be the Peripheral in your connection scenario.
If you want to use Bluetooth Classic, that is a completely different story because in order to use Bluetooth Classic on iOS you need to be member of Apple's MFI program that comes with extra fees and an NDA.
I want to develop two Android applications out of which one application should act as a Beacon. That is, one of my application installed in one device should listen certain events from the other app installed in other device and should broadcast some information on listening those events.
I read many articles and I found that the Android device must have Bluetooth LE hardware and it must have peripheral mode enabled by the device manufacturer. But most of the manufacturer as well as Google itself has disabled peripheral mode.
So my question is there a way (a Beacon library available?), so that I can make my application to act as Beacon.
Thanks in Advance.
You can use the Android Beacon Library to make a device both transmit as a beacon and detect/decode beacon transmissions.
It is true that devices must have BLE hardware for this to work, Android 4.3+ to detect beacons and Android 5.x+ to transmit as beacons. While not all devices with 5.x+ support peripheral mode needed to transmit, most popular devices do. Google has not disabled this, and their newer Nexus and Pixel devices support transmission as well.
The library linked above has a list of devices known to support transmission, and includes example code showing how to determine this at runtime on a specific device.
If a device does not support peripheral mode, there is nothing you can do short of rooting the device and trying to write a new Bluetooth driver yourself.
I want to connect a 3rd party bluetooth device to my Android Wear watch (Samsung Gear Live). I am trying to find documentation on how to do this but I am not having any luck. All the searches I do seem to think I want to attach to a phone.
Does anyone know of a good example that shows how to connect, for example, a bluetooth heart rate monitor (or other device) to the Android Wear so I can keep a history when the phone isn't present? Is this even possible? Would it be the same protocols as doing it from a phone/tablet?
#Ryan Tensmeyer, I think #Wayne Pieksarki's answer is now out-dated. I was able to create and run a stand-alone app that used BLE to connect to a third-party bluetooth device, namely, a wireless thermometer. I used a library called SweetBlue and tested the stand-alone app on an Android Wear Moto 360. It worked great -- no phone required!
It is not possible to connect 3rd party bluetooth devices to an Android Wear watch as you describe. You will need to pair your heart rate monitor with your phone, extract the data you want, and then use the Data Layer API to send the data to the wearable for display to the user.
EDIT: Android Wear devices now support the ability to pair with Bluetooth devices.