Core-Bluetooth-Transfer-Demo
                                
                                 Core-Bluetooth-Transfer-Demo copied to clipboard
                                
                                    Core-Bluetooth-Transfer-Demo copied to clipboard
                            
                            
                            
                        didUpdateValueForCharacteristic not called
Hello there..
I am new bie for bluetooth configuration... i am working from last two days on bluetooth communication...
but i am stuck on one point : according to my understanding the "didUpdateValueForCharacteristic" will calls when the characteristic value got changed but it will not call
I am making one function for writing data on characteristic but i am unable to get call of mention method//
At my device console : BSA_BleSeSendRsp (Which send responce after writing value) method call but i am unable to read the value...
one more thing when i write this : "readValueForCharacteristic" " arrPheriphals.objectAtIndex(0).readValueForCharacteristic(characteristic)" didUpdateValueForCharacteristic will get called on continues level
Can u please help me that
Thanks in advance
@ananarola You don't have to invoke didUpdateValueForCharacteristic explicitly. In the configuration I've provided, the characteristic is configured to "notify" which will handle calling that method on the central whenever the receiver updates that characteristic's value.
transferCharacteristic = CBMutableCharacteristic(
    type: transferCharacteristicUUID,
    properties: CBCharacteristicProperties.Notify,
    value: nil,
    permissions: CBAttributePermissions.Readable
)
So, inside the sendData method, you'll find this:
didSend = peripheralManager!.updateValue(
    chunk,
    forCharacteristic: transferCharacteristic!,
    onSubscribedCentrals: nil
)
Which effectively transmits the current chunk of data. If everything else is configured correctly and the central and peripheral have connected to each other, each invocation of this method should cause didUpdateValueForCharacteristic to be called on the central.
Hi i want to read values which is written on characteristic...how can i do this...i want it on specific button eevnt and same way i want to create function which write data on characteristic..how can i achive this....
One more question..i am lil bit confuisng about avertisment data.. what it actually ? need ur help and its really appriciated...
Thanks in advance
anyone in @anitalanet 's position should start with Apple's core Core Bluetooth documentation
This was an awesome code. Can anyone point me to an android equivalent for this code? Thank you!
@yrvlucero, I've found the Android Bluetooth documentation very clear, and the libraries much easier to work with.