1 Reply Latest reply on Jun 15, 2016 5:38 AM by madhul_36

    Can't write to characteristic from iPhone




      I cannot change a characteristic on a 4200BLE using my iPhone 5.  Here is the xcode running on my iPhone:




      let data: String = newAlarmValue.text! //this is coming from an xcode text field.


              let value = data.dataUsingEncoding(NSUTF8StringEncoding)




              print(alarmValueCharacteristic!) //the alarmValueCharateristic type on the 4200BLE is UInt8


              selectedPeripheral!.writeValue(value!, forCharacteristic: alarmValueCharacteristic!, type: CBCharacteristicWriteType.WithoutResponse)




      I print characteristic and value in my console to check I am writing to the right characteristic.  I can change the value in the characteristic with the PSoC Creator interface and confirm the change has occurred in the xcode console.  But I can't get the characteristic value to change over the air.  


      Do I need to do something in the event hanlder in main.c?