Forum Rule: Always post complete source code & details to reproduce any issue!
Page 8 of 8 FirstFirst ... 6 7 8
Results 176 to 188 of 188

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,564
    @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,564
    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,564
    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,564
    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,564
    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,564
    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.

Posting Permissions

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