App aware Bluetooth BLE communication between Android and Iphone - android

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.

Related

Can bluetooth connect two same devices?

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.

Bluetooth Low Energy Device Simulator/Emulator

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

Android Wear BLE Central Role

Is there any limitation for an Android Wear smart-watch to connect via BLE to a device that is not a smartphone to read data? An example is if for example a microwave oven was able to send a message indicating that it is complete, could an Android Wear device consume this data?
I am not sure if Android Wear devices are restricted to only communicating with smartphones, or if they cannot operate as a central device.

Can bluetooth of android device be discovered by iOS?

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).

Make communication between 2 android phones over BLE

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.

Categories

Resources