支持Android 5 BLE外设模式的芯片组/设备 [英] Chipsets/Devices supporting Android 5 BLE peripheral mode

查看:125
本文介绍了支持Android 5 BLE外设模式的芯片组/设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

**到目前为止已知的设备概述: Nexus 6 Nexus 9 Moto E 4G LTE, LG G4, Galaxy S6, 三星Galaxy S5(型号SM-G900M), Nexus 5X, 索尼Xperia Z5 Compact, 三星Galaxy Tab S2 **

**Overview of devices known so far: Nexus 6, Nexus 9, Moto E 4G LTE, LG G4, Galaxy S6, Samsung Galaxy S5 (model SM-G900M), Nexus 5X, Sony Xperia Z5 Compact, Samsung Galaxy Tab S2 **

**另请参见 https://altbeacon.github. io/android-beacon-library/beacon-transmitter-devices.html **

** Also see https://altbeacon.github.io/android-beacon-library/beacon-transmitter-devices.html **

Android 5发行版的新功能之一是支持蓝牙低功耗外设模式.虽然它被提升为独立于所使用的设备工作,但它似乎与芯片组有关(请参阅BluetoothAdapter.java中的isMultiAdvertisementSupported()函数).

One of the new features of the Android 5 release is support for Bluetooth Low Energy peripheral mode. While it is promoted to work independent of the used device, it seems to be chipset dependent (see the isMultiAdvertisementSupported() function in BluetoothAdapter.java).

它适用于Nexus 5,但不适用于Nexus 7(称为 https://code.google.com/p/android-developer-preview/issues/detail?id = 589 没有给出结论性的声明.

It is working for the Nexus 5, but not for the Nexus 7 (called a bug in BLE peripheral support Android-L example, but it might never work because of its chipset?). Also https://code.google.com/p/android-developer-preview/issues/detail?id=589 does not give conclusive statements.

我担心的是,由于许多较旧的设备将采用Android 5,因此只有最新的平板电脑(以及相对较新的手机)才支持BLE外设模式.对于依赖此新Android 5功能的应用程序的最终用户来说,这可能还不清楚.

My concern is that, as many older devices are expected to get Android 5, only the newest tablets (and relatively new phones) will support BLE peripheral mode. This might be unclear to the end-user of apps relying on this new Android 5 feature.

对我来说,目前尚不清楚最终将获得Android 5的哪些芯片组/设备将支持BLE外设模式.谁能给我任何有关此的见解?哪些芯片组将支持BLE外设模式?更具体地说,由于我们的许多客户都拥有Nexus 7(2013),Nexus 7是否会受到支持?

For me it is very unclear which chipsets/devices, that will eventually get Android 5, will support the BLE peripheral mode. Anyone who can give me any insights on this? Which chipsets will support the BLE peripheral mode? More specifically, as many of our customers have a Nexus 7 (2013), will the Nexus 7 ever get supported?

编辑19-2-2015: 自2014年12月起,Nexus 5不再受支持,只有Nexus 6和Nexus 9似乎支持BLE外围设备模式/广告.希望支持此功能的设备数量在不久的将来会大大增加.

Edit 19-2-2015: Since December 2014 it is not supported anymore for the Nexus 5, only Nexus 6 and 9 seem to have support for BLE Peripheral Mode/ Advertising. Hope the number of devices supporting this will significantly increase in the near future.

更多信息和讨论,请点击此处: https://code.google.com/p/android -developer-preview/issues/detail?id = 1570

More information and discussion here: https://code.google.com/p/android-developer-preview/issues/detail?id=1570

编辑6-3-2015:添加了概述以供快速参考

Edit 6-3-2015: Added overview for quick reference

编辑17-2-2016::添加了一些我已经检查过但未在其他列表中的设备

Edit 17-2-2016: Added some devices that I've checked myself but were not in any of the other lists

推荐答案

Android 5.0.X仅允许您将新的API用于BLE.这个新的API带有一个新功能,您在问题中提到了这一功能:在自己的Android设备上以外围设备模式使用它进行广告的可能性.但是,此新功能的缺点是它取决于硬件.例如,在启动任何BLE之前,您需要:

The Android 5.0.X will only allow you to use the new API for BLE. This new API comes with a new feature, which you mentioned in your question: The possibility of advertising, from your own Android device, using it in Peripheral mode. However, the disadvantaged of this new feature is that it is hardware dependent. For example, before you start any BLE you need to:

首先:检查是否支持BLE,您可以通过在清单中添加以下行来做到这一点:<uses-feature android:name="android.hardware.bluetooth_le" android:required:"true"/>

First: Check to see if the BLE is supported, which you can do by adding this line in your manifest: <uses-feature android:name="android.hardware.bluetooth_le" android:required:"true"/>

第二:您需要使用以下方法检查芯片组是否支持它:

Second: You need to check if your chipset has support for it, using the following methods:

bluetoothAdapter.isMultipleAdvertisementSupported();
bluetoothAdapter.isOffloadedFilteringSupported();
bluetoothAdapter.isOffloadedScanBatchingSupported();

还要注意,对于上述两种方法,API文档都明确指出:

Also notice that for both of the above methods, the API documentation clearly states that:

如果芯片组支持多播广告,则返回true"

"Return true if the multi advertisement is supported by the chipset"

如果芯片组支持片上过滤,则为true"

"true if chipset supports on-chip filtering"

如果芯片组支持片上扫描批处理,则为true"

"true if chipset supports on-chip scan batching"

话虽如此,这使我们想到了一个问题:

That being said, it brings us to the question:

哪些硬件设备将支持此功能?"

"Which hardware devices are going to support this feature ?"

好吧,答案并非如此,因为这不是蓝牙硬件/协议的强制性功能,并且可能因制造而异.但就目前而言,Nexus 6和Nexus 9是目前唯一正式支持该技术的设备,而没有重大问题,因为它们的硬件已经附带了支持.您能做到的最好的是,现在不仅仅依赖于该技术,并尝试探索其他可能的解决方案(如果有).

Well, the answer to that is a little bit more complicated since this is not a mandatory feature for the bluetooth hardware/protocol and it will probably vary from manufacture to manufacture. But for now, the only currently devices that officially are supporting the technology, without major issues, are the Nexus 6 and Nexus 9, since their hardware already comes with the support. The best that you can do it, is not rely solely on the technology for now and try to explore other possible solutions, if any.

这篇关于支持Android 5 BLE外设模式的芯片组/设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆