androidbluetooth-lowenergybluetooth-peripheral

Android: BLE without "peripheral” role?


I have simple task to write app that connects and add communication between 2 Android devices. And what I found out ? That Android BLE do not support "peripheral” role.

1) So thats mean that I cannot connect one android "central" device with onother "peripheral” android device by special UUID ? IS that correct ?

2) If cannot connect 2 Android devices via BLE, why do we need BLE on Android at all ? To connect Android with iOS ?

3) How Android device will work with Watches ?


Solution

  • 1) Android 5 (Lollipop) got high level API support for Peripheral role but if the low level HW Driver does not support it or got unsolved firmware bugs or if the Vendor is too cheap to run (re)Certification for Peripheral role then Google gave a way to the Vendor to configure BLE Peripheral role with 0 (Zero) Advertiser resources. It will still have the API's at high level but will just rapport that there are no more resources for advertising. In that case then NO you cannot connect that Android Vendor model with another via BLE. What you mean be "special UUID" is not clear to me. Everyone can generate a 128bit Service UUID and use that but only those in Peripheral Role can Advertise this Service for BLE Central role devices to connect to. A BLE Central role device can actually have Service(s) for a BLE Peripheral role device to discover after the Central Role device connected to the Peripheral Role device. This is not seen very often.

    2) BLE Central role is needed to connect with Watches, Heart rate monitors and properly capable devices that supports BLE Peripheral mode and therefore Advertising (Connectable). This is a good business case but does not cover the fast Search & Discover Phone <-> Phone connection.

    3) Android 4.3 / 4.4 / 5.0 (Lollipop) will work fine with watches since Watches are in Peripheral role and the Android can scan them, connect and keep that connection.

    Yes you can make an App on iOS phone / tablet that got Peripheral Role, search & connect & discover devices that from Android 4.3/4.4/5.0 (Lollipop). Those two can then communicate. Yes you can make an App on Nexus 9 (and hopefully on Nexus 6) that use Peripheral Role to be discovered on iOS/Android 4.3/4.4/5.0 (Lollipop).