Is there any API for inquiry of current connection parameter

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,

  Besides of registering 'lel2cap_handleConnParamUpdateReq' to get the updated connection parameter while changed in LL side, is there any other API for retrieving the connection parameter which is current used at LL side?

  I'm using SDK2.2.

0 Likes
1 Solution

I think you can use emconninfo_getConnInterval()/emconninfo_getSlaveLatency()/emconninfo_getSupervisionTimeout() to get current connection parameters.

The prototype is in WICED-Smart-SDK\Wiced-Smart\bleapp\lestack\blecm

INT32 emconninfo_getConnInterval(void);

INT32 emconninfo_getSlaveLatency(void);

INT32 emconninfo_getSupervisionTimeout(void);

View solution in original post

13 Replies
VikramR_26
Employee
Employee
25 sign-ins 10 sign-ins 10 comments on KBA

There is an api blecen_GetConn, does that help you?

thnx

vik86

0 Likes

Hi vik86,

  Thanks, but no, this API can't provide the connection parameter as I wanted.

  I am thinking if any API can be used for retrieving the parameter that is used at LL side which is negotiated between master and slave.

0 Likes

Could you tell me what is LL ( I assumed link layer ) and also what connection parameter you require between master and slave? The api docs in the SDK lists all the possible api that is exposed.

thnx

vik86

0 Likes

Using function 'lel2cap_handleConnParamUpdateReq' can tell the controller to choose a proper connection interval between min and max as parameter we set in this function. But I don't know which connection interval is actually selected by controller. And I suppose that the end peer might change the connection interval at controller side without notifying the change if this new interval is in the range of min and max as set by host.


So, what I need to know is the actual interval that is used by controller now.

0 Likes

I think you can use emconninfo_getConnInterval()/emconninfo_getSlaveLatency()/emconninfo_getSupervisionTimeout() to get current connection parameters.

The prototype is in WICED-Smart-SDK\Wiced-Smart\bleapp\lestack\blecm

INT32 emconninfo_getConnInterval(void);

INT32 emconninfo_getSlaveLatency(void);

INT32 emconninfo_getSupervisionTimeout(void);

Thanks for this info.

0 Likes

Hi janusw,

  Is this the same API for connection parameter with different multiple slaves?

0 Likes

Hi Hardy,

As I know, this is for latest connection. It will be updated after connection is up or connection parameter update is complete. So you may need to keep the information in your app.

0 Likes

Hi janusw,

  Okay. But is there any callback available when parameter is updated from every connection? Since the parameter would be changed anytime after connUp.

  i.e.

  Connection as master:

    lel2cap_handleConnParamUpdateReq is used for callback when slave request to change it. Then we can call *emconninfo_getXXXX* to query the current parameter after call 'blecm_ConnectionUpdate' that update it.

  Connection as slave:

    Any callback available for notifying my application?

0 Likes

Hi Hardy,

You can use the function in your app_create() to register callback to know completion.

void bleprofile_regAppEvtHandler_leConnUpdateComplete(BLEPROFILE_NO_PARAM_CB handler)

Hi janusw,

  Is there any other procedure required for using this callback?

  I've tried to register this callback in create function as you mentioned in SDK 2.1 or 2.2, but it failed to boot up.

  The callback function is just to return 0.

0 Likes

There is no prerequisite to use this registration function. Just use it as other bleprofile_regAppEvtHandler().

I tried it and it behaves good.

lock attach
Attachments are accessible only for community members.

Hi janusw,

  I still can't boot device (reset loop) after adding this callback to hello_client.c.

  Can you check my patch and the debugging trace log as enclosed?

0 Likes