Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-67041

Android exchanges MTU but does not relay value back to the user

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 6.2.0 FF
    • 5.10.1
    • None
    • Qt 5.10.1 on Android (nexus 6) version 6.0.1
    • 13
    • Qt6_Foundation_Sprint 33, Qt6_Foundation_Sprint 34

    Description

      In the Qt Connectivity Android java code is a function that supports setting the MTU - this code seems a bit strange in that it will successfully exchange and get the maximum MTU (which in my case is 240), however this information is not relayed back to the C++ Qt code so the only safe amount of data to write in a characteristic is 20. If the MTU is 23 then no more than 20 bytes can be successfully written with a single command otherwise a characteristic write error is emitted, however if the MTU exchange is set at 240 and 60 bytes is written with a single command then it splits this up into multiple packets with a length no greater than 27 bytes per packet. Testing with a non-Qt non-android device yields writes of >240 bytes per packet without issue.

       

      Therefore I see 2 issues:

      1) C++ Qt Android (and probably other systems too) code is not able to know the result of a MTU exchange

      2) Even when a successful MTU exchange has occured on C++ Qt Android, when atempting to write data of e.g. 60 bytes, it is split up into packets of no greater than 27 bytes per packet.

      Attachments

        1. other_write251.png
          other_write251.png
          81 kB
        2. qt_write60.png
          qt_write60.png
          70 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              andreasbuhr Andreas Buhr
              thedjnk Mr nK
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              11 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes