未获得完整的BLE外设名称 [英] Not getting full BLE peripheral Name

查看:79
本文介绍了未获得完整的BLE外设名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过BLE从BLE设备获取数据

I am getting Data from BLE Device by Delegate

  • (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)外围adsData:(NSDictionary *)advertisingData RSSI:(NSNumber *)RSSI

但是我没有从这种方法获得完整的peripheral.name.我的BLE设备名称是-d7bce65 3fa1b4bf但我得到-d7bce65(名称由sapce截断)

But i am not getting full peripheral.name form this method. My BLE Device name is - d7bce65 3fa1b4bf But I am getting - d7bce65 (name is truncated by sapce)

请帮助.

推荐答案

广告数据限制为31个字节.除了本地名称,您的设备可能还会发送其他信息,例如服务UUID.如果所有信息都无法容纳31字节的有效负载,则本地名称将被截断.

Advertising data is limited to 31 bytes. Besides the local name, your device is probably sending other information like service UUIDs. When all the info doesn’t fit in the 31 byte payload, the local name gets truncated.

您可以在此处了解广告数据的基础知识. https://www.silabs.com/community/wireless/bluetooth/knowledge-base.entry.html/2017/02/10/bluetooth_advertisin-hGsf

You can learn the basics of advertising data here. https://www.silabs.com/community/wireless/bluetooth/knowledge-base.entry.html/2017/02/10/bluetooth_advertisin-hGsf

这篇关于未获得完整的BLE外设名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆