简体   繁体   English

未获得完整的BLE外设名称

[英]Not getting full BLE peripheral Name

I am getting Data from BLE Device by Delegate 我正在通过BLE从BLE设备获取数据

  • (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)外围广告数据:(NSDictionary *)广告数据RSSI:(NSNumber *)RSSI

But i am not getting full peripheral.name form this method. 但是我没有从这种方法得到完整的peripheral.name。 My BLE Device name is - d7bce65 3fa1b4bf But I am getting - d7bce65 (name is truncated by sapce) 我的BLE设备名称是-d7bce65 3fa1b4bf但我正在获取-d7bce65(名称由sapce截断)

Please help. 请帮忙。

Advertising data is limited to 31 bytes. 广告数据限制为31个字节。 Besides the local name, your device is probably sending other information like service UUIDs. 除了本地名称之外,您的设备可能还会发送其他信息,例如服务UUID。 When all the info doesn't fit in the 31 byte payload, the local name gets truncated. 当所有信息都无法容纳31字节的有效负载时,本地名称将被截断。

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 https://www.silabs.com/community/wireless/bluetooth/knowledge-base.entry.html/2017/02/10/bluetooth_advertisin-hGsf

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM