chipsets supporting BLE peripheral role on Android 5 [closed]

主宰稳场 提交于 2019-12-11 03:12:54

问题


The new BLE peripheral mode introduced by Android 5.0 (Lollipop) won't be enabled on the Nexus 4, 5, or 7 (https://code.google.com/p/android-developer-preview/issues/detail?id=1570#c52), but will be enabled on the Nexus 6 and 9.

Even though the Bluetooth 4.0 compliant chipsets in the Nexus 4/5/7 should support both Central and Peripheral modes, Android 5.0 has singled out the Peripheral advertising function by adding the boolean call "BluetoothAdapter.isMultipleAdvertisementSupported()".

As an example, this code will show that advertisement is not supported on a Nexus 5, but that it is supported on a Nexus 9.

BluetoothManager btMgr = (BluetoothManager) this.getSystemService(Context.BLUETOOTH_SERVICE);
BluetoothAdapter btAdptr = btMgr.getAdapter();

if (btAdptr.isMultipleAdvertisementSupported()) {
    Log.v(TAG, "advertisement is SUPPORTED on this chipset!");
} else {
    Log.v(TAG, "advertisement NOT supported on this chipset!");
}

AndroidManifest.xml should at least have

<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>

Whenever I look up a chipset I only see that it "supports Bluetooth 4.0" and no distinction is made between Central and Peripheral support. Is there a way to tell which Bluetooth chipsets would support Peripheral mode on Android 5, without running the above code or having access to their firmware source?

来源:https://stackoverflow.com/questions/26997049/chipsets-supporting-ble-peripheral-role-on-android-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!