You are here

Can't write to characteristic from iPhone | Cypress Semiconductor

Can't write to characteristic from iPhone

Summary: 1 Reply, Latest post by Madhu Sudhan on 15 Jun 2016 05:38 AM PDT
Verified Answers: 1
Last post
Log in to post new comments.
Pat Dolan's picture
24 posts


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?



mady's picture
Cypress Employee
963 posts


Are you able to write the charactertis value using a CySmart iOS App or CySmart PC Tool? If so, the problem might be with your iOS Code.

If not, please check if the "write" property is selected in the Profile Settings in the BLE Component Window.


- Madhu Sudhan

Log in to post new comments.