Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Copy data from Win 10 to MTB device (smartphone)



  • Hey guys,
    I'd like to copy data to a connected MTB device.

    I connected this Device to my Windows 10 Computer..
    When I go to "My Computer" this device is listed as MTB Device

    04c2cb74-0aff-4e3b-9f53-937b5837f895-grafik.png

    With Windows explorer i can copy/remove files etc.
    Now I was wondering if Qt provides a solution to access MTB devices as well?

    I first thought of https://doc.qt.io/qt-5/qstorageinfo.html#mountedVolumes
    However this only returned info about C:. It looks like this only works for local volumes.
    Do you have any hint for me where to look?

    I'm looking forward for your ideas :)


  • Lifetime Qt Champion

    Hi,

    AFAIK, it's not seen as a block device. You may have to use something like libmtp to access it.



  • You mean MT(P) media transfer protocol? It is documented online. Also, cellphones being devices you pay for but IMHO never really truly own, may lock down access to the files...or more insideously not recognize them if they are not cryptographically signed by the corporate devils at google or your wireless carrier.

    It should be illegal to sell any device that the purchaser cannot have full administrative access to! Here endeth the rant.

    But to your question, MTP is like ftp, so random access is not what it is intended for, but to push-pull whole files and directories. You would need access to the MTP spec and to write a "client" similar to an ftp client.



  • Hey, thx for your replys.
    Yes it's an Media Transfer Protocol Device. I tried building libmtb but i failed. This project looks pretty old to me. Not sure it will work in Win 10. (Has anybody tried it?)

    But to your question, MTP is like ftp, so random access is not what it is intended for, but to push-pull whole files and directories. You would need access to the MTP spec and to write a "client" similar to an ftp client.

    =>so there is no "common" protocol beneath? Is it not comparable to CanOpen,ModbusRTU etc?
    Why does the WIndows API provide some sort of MTB access if it's very device specific?


  • Lifetime Qt Champion


Log in to reply