Modify the BLE connection timeout

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

cross mob
Gustavo
Level 1
Level 1
5 sign-ins First reply posted First question asked

Hello community!

I have the following problem:

I need to modify the BLE connection timeout, I managed to do this by modifying the CY_BLE_GAPC_CONNECTING_TIMEOUT macros in the generated file cy_ble_gap.h and it works perfectly, but the problem is that every time I build the project, it returns to the value that had before. I did not find any option to modify this parameter in the component in the top design. Is there any solution for this ?

I´m using CYBLE 416045-02 and PSoC Creator 4.4 

Thanks in advance.

0 Likes
1 Solution
PratikshaV
Moderator
Moderator
Moderator
100 solutions authored 5 likes given 250 sign-ins

Hi @Gustavo 

cy_ble_connectingTimeout is fixed by the spec as 30sec. This cannot be changed.

 

 

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 @Gustavo ,

Please can you go through this below link.

https://community.infineon.com/t5/Resource-Library/PSoC-6-BLE-Peripheral-Updating-Connection-Paramet...

 

Thanks & Regards

Pratiksha V

0 Likes

Hi Pratiksha!
Thanks for your answer! I was analyzing the example that you gave me, but I think it doesn't work for what I need to do, because from what I understand, in the example some parameters of the structure cy_ble_connectionParameters are modified with the function Cy_BLE_L2CAP_LeConnectionParamUpdateRequest, and the parameter that I need to modify is in the structure cy_ble_connectingTimeout, is precisely the global variable cy_ble_connectingTimeout.timeout, within the function Cy_BLE_GAPC_ConnectDevice this variable is assigned a value of 30sec, I need this time to be less.
I want to do the following: a PSoC that works as a central must connect via BLE to another PSoC that works as a peripheral, if it cannot connect it will keep trying during these 30 seconds of timeout and then it will try to connect to another peripheral PSoC, my problem is that those 30 seconds of time out is a lot. Is it possible to lower that time?

Thank you very much  for your help.

Regards.

Gustavo

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

Hi @Gustavo 

cy_ble_connectingTimeout is fixed by the spec as 30sec. This cannot be changed.

 

 

Thanks & Regards

Pratiksha V

0 Likes