For quite some time now, I have had a keen interest with the Bluetooth Low Energy (BLE) Protocol version 4.0 and how it works. I have developed an android application that would serve as a central device to the BLE peripheral device. The problem is the BLE device is not yet ready and I would like to know if there is a simulator or an emulator for BLE devices that can interact with my android application installed in my smartphone.
The easiest way to do that without any specific additional HW is to use another Android or iOS mobile phone acting as a peripheral emulating the BLE device that's not ready yet. Thus, you'll be able to test your Central role Android app in a simple way.
All you have to do is download one of the following apps for example, set up your services and characteristics and start playing.
[Android]: nRF Connect for Mobile
[iOS]: nRF Connect for Mobile or LightBlue
Related
I'm working on a project that requires Bluetooth, however I need it to connect with Bluetooth from my app on one phone to my app on another phone.
Is there a way for Bluetooth to be used on two devices of the same type, or is is just different devices that can connect to each other? Could you please also provide me with a link to Android documentation, if possible?
When using BLE, an Android device can act as a peripheral device, a central device, or both. Peripheral mode lets devices send advertisement packets. Central mode lets devices scan for advertisements
See Device modes.
BluetoothLeAdvertiser enables to turn a supported phone into a peripheral.
See Bluetooth Low Energy Advertising for details.
Is it possible to have Bluetooth LE in an android device running peripheral and central modes for advertising and listening at the same time?
Yes, you can definitely serve as peripheral and connect to other peripherals at he same time. One limitation to this is the device limitations. Please download BLE central,Peripheral Checker app tıo make sure your device supports BLE peripheral, BLE central or classic bluetooth modes.
Although, some blogs suggests that it works with Android ver > 4.3.3, in my experience, we could make it working on Android ver 6.0. According to my knowledge, it should also work on Android ver > 5.0
I used Immediate Alert Service example and merged with Android BLE example without any issue. Now I can connect to my smart phone to send data from Smart Discover app (on Google Play), and my device controls to other BLE device.
Yes, you definitely can do it.
I know we cannot transfer data between android and iOS devices through bluetooth. But, can the iOS device scan and "see" the android bluetooth device (get the list with name of bluetooth), in both cases normal bluetooth and BLE?
An app running on iOS cannot discover any Bluetooth 2.1/3.0 devices (excluding MFi devices for which the app is registered, which does not apply to an Android device).
If the Android device is advertising BLE/BT4.0 service(s) then an iOS app can use Core Bluetooth to discover these service(s).
I want to create an app on iOS that need to send/receive small parts of data for another app, on another phone (eg. Android) using the Bluetooth Low Energy protocol.
I know that it is possible between two iOS devices. But, and with Android?
Android device can act as central (meaning they can connect to BLE advertising devices) but cannot act as peripheral (meaning they cannot advertise BLE services).
So you can actually communicate by BLE between an iPhone and an Android devices (the iPhone being used as peripheral, and Android as central) but you cannot do so between 2 Android devices.
I have two android smartphones (Xperia Z and Xperia Z1) and both have BLE capability.
Can I connect to one of them as a peripheral over BLE? In my application I can see and connect a BLE as peripheral (CC2541 device) and I can see all services and characteristics.
But same application can not see one of my phones??
Is there a way to achieve that??
As of Android 4.4 there is no support for peripheral mod in the Android BLE apis. You would need this to be able to make two phones talk over BLE setting one up as a peripheral and the other as central.
There is a feature request for the feature you may want to take notice of.
If you just want to be able to get the two phones connecting there is nothing stopping you from using classic Bluetooth which should be perfectly workable.
Android does not support peripheral mode till version 5.0(latest version) therefore you can not communicate with two smartphone over BLE.
You can communicate over BLE with sensor device and smart phone here smartphone app works as client and senser device as a server.
and if you want to communicate between two smartphone you have to use classic bluetooth.