Are there any OTA experts out there who might have a clue?
I havn't done any OTA, but according to the comments in the libraries:
/** This event is generated at the GAP Central and the Peripheral end after connection parameter update
is requested from the host to the controller. Event parameter is a pointer to a structure of type CYBLE_GAP_CONN_PARAM_UPDATED_IN_CONTROLLER_T. */
A lack of seeing the event might be caused by the BLE security settings; Simply works, versus pairing versus authentication with pairing, etc. Might cause different events based on which security level you have set.
I would recommend checking the security settings for your app and comparing them with the cysmart to see if they are different in some way.
Thanks e.pratt for your reply! Unfortunately I don't think I saw anything related to security settings when CySmart attempts to bond with the device.
Another thing is that I think the connection immediately hanged after bonding succeeded (CYBLE_EVT_GAP_AUTH_COMPLETE event) before I tried to write any characteristics. This may also be why the UPDATE event didn't show up - because the device has disconnected / hanged by then.
I have been banging my head on this issue for at least a month by now :(
Hmmm, seems like one of the two devices is either resetting (hard crashing the radio), or calling a disconnect function after the CYBLE_EVT_GAP_AUTH_COMPLETE occurs.
Under cysmart, if you go into "Configure Master Settings", and then select the tab "Security Parameters", there will be settings for whether the unit bonds when it pairs, uses unauthenticated, unencrypted, security mode 1 vs 2, etc.
If you can run in debug mode, or at least figure out the order that events and functions are being called, that should help with determining the cause as well.
Hey e.pratt, thanks for your help. I figured it out.
Actually the communication hanged before bonding even began. My app was writing characteristics to PSoC but I did not have PSoC respond to any write requests. Once bonding is complete, the connection would just hang, as expected.
After I added the responses to write request, the update event appeared and things worked as expected.
Thanks again for your help!
Glad you figured it out! Good luck with the rest of the project :)