swift4でiphone-BLESerial3間のBLE通信を行うプログラムを書いています。
peripheral.setNotifyValue(true, for: characteristic)で次のメソッド,
swift
1// notification ON/OFFの状態を確認するためのメソッド 2 func peripheral(_ peripheral: CBPeripheral, didUpdateNotificationStateFor characteristic: CBCharacteristic, error: Error?) { 3 if error != nil { 4 print("Notify状態更新失敗...error: (String(describing: error))") 5 } else { 6 print("Notify状態更新成功! isNotifying: (characteristic.isNotifying)") 7 } 8 }
が呼ばれると思いますが,そこで
Notify状態更新失敗...error: Optional(Error Domain=CBATTErrorDomain Code=6 "The request is not supported." UserInfo={NSLocalizedDescription=The request is not supported.})
というエラーが出てしまいます。このエラーの意味やその対処法について教えていただきたいです。
あなたの回答
tips
プレビュー