【问题标题】:Connect to BLE device and send/read data via NSNetService on iOS 7在 iOS 7 上通过 NSNetService 连接到 BLE 设备并发送/读取数据
【发布时间】:2014-09-24 10:51:09
【问题描述】:

我有一个 iPhone 应用程序,它通过 NSNetService 与外部设备通信。 现在我想添加对蓝牙的支持。 所以我想通过蓝牙 (BLE) 发现并连接到设备,连接后我想通过NSNetService 发送/接收数据,所以我重用现有代码...

这在 iOS7+ 上可行吗?任何示例/提示将不胜感激。

【问题讨论】:

    标签: ios iphone bluetooth nsnetservice nsnetservicebrowser


    【解决方案1】:

    NSNetService 使用 TCP/IP 和多播 DNS。低功耗蓝牙没有实现 TCP/IP 网络,因此 NSNetService 不能应用于 BLE 连接。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-05-03
      • 2013-08-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-01
      • 1970-01-01
      相关资源
      最近更新 更多