【问题标题】:Can I implement an iOS App to act as a BLE service?我可以实现一个 iOS 应用程序来充当 BLE 服务吗?
【发布时间】:2016-12-08 15:28:10
【问题描述】:

我可以实现一个 iOS 应用来充当蓝牙低功耗服务吗?

我需要能够以编程方式定义:

  • 服务 UUID
  • 服务特征
  • 一种更新这些值的方法
  • 一种方式定义用户权限的特性:读/写/通知
  • 一种定义服务传输 (TX) 功率的方法

如果您能指出一个好的演示/示例以开始使用,甚至分享一些代码 sn-p 以便它可以成为 iOS 文档的一部分,将不胜感激。

【问题讨论】:

标签: ios core-bluetooth cbperipheral bluetooth-peripheral


【解决方案1】:

尽可能通读核心蓝牙指南,尤其是设置外围服务:

https://developer.apple.com/library/content/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/AboutCoreBluetooth/Introduction.html#//apple_ref/doc/uid/TP40013257-CH1-SW1

请记住,如果您要调整这些参数,则需要注意 iOS 如何更改在后台模式/非活动状态下发出的 BLE 数据结构。

【讨论】:

    猜你喜欢
    • 2021-04-11
    • 1970-01-01
    • 2011-08-18
    • 2020-06-09
    • 1970-01-01
    • 2023-04-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多