In CySmart API getting a CONNECTION_TIMEOUT event

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
D_Sd_3235936
Level 4
Level 4
25 sign-ins 50 questions asked 25 replies posted

I am using the API dll.

Looking for a way to imitate the disconnect event in CySmart1.3 , when the peer device disconnects.

Similar question: https://community.infineon.com/t5/PSoC-4/Using-CySmart-API-how-can-I-detect-the-loss-of-a-connection...  

 

 

 

 

 

[16:25:18:896] : 'Connection Terminated Notification' event received
[16:25:18:896] : 	Reason: CONNECTION_TIMEOUT

 

 

 

 

 

I can't find a way in the API callbacks that gives such an event.


In the API doc's I see some function that may help: 

D_Sd_3235936_0-1649944642388.png

How can I use it? Is there a callback I can listen to? Other way to implement?

Thanks!

0 Likes
1 Solution

Hi @D_Sd_3235936 

Please can you check with OnConnected (CyConnectResult result, CyStatus status) Public Member Function from  CySmart API Reference Guide because CyStatus enum  has BLE_ERROR_HCI_CONNECTION_TIMEOUT.

 

Thanks & Regards

Pratiksha V

View solution in original post

0 Likes
3 Replies
PratikshaV
Moderator
Moderator
Moderator
100 solutions authored 5 likes given 250 sign-ins

Hi @D_Sd_3235936 

Have you gone through "CySmart Subsystem Overview" and "API Design" section in the CySmart API Reference Guide .you can also refer the Page no 54 and 21 for various callbacks and error codes.

Please let me know if this helps

 

Thanks

Pratiksha V

0 Likes
D_Sd_3235936
Level 4
Level 4
25 sign-ins 50 questions asked 25 replies posted

Thanks, I went through the reference guide, but I have a question:

Is L2CAP layer connection created (automatically) when using the  connect method via CyBleMgr (GAP) ?

Will I get callbacks from L2CAP layer (OnChannelDisconnectIndication callback) when connected via CyBleMgr (GAP)?

I am trying to get some indication that the peer device has disconnected from me. 

if someone did it and can propose a method it would be of great help!





 

0 Likes

Hi @D_Sd_3235936 

Please can you check with OnConnected (CyConnectResult result, CyStatus status) Public Member Function from  CySmart API Reference Guide because CyStatus enum  has BLE_ERROR_HCI_CONNECTION_TIMEOUT.

 

Thanks & Regards

Pratiksha V

0 Likes