【问题标题】:How to detect on ios7 all available bluetooth devices?如何在 ios7 上检测所有可用的蓝牙设备?
【发布时间】:2014-11-08 20:18:01
【问题描述】:

我想在 ios7 上找到所有可用的蓝牙设备(设备名称和 RSSI),但我不知道如何。我尝试使用 Core Bluetooth 框架,但它看不到我的 android 手机和我的 windows 笔记本... 但如果我进入设置 -> 蓝牙,它会显示我的手机和其他设备。

我应该使用哪个框架?

(我使用 ipad 3 测试我的应用程序。)

【问题讨论】:

    标签: objective-c iphone ios7 bluetooth


    【解决方案1】:

    使用LGBluetooth,这里是扫描外设的基本代码。

    [[LGCentralManager sharedInstance] scanForPeripheralsByInterval:4
                                                         completion:^(NSArray *peripherals)
     {
          for (LGPeripheral *peripheral in peripherals) {
              NSLog(@"Name: %@ RSSI: %d", peripheral.name, peripheral.RSSI);
          }
     }];
    

    【讨论】:

    • 谢谢,但这不显示蓝牙设备...我尝试了 LGBluetooth 示例应用程序,但没有显示附近的设备。
    猜你喜欢
    • 2014-03-08
    • 2013-05-16
    • 1970-01-01
    • 1970-01-01
    • 2021-12-26
    • 1970-01-01
    • 2013-03-27
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多