connection handle will increase always

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

cross mob
user_2139251
Level 3
Level 3

Hi All,

    I tested WICED Smart SDK 2.2.1 to 2.2.3, and found a bug of connection timeout easily, I used 20736 as hello_client master, and tried to connect 4 max ble slave devices, there were 34 ble slave devices advertising at the same time, two 20736 master boots up at the same time and connected advertising slave devices competitively,

I configured blecm_setmaxconnection(5) to APPLICATION_INIT(), and set blecm_ConMuxInit(5) in the function: hello_client_create(void); when connection timeout occurs, for example the first time connection failure, the connection handle should be 0x40 if successfully, next time , the successful connection handle will begin from 0x41, and reach 0x43 max value, it will not reuse 0x40 handle any more,if I try to connect the fourth connection, it always occur connection timeout issue, and can't connect 4 slave devices, this issue can be reproduced easily, any one face such issue? thanks a lot.

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

Hi Btta,

    I have work around solution to fix this issue, now  I have another issue which I am not sure the root cause: when connection timeout or  disconnect reason is 0x3e, when try to scan new device, there isn't any device report, I attach two log here, when the log  occurs "_getBondedInfoIdx, Out of memory" or "Delete Bonded Info, out of memory",

and my app begins new scan, there isn't any adv report, in these two logs, you also can find the connection timeout case, you can search key word "connect".

View solution in original post

0 Likes
13 Replies
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

Firstly, I don't have a scenario of 34 ble devices broadcasting simultaneously.

With only one master (client), we had shown that there are no issue connecting up to

4 servers, which is the default maximum in the hello_client app. The real maximum is

8 though.

Re: How many connect several Max about 20737s?

BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

Did you have the following patch as you compile your hello_client?

APP_PATCHES_AND_LIBS += central_role_patches.a

0 Likes

yes, my hello_client app make file has below line text

########################################################################

################ DO NOT MODIFY FILE BELOW THIS LINE ####################

########################################################################

# Devices that support central/scatternet role should include

# special central role patch library

APP_PATCHES_AND_LIBS += central_role_patches.a

APP_PATCHES_AND_LIBS += additional_gatt_apis.a

0 Likes

Hi Btta,

     I think this issue is related with  blecm_setmaxconnection(5) , if hello client occurs 2 times connection timeout event, 20736 only connect 3 slave devices, if connection timeout event occurs 3 times, it can connect 2 slave devices, can Cypress team review the lower layer source code with this issue? thanks a lot.

0 Likes

Ok, at least now I understand what is your point... Let me check this out internally...

0 Likes

Hi Btta,

    If you have patch for this issue, please share the patch with me, thanks a lot.

0 Likes

I tried to to reproduce but to no avail. I used the following:

1) one tag board running puart_control app

2) two tag boards with different BD addresses running hello_sensor app

3) utilize the ClientControl.exe accompanying puart_control app

I ran a few scenarios but I always able to see that the handles return to the smallest available one. Perhaps

this is not an accurate depiction of your case. Can you do something similar to what I have done and let me

know how you may reproduce it?

0 Likes

Hi Btta,

    You must use two tag boards to run hello_client or puart control app, more master boards try to connect slave devie, when it occurs connection timeout case: BLEAPP_APP_TIMER_CONN, it should reproduce this issue.

    By the way, I have another question: why does hello_client app can't stop scanning report sometimes when it find a correct device and try to connect it event I call blecen_Scan(NO_SCAN);?

0 Likes

I may not have the resources at hand now to reproduce this issue. Do you have any log that you can share for the simplest scenario? If this is too time consuming then we may have to move to MyCase instead to investigate this issue.

0 Likes
lock attach
Attachments are accessible only for community members.

Hi Btta,

    I have work around solution to fix this issue, now  I have another issue which I am not sure the root cause: when connection timeout or  disconnect reason is 0x3e, when try to scan new device, there isn't any device report, I attach two log here, when the log  occurs "_getBondedInfoIdx, Out of memory" or "Delete Bonded Info, out of memory",

and my app begins new scan, there isn't any adv report, in these two logs, you also can find the connection timeout case, you can search key word "connect".

0 Likes

Can you help me to create a new case for the new issue? We try to limit one discussion topic per case.

0 Likes

Hi Btta,

     I have  transfered these two logs to the below issue case, thanks a lot

scan no adv report callback sometimes

0 Likes
lock attach
Attachments are accessible only for community members.

Hi Btta,

    I add attached file about connect handle increase case when connection timeout occurs, you can refer to it, thanks a lot.

0 Likes