【问题标题】:Bluetooth Low Energy Characteristic Value from Byte来自字节的低功耗蓝牙特性值
【发布时间】:2016-01-31 05:25:45
【问题描述】:

背景:

我正在关注this tutorial from raywenderlich 将蓝牙低能量屏蔽连接到我的项目。我正在使用 Adafruit BLE 朋友。

问题:

我不知道如何为 BLE 朋友指定 UUID。这是一张关于Adafruits特性的图片:

这里是the link to the page on Adafruits page

如何将特征 UUID 格式化为以下样式:F38A2C23-BC54-40FC-BED0-60EDDA139F47

感谢您的帮助,

乔尔

【问题讨论】:

    标签: bluetooth-lowenergy core-bluetooth uuid ios-bluetooth


    【解决方案1】:

    我相信可以为 Service 和 Characteristic 创建 CBUUID 常量,如下所示。

    let kServiceUART = CBUUID(string: "6E400001-B5A3-F393-­E0A9-­E50E24DCCA9E") // UART Service
    let kCharTX      = CBUUID(string: "6E400002-B5A3-F393-­E0A9-­E50E24DCCA9E") // TX Characteristic (Property = Notify)
    let kCharRX      = CBUUID(string: "6E400003-B5A3-F393-­E0A9-­E50E24DCCA9E") // RX Characteristic (Property = Write without response)
    

    我没有可供验证的 BLE 朋友。

    【讨论】:

    • 哦,我知道你是怎么弄到这些的了。非常感谢,我马上试试。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-03-23
    • 1970-01-01
    • 1970-01-01
    • 2013-03-07
    • 1970-01-01
    • 1970-01-01
    • 2012-05-08
    相关资源
    最近更新 更多