得到当前MTU大小。

4 posts / 0 new
Last post
Matthieu ANTOINE
Offline
Last seen:4 years 3 months ago
Expert
加入:2014-01-14 14:51
得到当前MTU大小。

Hello,

I work with the SDK 5.0.2.1. I would like to know if there is an easy way to know the current MTU size (up-to-date structure, API, etc.) while executing the application.

Thanks!
_Matthieu

Device:
MT_dialog
Offline
Last seen:4 days 17 hours ago
Staff
加入:2015-06-08 11:34
Hi Matthieu,

Hi Matthieu,

There is no API message returning the agreed MTU to application. However your application can read the current value of a connection index by calling the gattc_get_mtu() function. The negotiated MTU for the connection will be the minimum MTU of the the 2 devices.

Thanks MT_dialog

Matthieu ANTOINE
Offline
Last seen:4 years 3 months ago
Expert
加入:2014-01-14 14:51
Hi,

Hi,

I'm not sure to understand your answer. In the source code, this function is described as "Gets the negotiated MTU. This function gets the negotiated MTU.". Then, I guess that I can use it to effectively get the agreed MTU?

Thanks.
_Matthieu

MT_dialog
Offline
Last seen:4 days 17 hours ago
Staff
加入:2015-06-08 11:34
Hi Matthieu,

Hi Matthieu,

是的,gattc_get_mtu() function can read the current MTU value of a connection index.

Thanks MT_dialog