This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

(nRF Master Control Panel) how to check if Advertiser Mode is supported?

Hi,

With the latest nRF Master Control Panel App it's possible to simultaneously scan + advertise on some devices. I thought this mode is only supported by devices with at least Android 5.0 and a BT 4.1 chipset, but for some reason some devices meeting this requirements are not able to advertise at all (at least the app tells me they aren't) and other devices with BT 4.0 chipset can simultaneously enter scan and advertising mode.

Can you tell me, how you determine on Android if this mode is supported (in code)?

Thanks and regards Manuel

Parents
  • Manuel,

    The ability of an Android device to act as a peripheral is based upon 2 things:

    1. The ability to instantiate a GATT Server and

    2. The ability to send simultaneous BLE advertisements (thereby allowing other devices to see and connect to your GATT Server)

    The ability to perform both these functions in tandem ensures that the Android device can operate in peripheral mode. Note: a chipsets support of either BT 4.1 or the BT 4.0 spec does not factor into things (as you have seen based upon the premise of your original query).

    Although the APIs for these features were included in Android 5.0 (Lollipop) there was a caveat which meant that the actual device manufacturer had to implement the 2nd feature (ability to send simultaneous BLE advertisements) at the hardware level. e.g. even when running Android 5.0+, the Nexus 4 & 5 do not have the ability to act as a peripheral, however the Nexus 6 & 9 do.

    The following URL highlights the number of known Android based devices (as of Oct 2015) that support Peripheral Mode - https://altbeacon.github.io/android-beacon-library/beacon-transmitter-devices.html

    Determining this feature from code can be done via:

    1. public BluetoothGattServer openGattServer (Context context, BluetoothGattServerCallback callback); - ensures that a GATT Server can be instantiated

    2. bluetoothAdapter.isMultipleAdvertisementSupported(); - ensures that BLE advertisements are supported

    Interestingly, the other new device features listed under the MCP->Device Information can be determined via the: bluetoothAdapter.isOffloadedFilteringSupported(); and bluetoothAdapter.isOffloadedScanBatchingSupported(); calls respectively.

    Let me know whether the above fully clarifies things for you.

    Regards

  • Thanks, this helped a lot!

    But one thing I noticed was that on a Huawei Ascend G7, where it was possible to scan and advertise at the same time, bluetoothAdapter.isMultipleAdvertisementSupported() returned false. So it seems that it's not completely consistent from API side.

    Regards Manuel

Reply Children
No Data
Related