【问题标题】:iPhone detecting Bluetooth DeviceiPhone检测蓝牙设备
【发布时间】:2012-11-19 23:27:42
【问题描述】:

我在 iPhone 5 上使用 CoreBluetooth 的 HeartMonitor 示例。

现在我有一个蓝牙 4.0 加密狗(从 ebay 购买),在加密狗设置中我将它设置为耳机。我可以在 iPhone 的 iPhone 蓝牙设置中看到/配对它。但是使用 HeartMonitor 示例代码(将 UUID 选项调整为 Nil),但我无法看到扫描的任何设备。我也尝试过 UUID 180A(广播配置文件)、1108(耳机)和其他各种但没有运气。

- (void) startScanningForUUIDString:(NSString *)uuidString
{
    [centralManager scanForPeripheralsWithServices:nil options:nil];

}

【问题讨论】:

    标签: iphone bluetooth core-bluetooth bluetooth-lowenergy


    【解决方案1】:

    我没有把选项设置为零。 我确实使用了 NSDictionnary:NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:FALSE], CBCentralManagerScanOptionAllowDuplicatesKey, nil]; 不要忘记使用CentralManager

    【讨论】:

      猜你喜欢
      • 2013-05-16
      • 1970-01-01
      • 2021-12-26
      • 2013-02-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-08
      相关资源
      最近更新 更多