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: Reported
    • Priority: P1: Critical
    • Resolution: Unresolved
    • Affects Version/s: 5.10.1
    • Fix Version/s: None
    • Labels:
    • Environment:
      Qt 5.10.1 on Android (nexus 6) version 6.0.1


      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
        2. qt_write60.png
          70 kB

          Issue Links

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



              • Assignee:
                ablasche Alex Blasche
                thedjnk Mr nK
              • Votes:
                10 Vote for this issue
                13 Start watching this issue


                • Created:

                  Gerrit Reviews

                  There are no open Gerrit changes