简体   繁体   English

Android上的蓝牙低功耗发现

[英]Bluetooth Low Energy Discovery on Android

It seem Bluetooth Low Energy (aka Bluetooth Smart) has no official support on Android, even version 4.2. 看起来蓝牙低功耗(又名蓝牙智能)在Android上没有官方支持,即使是版本4.2。 Anyone know if the standard Android API can discovery BLE devices? 有人知道标准Android API是否可以发现BLE设备? (I don't need pairing just discovery would be good) (我不需要配对只是发现会很好)

EDIT 2: Seems like my lucky day is today ;) : new link EDIT: Seems like today is your lucky day: Open Source API 编辑2:好像我的幸运日是今天;): 新链接 编辑:似乎今天是你的幸运日: 开源API

I guess this answer is not adequate, but it is: on some devices yes, on others no. 我想这个答案是不够的,但它是:在某些设备上是的,在其他设备上没有。 A company I worked for did some testing with it and they could pair in on a Galaxy S3 while my HTC One S didn't even discover it. 我工作的一家公司做了一些测试,他们可以配对Galaxy S3,而我的HTC One S甚至没有发现它。

So if a manufacturer has implemented this feature it will work, but most times it won't. 因此,如果制造商已实施此功能,它将起作用,但大多数情况下它不会。

Some discussion about this: Texas Instruments 关于此的一些讨论: 德州仪器

It is correct that Android took a switch from Bluez -> Broadcom Bluetooth. Android从Bluez - > Broadcom蓝牙转换是正确的。 This switch was causing lots of problems for Android users. 这个开关给Android用户带来了很多问题。 Missing BT classic profiles and Wifi vs BT coexistence (one probably reset the other since they are in the same chipset in most phones). 缺少BT经典配置文件和Wifi与BT共存(一个可能重置另一个,因为它们在大多数手机中都在同一芯片组中)。 iPhone and MAC computers suffer a lot from the same problem (BT vs Wifi). iPhone和MAC计算机遭遇同样的问题(BT vs Wifi)。

The Broadcom Open Source Low Energy API was not included in 4.2. Broadcom开源低能耗API未包含在4.2中。

HTC One X+ got slightly modified (?) Broadcom BLE API on top of Bluez in 4.1.x and it works reasonably good though I have to retry connection sometimes. HTC One X +在4.1.x中在Bluez之上略微修改了(?)Broadcom BLE API,虽然我有时需要重试连接但它工作得相当好。 The package name is htc not broadcom but sometimes Eclipse error messages tells that it is missing some broadcom references. 包名称是htc而不是broadcom,但有时Eclipse错误消息告诉它缺少一些broadcom引用。 Also Samsung got a "secret" API for BT BLE with their own package name which can discover devices but seems to be not really robust (which may be why it is "secret") 此外,三星还为BT BLE提供了一个“秘密”API,它有自己的包名,可以发现设备,但似乎不是很强大(这可能就是它“秘密”的原因)

Google have officially said that "BLE is the next big thing we will release". 谷歌已正式表示“BLE是我们将发布的下一件大事”。 So maybe in Android 5.0? 也许在Android 5.0中? but hopefully before so Galaxy S2 (which have such a big marketshare and uses the same chipset as iPhone 4s) can get BLE support. 但希望之前Galaxy S2(拥有如此大的市场份额并使用与iPhone 4相同的芯片组)可以获得BLE支持。 (Just speculations and hopes from my side). (只是我身边的猜测和希望)。 If Android 5.0 get's BLE API's then Samsung Galaxy S3 should get it as Samsung has listed this as getting Android 5.0. 如果Android 5.0获得了BLE API,那么三星Galaxy S3应该得到它,因为三星已将其列为获得Android 5.0。

Only time or Google will tell... It's way overtime getting this old Nokia Research Center technology out in other than Meego and iOS devices. 只有时间或谷歌会告诉......除了Meego和iOS设备之外,这种旧的诺基亚研究中心技术已经过时了。

Devices with the relevant hardware will work with Android 4.3.x support. 具有相关硬件的设备将支持Android 4.3.x. I just put a Galaxy S2 GT-I9100 to 4.3.1 Slimbean and can now pair it with a Bluetooth 4.0 LE/Smart heart rate monitor. 我只是将Galaxy S2 GT-I9100放到4.3.1 Slimbean上,现在可以将它与蓝牙4.0 LE / Smart心率监测器配对。 This, in spite of the stock hardware only ever supporting BT 3.0+, according to Samsung. 据三星称,尽管库存硬件只支持BT 3.0+。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM