使用 android 4.4.2 的 Nexus 7 (ME370T) 上的 BLE
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20669590/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
BLE on Nexus 7 (ME370T) with android 4.4.2
提问by Pawel
I've been trying to pair BLE device with my Nexus 7 (ME370T) using sample from sdk (sdk\samples\android-18\legacy\BluetoothLeGatt). But I'm getting information "Ble not supported". I was searching for solution and I've only found that:
我一直在尝试使用来自 sdk (sdk\samples\android-18\legacy\BluetoothLeGatt) 的示例将 BLE 设备与我的 Nexus 7 (ME370T) 配对。但我收到信息“不支持 Ble”。我正在寻找解决方案,我只发现:
NB! Nexus 7 (2012) with Android 4.3 is not delivered with BLE enabled. To work with BLE on this device you will >need the Bluetooth Low Energy Enabler tool. Prerequisites for this to work is that the device is rooted and that >the BusyBox app is installed.
注意!配备 Android 4.3 的 Nexus 7 (2012) 未启用 BLE。要在此设备上使用 BLE,您将 > 需要低功耗蓝牙启动器工具。此操作的先决条件是设备已获得 root 权限并且 > BusyBox 应用程序已安装。
I couldn't find any information about support on 4.4.2 or any enabled for 4.4.2. I only could find
我找不到有关 4.4.2 支持或任何已启用 4.4.2 的信息。我只能找到
Just in case some one else is searching for BLE on Nexus 7 - this ROM has a working BLE on 4.4 KitKat. It is almost >Stock ROM called 'purity'. PURITY ROM (link: http://forum.xda-developers.com/showthread.php?t=2222374).
以防万一其他人在 Nexus 7 上搜索 BLE - 该 ROM 在 4.4 KitKat 上有一个可用的 BLE。它几乎是>Stock ROM,称为“纯度”。PURITY ROM(链接:http: //forum.xda-developers.com/showthread.php?t=2222374 )。
And the question is do I need to root my Nexus 7 with 4.4.2 to another ROM to enable BLE? Will it work after mod?
问题是我是否需要将带有 4.4.2 的 Nexus 7 植根到另一个 ROM 才能启用 BLE?mod后能用吗?
回答by Big Rich
Basically, it seems that the Broadcom Bluetooth chipset within the 2012 Nexus 7 isBluetooth 4.0 LE/Low Energy (BLE) capable, however, Google never certified it as such, only certifying to the then current v3.0 spec. This means that Google probably now see no financial benefit in re-certifying the device for legal BLE development (as the 2012 Nexus 7 is now EOL). However, there is a light at end of the tunnel.
基本上,它似乎内Broadcom的蓝牙芯片组2012年的Nexus 7是蓝牙4.0 LE /低功耗(BLE)能够,但是谷歌从来没有证明它是这样,只能证明在当时的V3.0规格。这意味着谷歌现在可能认为重新认证设备用于合法 BLE 开发没有任何经济利益(因为 2012 Nexus 7 现在已停产)。然而,隧道尽头有一盏灯。
Manuel Naranjo has created a Android Open Source Project (AOSP) code patch (which I believe Google avoided, due to the above) which he has submitted, freely, to the AOSP-based CyanogenModproject (specifically in versions 10.2 and 11 based on Android 4.3 and 4.4 (KitKat), respectively). This means that we doget BLE for the 2012 Nexus 7 (codename 'grouper'), if you install CyanogenMod (or possibly Purity Rom).
Manuel Naranjo 创建了一个 Android 开源项目 (AOSP) 代码补丁(我相信谷歌避免了,由于上述原因),他已将其免费提交给基于 AOSP 的CyanogenMod项目(特别是在基于 Android 的 10.2 和 11 版本中) 4.3 和 4.4(奇巧))。这意味着如果您安装 CyanogenMod(或可能是 Purity Rom),我们确实会为 2012 Nexus 7(代号“grouper”)获得 BLE。
If you're interested in the BLE patches Manuel made, they can be found here, his changes are reasonably easy to follow (he removed the 'false' switches for BLE etc., amongst other changes).
如果您对Manuel 制作的 BLE 补丁感兴趣,可以在此处找到它们,他的更改相当容易理解(他删除了 BLE 等的“假”开关,以及其他更改)。
I would assume that these patches could also be applied to the stock 2012 Nexus 7 Wifi ('grouper') Google Android source build (which can be found here), if a 3rd-party custom Rom like CyanogenMod wasn't to your liking (Nexus 7-specific binary hardware drivers, required for the build, including Broadcom Bluetooth, are available here).
我会认为这些补丁也可以适用于股票2012的Nexus 7(WIFI“斑”)谷歌Android源码编译(可以发现这里),如果喜欢的CyanogenMod第三方ROM定制不是根据自己的喜好(构建所需的 Nexus 7 特定二进制硬件驱动程序(包括 Broadcom 蓝牙)可在此处获得)。
I'm looking at picking up an older Nexus 7, as they're very low-cost right now (£99 in the UK), and Google/CyanogenMod will probably ensure a continued upgrade path, for some while (I'm hoping for BLE Peripheral support, possibly in Android 4.5).
我正在考虑购买较旧的 Nexus 7,因为它们现在的成本非常低(英国为 99 英镑),而且 Google/CyanogenMod 可能会确保持续升级一段时间(我希望BLE 外设支持,可能在 Android 4.5 中)。
BTW, Manuel also markets a Nexus BLE Helper @ Google Play (paid)which I assume somehow simplifies the installation of his workaround, without have to flash the entire OS. (Disclaimer - I am no way connected to the developer).
顺便说一句,Manuel 还推出了一个Nexus BLE Helper @ Google Play(付费),我认为它以某种方式简化了他的解决方法的安装,而不必刷新整个操作系统。(免责声明 - 我与开发人员没有任何联系)。
Edit:I found this additional threadwhich pinpoints the Bluetooth omission within the Google codebase.
编辑:我发现了这个额外的线程,它指出了谷歌代码库中的蓝牙遗漏。
回答by dull_boy
I do some work on 2012 Nexus 7(4.1.2,first version, Not Nexus 7 II) and can get rssi from BLE tag. So that is true ,Big Rich's statement :Basically, it seems that the Broadcom Bluetooth chipset within the 2012 Nexus 7 is Bluetooth 4.0 LE/Low Energy (BLE) capable. I don't update to android 4.3, but I know android 4.3's api begin support BLE. I suggest you find some BLE tool from android market to check whether your device is capable BLE on specific HW and SW version.
我在 2012 Nexus 7(4.1.2,第一个版本,不是 Nexus 7 II)上做了一些工作,并且可以从 BLE 标签获取 rssi。所以这是真的,Big Rich 的声明:基本上,2012 Nexus 7 中的 Broadcom 蓝牙芯片组似乎支持蓝牙 4.0 LE/低功耗 (BLE)。我没有更新到 android 4.3,但我知道 android 4.3 的 api 开始支持 BLE。我建议您从 android 市场找到一些 BLE 工具来检查您的设备是否支持特定硬件和软件版本的 BLE。
回答by Victor Sergienko
There is a thread on XDA-devwhere people compiled the patched libraries for Nexus 7 2012, packed in recovery-installable zips. The last one is said to work BLE on Android 5.1.1 too.
XDA-dev 上有一个线程,人们为 Nexus 7 2012 编译了修补库,打包在可恢复安装的 zip 中。据说最后一个也可以在 Android 5.1.1 上运行 BLE。
回答by Vahid
I just get BLE working on Android 7 with this Custom ROM + speed up my nexus 7:
我只是让 BLE 在 Android 7 上使用这个自定义 ROM + 加速我的 nexus 7:
https://forum.xda-developers.com/nexus-7/development/rom-android-7-aosp-grouper-t3467514
https://forum.xda-developers.com/nexus-7/development/rom-android-7-aosp-grouper-t3467514