Get response from MTU exchange

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
7 posts / 0 new
Last post
wslkh
Offline
Last seen:1 year 2 weeks ago
加入:2018-05-14 09:42
Get response from MTU exchange

Hi,
I post a question inhttps://support.dialog-semiconductor.com/comment/20157#comment-20157but didn't get further response.
So I create a new post in English, sorry for the duplication.

I use DA1458x_DSPS_v_5.150.2, and want to know where to get the response after user_gattc_exc_mtu_cmd is executed.
I try the suggested way but didn't work.
static int gattc_cmp_evt_handler(ke_msg_id_t const msgid,
struct gattc_cmp_evt const *param,
ke_task_id_t const dest_id,
ke_task_id_t const src_id)
{
if(param->req_type == GATTC_MTU_EXCH)

Any suggestion?

Device:
PM_Dialog
Offline
Last seen:37 min 12 sec ago
工作人员
加入:2018-02-08 11:03
Hi wslkh,

Hi wslkh,

After calling the user_gattc_exc_mtu_cmd function, the response is a GATTC_CMP_EVT and then the gattc_cmp_evt_handler function will be triggered. What kind of response are you waiting and what do you want to do?

Thanks, PM_Dialog

wslkh
Offline
Last seen:1 year 2 weeks ago
加入:2018-05-14 09:42
Hi PM_Dialog,

Hi PM_Dialog,
I suppose so, see my initial post. My question is, I never see the if statement
if(param->req_type == GATTC_MTU_EXCH)
triggered in gattc_cmp_evt_handler after user_gattc_exc_mtu_cmd is called.
Did you try that?

PM_Dialog
Offline
Last seen:37 min 12 sec ago
工作人员
加入:2018-02-08 11:03
Hi wslkh,

Hi wslkh,

The if-statement is not triggered into the gattc_cmp_evt_handler because the param->req_type us not equal to GATTC_MTU_EXCH (0x01). Please try to replace the GATTC_MTU_EXCH with GATTC_NOTIFY.

Thanks, PM_Dialog

wslkh
Offline
Last seen:1 year 2 weeks ago
加入:2018-05-14 09:42
It doesn't make sense as it

It doesn't make sense as it has nothing to do with notification?. Could you give me some code snippet? Like show the MTU size in the response from remote peer?
Thanks.

PM_Dialog
Offline
Last seen:37 min 12 sec ago
工作人员
加入:2018-02-08 11:03
Hi wslkh,

Hi wslkh,

This feature is not supported in SDK5.0.4 as it is not a compulsory feature of the Bluetooth SIG. However, you are able to use API uint16_t gattc_get_mtu(uint8_t idx) to poll the negotiated MTU. Be aware that this feature is implement in 585 SDK.

Thanks, PM_Dialog

wslkh
Offline
Last seen:1 year 2 weeks ago
加入:2018-05-14 09:42
谢谢,PM_Dialog。That's

谢谢,PM_Dialog。现在很清楚。