Forum Rule: Always post complete source code & details to reproduce any issue!
Page 8 of 13 FirstFirst ... 6 7 8 9 10 ... LastLast
Results 176 to 200 of 321

Thread: MTP Responder Contribution

  1. #176
    Junior Member
    Join Date
    Feb 2020
    Posts
    2
    Hey everyone Thanks for all your help so far. This is exactly what I need for a project I'm doing.

    I'm running into a problem where I can readthe SD cardinfo but when running the mtp-test example I get
    error: SD.begin failed

    SdError: 0X1,0XFF
    I have done all the steps in the Readme, does anyone know where I may have messed up? Thanks!

  2. #177
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,698
    @nectar
    You did not give us the information we need to help you.

    can you check if uSD is FAT32, or EXFAT?
    No Linux FS or NTFS is supported.
    where do you have your uSD Card?
    if build-in uSD (Teensy3.6) did you set USE_SDIO = 1 in config.h ?
    if you use other sdCard than AudioAdapter, did you adapt SPI (CS,MISO,MOSI,SCK) to your adapter?

  3. #178
    Junior Member
    Join Date
    Feb 2020
    Posts
    2
    WMXZ thanks for the reply,
    I was using the default mapped SPI configurations.. I wasn't aware that MK20DX256, MK64FX512 and IMXRT1062 were the chips on the different teensy boards. Your post helped me realize that. As soon as I updated them, it worked perfectly! Thank you

  4. #179
    It's alive!

    The problem turned out to be embarrasingly simple - the cable I was using was too long (about 1m). Swapped to a 50cm cable and everything burst into life. I feel pretty stupid. Or perhaps I am pretty stupid.

    Anyway, thank you to WMXZ, KurtE and Defragster.

    Ubuntu 18.04 with Nautilus needs gvfs-backends (which includes libmtp). No other mtp software is required. Standard udev rules as available on teensy site.

  5. #180
    Has anyone had success with MTP on MacOS? I can currently load WMXZs library and boards.txt etc files, compile and run the example code with serial debug output, but I cannot see the SD card in MacOS. I see the teensy MTP connected to the USB bus, but no disk.

    Running T3.6 with SDIO, card is formatted as fat32, SDIO set to 1, I've tried both sdfat and sdfat-beta.

    The SD library works in another sketch (non MTP) and I can access files on the card.

  6. #181
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,698
    Quote Originally Posted by insolace View Post
    Has anyone had success with MTP on MacOS?
    I have no access to a Mac, so I'm not very helpful on this.

  7. #182
    Quote Originally Posted by WMXZ View Post
    I have no access to a Mac, so I'm not very helpful on this.
    I'm now testing this on a Windows 10 laptop, I can see the Teensy but files that I copy over are all 0kb, directories work but files are empty. I have to disconnect and reconnect in order to see any updates. It also seems that long named directories don't want to copy over at all.

    On the MacOS side the disk is not recognized at all.

  8. #183
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,698
    Quote Originally Posted by insolace View Post
    I'm now testing this on a Windows 10 laptop, I can see the Teensy but files that I copy over are all 0kb, directories work but files are empty. I have to disconnect and reconnect in order to see any updates. It also seems that long named directories don't want to copy over at all.

    On the MacOS side the disk is not recognized at all.
    copying files from PC to Teensy worked for me, showing correct size. Have you enabled long names on SdFat?

    concerning MacOS, it simply may e a problem with Apple. Not sure if Apple still supports MTP protocol at all.

  9. #184
    Quote Originally Posted by WMXZ View Post
    copying files from PC to Teensy worked for me, showing correct size. Have you enabled long names on SdFat?

    concerning MacOS, it simply may e a problem with Apple. Not sure if Apple still supports MTP protocol at all.
    SDFatConfig.h has #define USE_LONG_FILE_NAMES 1, but on Windows files still transfer at 0kb.

    WMXZ - would you be willing to export/share a compiled binary that you know works on a Teensy 3.6 with SDIO?

    As for mac os, it looks like MTP is not supported by the OS. There are a number of utilities for using MTP with Android and Windows phones, as well as camera sync utilities. I've tried the following and none recognized the Teensy, listing this here in case anyone else wants to go down this rabbit hole:

    SyncMate
    CommanderOne
    OpenMTP
    Android File Transfer
    MTP-Helper

  10. #185
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,698
    Quote Originally Posted by insolace View Post
    WMXZ - would you be willing to export/share a compiled binary that you know works on a Teensy 3.6 with SDIO?
    I will see if I can upload a hex file for one of the examples (T3.6 with SDIO)

  11. #186
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,698
    Quote Originally Posted by insolace View Post
    SDFatConfig.h has #define USE_LONG_FILE_NAMES 1, but on Windows files still transfer at 0kb.
    Looked into the T3.6 version of the MTP.
    in fact, copy PC to Teensy3.6 is incomplete.
    Existing files are deleted, file info is transferred and file is created, but file content is not send and therefore file size remains 0 and PC does not update directory.
    Will investigate in the next days.

  12. #187
    Quote Originally Posted by WMXZ View Post
    Looked into the T3.6 version of the MTP.
    in fact, copy PC to Teensy3.6 is incomplete.
    Existing files are deleted, file info is transferred and file is created, but file content is not send and therefore file size remains 0 and PC does not update directory.
    Will investigate in the next days.
    Thanks, I'll stay tuned.

  13. #188
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,698
    Quote Originally Posted by insolace View Post
    Thanks, I'll stay tuned.
    Please give the actual version of MTP_t4 a try (both T3.6 and T4-0)

    I reworked the code from a working version, so implementation is somewhat different.
    I also removed the T3.6 USB2 component, which will go into own GitHub repository.

  14. #189
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,463
    @WMXZ - just tried it on a T4 and a T4.1 using SDIO. MTP shows up in explorer but doesn't show any files. Confirm good by running a few test cases including TeensySDIODemo sketch. Any ideas?

  15. #190
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,698
    Quote Originally Posted by mjs513 View Post
    @WMXZ - just tried it on a T4 and a T4.1 using SDIO. MTP shows up in explorer but doesn't show any files. Confirm good by running a few test cases including TeensySDIODemo sketch. Any ideas?
    also on T4.0, right?
    which OS?

  16. #191
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,463
    Quote Originally Posted by WMXZ View Post
    also on T4.0, right?
    which OS?
    Yep T4.0 and T4.1. Running on Windows 10x64 v1909 build 18363.778. Thanks for the help

  17. #192
    @wmz, sorry for the lag, finally ran your updated code and am able to transfer files to/from Teensy3.6 using SDIO on a Windows 10 machine. Thank you!

  18. #193
    Member JaredReabow's Avatar
    Join Date
    May 2020
    Location
    oxford , UK
    Posts
    60
    @WMXZ this is great thanks, will test now.

  19. #194
    Member JaredReabow's Avatar
    Join Date
    May 2020
    Location
    oxford , UK
    Posts
    60
    @WMXZ getting this error : Documents\Arduino\libraries\MTP_t4-master\examples\mtp-test\mtp-test.ino:3:19: fatal error: mtp.h: No such file or directory
    Not sure why its not finding mtp.h, could it be capitalisation?

  20. #195
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,698
    Quote Originally Posted by JaredReabow View Post
    @WMXZ getting this error : Documents\Arduino\libraries\MTP_t4-master\examples\mtp-test\mtp-test.ino:3:19: fatal error: mtp.h: No such file or directory
    Not sure why its not finding mtp.h, could it be capitalisation?
    windows or Linux?

  21. #196
    Member JaredReabow's Avatar
    Join Date
    May 2020
    Location
    oxford , UK
    Posts
    60
    Quote Originally Posted by WMXZ View Post
    windows or Linux?

    Windows 10.

    initially I was using the latest non beta teensyduino installation and manually updated the cores and AVR
    This gave the same error.
    I then installed the latest beta #6 for the T4.1 which brings MTP into the core definitions and tried again, same problem "unable to find mtp.h"

  22. #197
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,698
    Quote Originally Posted by JaredReabow View Post
    Windows 10.
    should not be case sensitive.
    (I'm using Windows10 only)
    may you could check the Arduino verbose to see which include directives are passed to compiler

  23. #198
    Member JaredReabow's Avatar
    Join Date
    May 2020
    Location
    oxford , UK
    Posts
    60
    Quote Originally Posted by WMXZ View Post
    should not be case sensitive.
    (I'm using Windows10 only)
    may you could check the Arduino verbose to see which include directives are passed to compiler
    so i copied the files into the example directory and it find them however i now get:
    "

    In file included from C:\Users\Jared\AppData\Local\Temp\arduino_build_65 1674\sketch\mtp.h:36:0,

    from C:\Users\Jared\Documents\Arduino\libraries\MTP_t4-master\examples\mtp-test\mtp-test.ino:3:

    C:\Users\Jared\AppData\Local\Temp\arduino_build_65 1674\sketch\Storage.h:53:26: fatal error: SdFat-beta.h: No such file or directory

    compilation terminated.

    Error compiling for board Teensy 4.1.

    "

    I have sdfat-beta installed however they no longer use the "beta" tag, so I modified it to remove "beta" from the include at which point I am getting a successful compilation
    Last edited by JaredReabow; 05-15-2020 at 03:59 PM.

  24. #199
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,463
    Sorry for the late reply- I had to change it to all caps, i.e, MTP.h

  25. #200
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,698
    Quote Originally Posted by JaredReabow View Post

    I have sdfat-beta installed however they no longer use the "beta" tag, so I modified it to remove "beta" from the include at which point I am getting a successful compilation
    (For the Record) As written in readme / installation "in src directory copy file "SdFat.h" to "SdFat-beta.h"" However, this is only necessary if you do not have original sdfat installed
    Last edited by WMXZ; 05-15-2020 at 05:19 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •