- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Solved! Go to Solution.
- Labels:
-
MasterSlave
-
SDK 2.X
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is an api blecen_GetConn, does that help you?
thnx
vik86
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for this info.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi janusw,
Is this the same API for connection parameter with different multiple slaves?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is no prerequisite to use this registration function. Just use it as other bleprofile_regAppEvtHandler().
I tried it and it behaves good.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content