iPhone 6个支持BLE 4.2,但没有例子

iPhone 6 support BLE 4.2, but no example

找到iPhone6个支持BLE 4.2

与BLE 4.0相比,v4.2在安全性上有了很大的提升,支持ECDH

我想做一些基于ECC的测试。有什么例子吗?我在 iOS 9.1 API

中找不到任何 API 变化

这很简单,无论如何 iOS。您所需要的只是标记您的特征并设置权限,如下所示。剩下的就交给你了。

emailCharacteristic = [[CBMutableCharacteristic alloc]
    initWithType:emailCharacteristicUUID
    properties:CBCharacteristicPropertyRead
    | CBCharacteristicPropertyNotifyEncryptionRequired
    value:nil permissions:CBAttributePermissionsReadEncryptionRequired];

实际上,它是 iOS 6.0 附带的(刚刚发现)!它可能没有内置到 ble 4.0 芯片中,但它建立在基本的 ble 规范之上,iOS 在软件方面处理它。

iOS 台设备上应该会出现一个弹出窗口,要求您允许配对(受信任的渠道)。现在,我不知道当你直接处理微控制器和 ble 芯片时它是如何工作的。我的猜测:您只需要在 iOS 设备上接受配对即可。

参考: https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/BestPracticesForSettingUpYourIOSDeviceAsAPeripheral/BestPracticesForSettingUpYourIOSDeviceAsAPeripheral.html#//apple_ref/doc/uid/TP40013257-CH5-SW9

CBCharacteristicProperties: https://developer.apple.com/library/prerelease/ios/documentation/CoreBluetooth/Reference/CBCharacteristic_Class/index.html#//apple_ref/c/tdef/CBCharacteristicProperties