none
BluetoothLEDevice Results of MTU Exchange RRS feed

  • Question

  • The BLE Host needs to know the results of the MTU exchange in order to send large amounts of data efficiently particularly when performing Over-the-Air updates. It is documented that the MTU Exchange will be performed automatically and the result will be the lesser of the two devices requests. Without knowing the results of the MTU Exchange dynamically, the BLE Host would have to send 20 byte packets where 247 or 517 byte packets could be used. The throughput difference between using 20 byte packets compared to these larger sizes is great.

    One support response suggested it is easy to determine the MTU size dynamically by arranging to receive a full MTU size from the server. It is not always possible to arrange this since you may not have control over the software on the server. 

    Tuesday, October 8, 2019 4:34 PM

All replies

  • Hi,

    Thank you for sharing such useful information here! Are there any questions that you wants to know?

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, October 9, 2019 2:42 AM
    Moderator
  • Yes. How exactly is the Windows BluetoothLE supposed to handle the changing MTU size from one connection to the next?
    Thursday, October 10, 2019 8:23 PM
  • Hi,

    Windows will always try to negotiate the maximum MTU size.  Effectively, this means that Windows will always request 525, then negotiate down to the maximum the device supports.  

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, October 11, 2019 1:36 AM
    Moderator
  • Roy,

    This is what I already stated in my initial post. 

    The results of the MTU Exchange are needed by the Application so it can decide

    how to effectively send large amounts of data.

    For example, Xamarin for Android has a callback OnMtuChanged()

    that provides the new MTU size for use by the Application.

    Friday, October 11, 2019 7:22 PM
  • Hi,

    Well as I previous reply mentioned, windows always try to negotiate the max MTU size no matter which device you are connecting with. Currently there is on such event of MTU size change for BLE API.

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, October 14, 2019 2:58 AM
    Moderator
  • As mentioned in the original post, it is a big problem.

    Where can this issue be escalated to?

    Thanks

    6 hours 3 minutes ago