- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
机器人documentation状态:
Note: You can only scan for Bluetooth LE devices or scan for Classic Bluetooth devices, as described in Bluetooth. You cannot scan for both Bluetooth LE and classic devices at the same time.
但是我注意到调用 mBtAdapter.startDiscovery();正在返回经典和 btle 设备。有人知道什么是正确的吗?
最佳答案
根据我的理解,文档的意思是您不能拥有 startLeScan()和一个 startDiscovery()同时运行。原因可能是只有一个 BluetoothAdapter 对象(代表本地蓝牙硬件的对象)因此它不能同时执行两个使用 BluetoothAdapter 的不同操作。(如果有人知道它在背景,让我们知道)
startLeScan() -> 仅扫描 BLE 设备
startDiscovery() -> 发现所有蓝牙设备,而且它只扫描12秒并且不能更改(阅读方法描述)
注意:在找到 BT 设备时执行 startDiscovery() 查询扫描后,您可以获得设备类型以识别每个设备是什么,例如:
int deviceType = device.getType();
if (deviceType == BluetoothDevice.DEVICE_TYPE_CLASSIC) {
} else if (deviceType == BluetoothDevice.DEVICE_TYPE_LE) {
} else if (deviceType == BluetoothDevice.DEVICE_TYPE_DUAL) {
} else if (deviceType == BluetoothDevice.DEVICE_TYPE_UNKNOWN) {
}
关于经典和 BTLE 设备的 Android 蓝牙扫描,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25065810/
尽管我指定了两个服务 UUID 和服务,IOS 仅广告一项服务,但我没有收到任何错误,并且添加服务错误函数被调用两次,两次都没有错误,这是我的代码 for UUIDs in advertisingUU
我在我的应用程序中使用 Android Beacon Library,我逐字逐句地复制了他们的测距示例,但我不断收到代码下方的错误。任何帮助将不胜感激,我刚刚进入 BTLE/beacons packa
我正在开发一个在后台模式下运行的应用程序,以便我的应用程序从 BTLE 配件接收 BT 通知。 当我收到特定通知时,无论应用程序是在后台运行还是在前台运行,我都想拍照。 第一个问题:app会不会因为后
如果在 IOS 设备的范围内有多个相同的 BTLE 信标,如何区分它们而不使用唯一的 MAC 对每个信标进行编程? 最佳答案 如果信标广告相同且 MAC 相同,则无法区分它们。通常每个 BLE 信标都
我正在使用 BTLE 对某些 BTLE 设备使用react,我只需要知道 BTLE 设备何时在某个范围内,不需要配对,只要知道RSSI值即可, 我遇到的问题是 didDiscoverPeriphera
是否所有支持蓝牙 4.0 或更高版本的设备都具有蓝牙低功耗功能? 维基百科指出,低功耗蓝牙也称为智能蓝牙,随着蓝牙核心规范版本 4.0 的改编,智能蓝牙已于 2010 年集成到主要蓝牙标准中。 例如,
我正在寻找一种方法,以便能够在范围内使用我的设备跟踪另一台支持 BTLE 的 iOS 设备。基本上,一台设备必须记录它的地理位置信息,然后使用 BTLE 将其定期发送到另一台设备。 我怎样才能做到这一
我正在尝试获取从 BLE 接收到的负载,它看起来像这样。我正在使用 arduino 在这里工作。 Got payload: DEC: 2 1 26 11 255 76 0 9 6 1 196 192
机器人documentation状态: Note: You can only scan for Bluetooth LE devices or scan for Classic Bluetooth d
我有一个使用 BTLE 连接到设备 (arduino) 的 iOS 应用程序。在我的 iPad iOS 7 上一切正常。升级到 iOS 8 后,CBCentralManager 找不到任何外围设备。
任何人都可以向我指出一个久经考验的低功耗蓝牙开发套件(板)吗? 我对接近配置文件以及与智能手机(尤其是 iPhone 和 Android 设备——以及任何其他具有 BTLE 的设备)的兼容性特别感兴趣
我是这个 UWP 的新手,请耐心等待。我修改了以下MS GitHub中的代码:Link创建一个可以“观看”BTLE 广告的 Windows Phone 应用程序。 但它无法读取任何广告。我的手机确实支
我正在做一个项目,我必须发现 Roving Networks 提供的蓝牙芯片 - RN-42 .开发套件附带一个 ios 应用程序,它显示了如何与芯片通信,但首先我们必须使用 iOS 设置连接/配对(
我正在寻找一种通过串行端口 (RS232) 将数据从嵌入式设备加载到 iPhone 的方法。该应用程序需要在 AppStore 上,而我们公司不属于 MFI 计划。 在你说这是不可能之前,我们正在研究
所以我正在尝试连接到 Polar H7 心率监测器,我需要使用 WPF 应用程序来完成它。我正在使用 Windows 10。 现在我已经使用 UWP 应用程序完成了此操作并且它运行良好,但我想使用 W
我的 IOS 实现有以下代码,问题是 WroteCharacteristicValue 事件从未被触发。当我连接到同一个模块时,它在 android 端被触发。有什么想法吗? public v
我正在尝试使用 4.3 中的新 BTLE API 在 Nexus 7 上实现 BTLE SERVER。我遇到了几个问题。首先,SDK 没有示例。唯一的例子是客户端。其次,文档实际上告诉你做错事。它声明
我是 iOS 应用开发的新手。我必须在 iOS 8.1 模拟器上使用 BTLE 测试应用程序。我找不到如何在模拟器中打开蓝牙。任何人都可以帮助如何在模拟器上测试基于 BTLE 的应用程序。如果有人可以
我想编写一个 iOS 应用程序,列出所有附近的蓝牙设备及其名称、UUID、RSSI 和与我当前位置的大概距离。我探索了 CoreBlueTooth API 并创建了一个中央管理器,但这没有帮助。以下是
我有一个低功耗蓝牙 (BTLE) 设备,我需要将其连接到我的电脑。为此,我在桌面 WPF 应用程序中使用了 Windows API 引用。 蓝牙设备相当简单:1 个服务,2 个特征(一个读取/通知,一
我是一名优秀的程序员,十分优秀!