iOS蓝牙相关

CoreBluetooth1 初识
CoreBluetooth2 作为 Central 时的数据读写
CoreBluetooth3 作为 Central 时的数据读写(补充)
CoreBluetooth4 作为 Central 时的数据读写(最佳实践)
CoreBluetooth5 作为 Central 时的数据读写(OTA 固件升级与文件传输)
CoreBluetooth6 作为 Peripheral 时的请求响应
CoreBluetooth7 作为 Peripheral 时的请求响应(最佳实践)
CoreBluetooth8 后台运行蓝牙服务


蓝牙写数据权限问题
根据蓝牙writeCharacteristic.properties判断,CBCharacteristicWriteWithoutResponse还是CBCharacteristicWriteWithResponse

[_peripheral writeValue:data forCharacteristic:_writeCharacteristic type:CBCharacteristicWriteWithoutResponse];
[_peripheral writeValue:data forCharacteristic:_writeCharacteristic type:CBCharacteristicWriteWithResponse];

CBCharacteristicWriteWithResponse会响应CBPeripheral的代理方法

/*!
 *  @method peripheral:didUpdateValueForCharacteristic:error:
 *
 *  @param peripheral       The peripheral providing this information.
 *  @param characteristic   A <code>CBCharacteristic</code> object.
 *  @param error            If an error occurred, the cause of the failure.
 *
 *  @discussion             This method is invoked after a @link readValueForCharacteristic: @/link call, or upon receipt of a notification/indication.
 */
- (void)peripheral:(CBPeripheral *)peripheral didUpdateValueForCharacteristic:(CBCharacteristic *)characteristic error:(nullable NSError *)error;
兼容两种写入类型.jpeg
swift版兼容两种写入类型.png

iOS Bluetooth 打印小票(一)
iOS Bluetooth 打印小票(二)
iOS如何完成蓝牙打印机功能
蓝牙RSSI计算距离
获取蓝牙外设Mac地址


IOS蓝牙4.0开发问题
CBCentralManagerDelegate


关于蓝牙Mesh您必须知道的七件事
基于BlueNRG开发手册
STSW-BNRG-Mesh
STSW-BNRG-Mesh 中文


iOS蓝牙提示框

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容