Is function 'blecm_CreateConnection' to be called sequentially?

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

cross mob
hachc_2137126
Level 5
Level 5
10 likes given 5 likes given First like received

Hi,

  I'm going to run 20737 as central role which will try to connect several peripherals at the same time.

  Will it be possible to call function 'blecm_CreateConnection' to different peripherals without calling 'blecm_CreateConnectionCancel' when some peripheral is not reachable?

0 Likes
1 Solution
VictorZ_46
Employee
Employee
5 comments on blog 25 sign-ins 250 likes received

No, you should not call new Create without Canceling the previous one.  I think blecen_Conn will do it for you though (see hello_client sample for example).

I am also not sure what you are trying to do.  The normal behavior would be to scan for advertisements and when you see advertisement from one of your devices, you tell stack to Connect.  If your device behaves well it should connect pretty fast.  If device is not present you will not see the advertisement.

View solution in original post

3 Replies
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

I will ask one of the developers to respond.

0 Likes
VictorZ_46
Employee
Employee
5 comments on blog 25 sign-ins 250 likes received

No, you should not call new Create without Canceling the previous one.  I think blecen_Conn will do it for you though (see hello_client sample for example).

I am also not sure what you are trying to do.  The normal behavior would be to scan for advertisements and when you see advertisement from one of your devices, you tell stack to Connect.  If your device behaves well it should connect pretty fast.  If device is not present you will not see the advertisement.

Hi Victorz,

  Thanks for your comment. Understood.

  I'll take care of the creating connection one by one.

0 Likes