Are you getting Disconnect even? If then, Can you please let us know what is the disconnect reason showing on peripheral side(Use some UART prints)? When exactly is the disconnection happening - Just while maintains connection/ while writing or reading any data/ sending some notifications?
The disconnects appear to be rather random. Sometimes I can get to reading (I have not tried writing with the mobile app but writing works with the Desktop).
Could you please clarify what you mean by obtaining the reason for disconnect using some UART pins. On our board the only method of communication external to the board is I2C or SWD. The board is only 1" square so many typical options needed to be removed. I suppose if I had to I could solder wires directly on the PRoC Module if I needed to but I'm hoping your perhaps talking about the log file from CySmart?
-> Regarding Disconnect reason:
Refer BLE component datasheet. You can see the description of event.
CYBLE_EVT_GAP_DEVICE_DISCONNECTED : Disconnected from remote device or failed to establish connection. Parameter returned with the event contains pointer to the reason for disconnection, which is of type uint8. For details refer core spec 4.2, vol2, part D .
So what you have to do in the project is hope there will be a UART to see the debug prints in the project. If then, in the CYBLE_EVT_GAP_DEVICE_DISCONNECTED event, print the event parameter value, for eg:
printf("Error code is : 0x%x",*(uint8 *)eventParam);
and see what error code are you getting. Now check in the core spec part mentioned, there you can find the reason of error code. This is the way to find the reason.
However please provide your project , so that to test it and find out the issue.
How can I send you the project off-line?
You can create a technical support case and share the project with us.