how to exchange mtu size ?

⚠️
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.
4 posts / 0 new
Last post
bigheadbaby
Offline
Last seen:2 years 5 months ago
Joined:2017-12-14 13:52
how to exchange mtu size ?

If i want to change MTU size(23 by default) , exchange mtu req from client(cellphone) is necessary.
can i send this req from server to client (cellphone)?

Device:
PM_Dialog
Offline
Last seen:21 hours 42 min ago
Staff
Joined:2018-02-08 11:03
Hi bigheadbaby,

Hi bigheadbaby,

You should configure the CFG_MAX_RX_PACKET_LENGTH and CFG_MAX_TX_PACKET_LENGTH definitions of da1458x_config_advanced.h header file with the correct DLE packet. Then you should modify the .max_txoctets and the .max_txtime of the user_gapm_conf structure of the user_config.h header file. Also, you should use the MTU size .max_mtu = 60. Also, I highly suggest you the DSPS application for the DA14585 SoC. This application uses the data length extension(DLE). Please search the USE_DLE hash definition.

Thanks, PM_Dialog

bigheadbaby
Offline
Last seen:2 years 5 months ago
Joined:2017-12-14 13:52
Dear PM_Dialog:

Dear PM_Dialog:
thanks for your reply .
But im still comfused for the initiator of this process.
I have successfully use NORDIC NRF connect to send mtu exchange to enlarge size of mtu.
but can i sent this req from NORDIC SOC? for example, after finishing connection with the cellphone , i want to set a ke_timer to trigger a api to send a ext_mtu req to cellphone to set mtu size , is there any API can I use for starting this process?
谢谢~

MT_dialog
Offline
Last seen:3 months 1 day ago
Staff
Joined:2015-06-08 11:34
Hi bigheadbaby,

Hi bigheadbaby,

Since its a 580 you can set the maximum MTU size in the user_gapm_conf struct in the .max_mtu member of the structure, after doing that in order to perform the exchange with the central you should send the GATTC_EXC_MTU_CMD when you have a connection (in the user_on_connection) and the 580 will perform the exchange. There is no API implemented that does this but you can use the snippet below:

static void user_gattc_exc_mtu_cmd(uint8_t conidx)
{
struct gattc_exc_mtu_cmd * cmd = KE_MSG_ALLOC(GATTC_EXC_MTU_CMD,
KE_BUILD_ID(TASK_GATTC, conidx), TASK_APP,
gattc_exc_mtu_cmd);

cmd->req_type = GATTC_MTU_EXCH;

ke_msg_send(cmd);
}

Thanks MT_dialog