disconnect recipe (from central) when multiple peripherals are connected

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

cross mob
Anonymous
Not applicable

Is there a way to force a specific peripheral to disconnect from a central device when multiple peripherals are connected to a central device?

There seems only to be blecm_disconnect(BT_ERROR_CODE_CONNECTION_TERMINATED_BY_LOCAL_HOST), but how is the peripheral specified? I have tried using emconinfo_setConnHandle(), and this seems to work sometime but other times emconinfo starts returning bogus data for the other peripherals.

Can you provide some pseudo-code to show how this "should" be done?

Many thanks

0 Likes
1 Solution
asridharan
Employee
Employee
10 comments on KBA 5 comments on KBA First comment on KBA

Try using blecm_SetPtrConMux(). See hello_client sample app in SDK 2.0.1 before it sends out a notification to its master.

View solution in original post

3 Replies
asridharan
Employee
Employee
10 comments on KBA 5 comments on KBA First comment on KBA

Try using blecm_SetPtrConMux(). See hello_client sample app in SDK 2.0.1 before it sends out a notification to its master.

Anonymous
Not applicable

Thanks. I have disconnects working stably now.

I don't know why I didn't think about that earlier, since I obviously had to set the ConMux when the connection came up. It might have been because I also making the call to bleprofile_Discoverable with SDK 2.0 that victorz decribes in the following thread:

http://community.broadcom.com/message/5590#5590

Either way, between making the call to blecm_SetPtrConMux() and removing the call to bleprofile_Discoverable() I have a good connect/disconnect recipe working.

Anonymous
Not applicable

where is the documentation on the ConMux methods? It's not included in the API guide that came with the SDK.

0 Likes