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

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



    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.10.1
    • Fix Version/s: 6.2.0 FF
    • Labels:
    • Environment:
      Qt 5.10.1 on Android (nexus 6) version 6.0.1
    • Story Points:
    • Sprint:
      Qt6_Foundation_Sprint 33, Qt6_Foundation_Sprint 34


      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.


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

          Issue Links

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



              andreasbuhr Andreas Buhr
              thedjnk Mr nK
              PM Owner:
              Vladimir Minenko Vladimir Minenko
              RnD Owner:
              Alex Blasche Alex Blasche
              11 Vote for this issue
              14 Start watching this issue



                  Gerrit Reviews

                  There are no open Gerrit changes